Could someone please give me a hint how could I make certain MBean to get deployed after the EJB? Both the MBean and EJB are the part of the same EAR file.
I have tried to make mbean be dependable on the EJB (using "depends" option in jboss-service.xml), but that only gives me an error during the startup:
17:28:27,938 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()' Cause: Incomplete Deployment listing: Packages waiting for a deployer: <none> Incompletely deployed packages: <none> MBeans waiting for classes: <none> MBeans waiting for other MBeans: [ObjectName: jpmorgan.nexus:service=CommunicationManager,name=CommunicationManager1 state: CONFIGURED I Depend On: jboss.ejb:service=EJB,name=NexusServiceRemoteHome Depends On Me: ]
Figure out the MBeans that JBoss creates for your EJB, add to your MBean in jboss-service.xml.