I am trying to get a server connection to a remote MBean Server. I am using the
following code:
MBeanServerConnection server = null;
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, jndiUrl);
InitialContext ic = new InitialContext(env);
server = (RMIAdaptor) ic.lookup("jmx/invoker/RMIAdaptor");
When running the code on one of the remote servers I get a
java.lang.ClassCastException on the lookup which is strange because RMIAdaptor
actually extends the MBeanServerConnection. I think it is something else. When
I run this code on my desktop against my local machine it works fine. But when
I run this code on my local machine against a remote server I get a
javax.nameing.CommunicationException.
Any help on how to query the Mbeans on a remote machine would be helpful?
FYI this code worked fine in all aspects with jboss 4.0.3 it is 4.0.4 that is
giving me the problems.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049526#4049526
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049526
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user