Jason Greene [
http://community.jboss.org/people/jason.greene%40jboss.com] created the
discussion
"Re: Remote JMX connector for AS7"
To view the discussion, visit:
http://community.jboss.org/message/567057#567057
--------------------------------------------------------------
I committed a variant of Kabir's patch to upstream. It does not use a client socket
factory which prevents the need for client code and allows jconsole to work out of the
box. Unfortunately this also means that the server requires the java.rmi.server.hostname
property to be set if the interface is not the one that matches the hostname. So the
changes also add that.
So to connect to a JSR-160 service out of the box with no other code or libs you can do:
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.rmi.registry.RegistryContextFactory");
JMXServiceURL address = new
JMXServiceURL("service:jmx:rmi:///jndi/rmi://127.0.0.1:1090/jmxrmi");
JMXConnector cntor = JMXConnectorFactory.connect(address, env);
This is what jconsole does under the hood.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/567057#567057]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]