users@glassfish.java.net

not able to connect with the jconsole

From: <glassfish_at_javadesktop.org>
Date: Sat, 03 May 2008 18:18:32 PDT

Hi,

I am using sun app server 8.1 and trying to connect with jconsole, my client program is running well. below is the entry how i register my mbean with the mbean server

mbs = ManagementFactory.getPlatformMBeanServer();
helloName = new ObjectName("ServiceLocatorJmxAgent:name=ServiceLocatorMonitor");
                 
                 mbs.registerMBean(this, helloName);
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:8686/management/rmi-jmx-connector");
                 JMXConnectorServer cs = JMXConnectorServerFactory.newJMXConnectorServer(url, null, mbs);
                 cs.start();

when I open the jconsole and try to connect it will shows the "connection failed" error.
it will allow me to connect with the advance tab, and shows me the so many enteries. but I cant find my monitor entry.
please suggest me how can i connect with jconsole corectly and see my monitor mbean on that.

before that it shown me exception like -- java.security.AccessControlException: access denied (javax.management.MBeanServerPermission createMBeanServer)|#]. but i changed the permission in Application server --> Monitor --> setup Tab
and make the "HIGH" to all tab.

Please suggest me something to connect with jconsole and see my entry.

one more thing if I use this program stand alone it works fine and I am able to see the Monitor mbean

Thanks in advance
Peret Pandya
[Message sent by forum member 'peterpandya' (peterpandya)]

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