users@glassfish.java.net

can't get MBeanServer instance, help!

From: <glassfish_at_javadesktop.org>
Date: Tue, 02 Dec 2008 18:02:34 PST

I use the following code to get the MBeanServer instance:
      MBeanServer mbs=com.sun.enterprise.util.FeatureAvailability.getInstance().getMBeanServer();
System.out.println(mbs.getDefaultDomain());

but fail, What I get is a NullPointerException!
And the glassfish had been startup.

I need to invoke the invoke() method of MBeanServer, or my project will be not able to meet
the need of customer!

All comment is appreciate!
[Message sent by forum member 'prospectyang' (prospectyang)]

http://forums.java.net/jive/thread.jspa?messageID=319683