0 Replies Latest reply on Aug 6, 2015 10:33 AM by andrea.bloggero

    How to make an ear project with two mbeans in it and deploy it in jboss ( using eclipse editor)?

    andrea.bloggero

      I have two service MBeans as separated .sar project.They work fine and i deploy them with no problems. But I'd like to make a project with both Mbeans in it. I found out that I should make an .ear project and put the two .sar in it, but i have no idea how should I do it. How many folder should i make, where to put the xml descriptor/s, what should i write in it/them?

      To be more precise the two Mbeans are daemons. The first one checks a config.xml file every set period of time and creates an object with some info got from config.xml, and has a getter method to get that object. The second one is a daemon that checks if there are some files .DAT in a folder and calls other classes and method to make operations on those files. I'd like to make a single project where the second MBean has a method that evokes the first MBean and returns the object( and i know how to do it). On the java side i have no problems. My issue is about the structure of the project, the xml descriptor/s etc etc, to make the project be deployed by jboss with no errors.

      The jboss-service.xml file in the META-INF folder of the first .sar is:

      <?xml version="1.0" encoding="UTF-8"?> 
       <server> <mbean code="com.daemon.ConfigurationDaemon" name="com.daemon:service=Daemon"> </mbean> </server>

      The jboss-service.xml file in the META-INF folder of the second .sar is:

       <?xml version="1.0" encoding="UTF-8"?> 
      <server> <mbean code="prova.read.DATDaemon" name="prova.read:service=DATDaemon"> </mbean> </server>

      Thanks in advance