I started working with embedded Glassfish and have successfully deployed two enterprise applications to the embedded glassfish server (one containing a EJB/web application and the other a web application.) I have been unsuccessful in starting the JMX connector in the embedded Glassfish however. Has anyone done this with the embedded glassfish API? I see the EmbeddedAdminContainer interface contains a bindJmxTo() method, but have not been able to figure out how to use it. My EJB contains business logic which registers and unregisters an MXBean which will be access via the JMX connector.
I have tried Example 10 (pg 26) from the Sun GlassFish Enterprise Server v3 Embedded Server Guide, but have also been unsuccessful in using an existing domain.xml to configure the embedded server. I pulled the domain.xml file from the glassfish-embedded-all-3.0.jar file. I keep getting a NullPointerException with the following line:
Server server = builder.build();
My thought was to start with that domain.xml and enable the JMX connector on port 8686 in that configuration file. I've had no luck with this however.
Is there a 'asadmin set' command that can be used to enable the JMX connector? How would you do this using the Glassfish API?
Just for grins, I may change the domain.xml and repackage it in the glassfish-embedded-all-3.0.jar file as a test to see if I can start the JMX connector with no problems. That would just be for testing purposes however.
Any guidance would be greatly appreciated.
Thanks,
Ron
[Message sent by forum member 'rjrjr999']
http://forums.java.net/jive/thread.jspa?messageID=393888