Version 3

    To get the MBean to deploy after some service is up, add a entry.  In our system we needed to use some EJB services in the startup process, so we added a dependency on the EJB deployment which makes the jboss-service.xml file look like this:

     

    
    <?xml version="1.0" encoding="UTF-8"?>
    
    <server>
      <mbean code="com.fgm.imsma.startup.HelloWorldService" name="imsma.startup:service=HelloWorld">
        <attribute name="Message">Hello World</attribute>
        <depends>jboss.j2ee:module=imsmaejb-1.0.jar,service=EjbModule</depends>
      </mbean>
    </server>