I would like to use JMX to validate that all of the modules in my EAR have been started.
+ Query org.jboss.management.j2ee.J2EEApplication? or similar MBean to determine the modules that are part of the EAR.
+ From the above, find an MBean for each module and determine that the module is in a "started" state.
The "modules" attribute in J2EEApplication that I am looking at has a zero length String?
The "deploymentDescriptor" attribute returns the application.xml which I could parse, but I also have a SAR deployed in the EAR, and would need to get/parse jboss-app.xml to verify that the services have been deployed.
I suppose I could use the jmx-console to determine the Objectnames for each module and hard-code them (or put in a properties file), but then I will forget to add new objectnames as I add modules to the EAR, and the info should be available in JMX.
I'm a little lost on where to go from this point. Any pointers would be appreciated.
you can check this programmatically using http://wiki.jboss.org/wiki/Twiddle and query:
for each in $(./twiddle.sh -s localhost query "jboss.j2ee:ear=NameOfApplication.ear,*"); do ./twiddle.sh -s localhost get --noprefix "$each" StateString done