views:

223

answers:

0

There are few servers runing simple MBean server listening on specified port.

These servers are supposed to be monitored by main server running glassfish with an application based on EJB 3.

One of the sessionbeans should perform monitoting by connecting to remote MBean. I use this url service:jmx:rmi:///jndi/rmi://${host}:${port}/jmxrmi to connect to remote MBean.

Everything is ok when I'm accessing this MBean from simple command line client written myself, and i'm also able to access this bean by jconsole.

The problem occures while oi'm trying to access it from session bean.

I use Sun GlassFish Enterprise Server v2.1.1 ((v2.1 Patch06)(9.1_02 Patch12)) (build b31g-fcs)

javax.management.InstanceNotFoundException: DefaultDomain:jmxproba=process
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:662)
at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
at com.sun.jmx.remote.security.MBeanServerAccessController.getAttribute(MBeanServerAccessController.java:299)

......