I can connect Glassfish AS 3.1 via JMX with the following Service URL: JMX: RMI: /// JNDI / RMI: // local: 8686 / jmxrmi
However, I could not connect it through AMX. Here is the API I'm using
AMX-api-10.0-SNapshot
I realized in my source code that the URL is defined differently than the following. It is defined in the AppserverConnectionSource.java class
private static final String APPSERVER_JNDI_NAME = "/management/rmi-jmx-connector";
When I try to connect the AS AMX interface, I get the following error.
Connection using JMXServiceURL: service: jmx: rmi: /// jndi / rmi: //127.0.0.1: 8686 / management / rmi-jmx-connector java.io.IOException: failed to get RMIServer stub: javax.naming.NameNotFoundException : management / rmi -jmx-connector on javax.management.remote.rmi.RMIConnector.connect (RMIConnector.javahaps38) on javax.management.remote.JMXConnectorFactory.connect (JMXConnectorFactory.java:248) at com.sun.appserv .management.client.AppserverConnectionSource.createNew (AppserverConnectionSource.java:412) at com.sun.appserv.management.client.AppserverConnectionSource.getJMXConnector (AppserverConnectionSource.java-00-0081erer.mandermandermander (AppserverConnectionSource.java∗13) at com.sun.appserv.management.client.ProxyFactory.getInstance (ProxyFactory.java: 399) at com.sun.appserv.management.client.ProxyFactory.getInstance (ProxyFactory.java{73) at com.sun.appserv.management.client.AppserverConnectionSource.getDomainRoot (AppserverConnectionSource.javahaps28)