How to properly connect Appl. Manager with MX4J ???
Hi there,
We're developing an application which will be manageable via JMX using MX4J. Next step would be the introduction of the your ApplicationManager 6. I tried to
connect both, but failed, What did i do?
The code on server side looks as follows. I think the problem is the line where some would have to build the JMXServiceURL:
[...]
RMIServerSocketFactory ssf = new RMIHttpToPortSocketFactory();
Map env = new HashMap();
env.put("jmx.remote.protocol.provider.pkgs", "mx4j.remote.provider.rmi.*");
env.put(RMIConnectorServer.RMI_SERVER_SOCKET_FACTORY_ATTRIBUTE, ssf);
JMXServiceURL address;
JMXConnectorServer cntorServer;
try {
address = new JMXServiceURL("service:jmx:rmi://localhost");
cntorServer = JMXConnectorServerFactory.newJMXConnectorServer(address, env, mbServer);
cntorServer.start();
} catch [...]
When starting the system I get the following printed:
RMIConnectorServer started at:
service:jmx:rmi://localhost/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0
dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc4AAtVbmljYXN0UmVmMgAADTE3Mi4yNy43Mi4xMDcAAAhFAAAAAAAAAAABbchhAAABBoJKEp6AAAB4
Now I want to add the new monitor in the (mx4j/JDK1.5) section in the ApplicationManager console. I am asked for host, port and JNDI name. I don't want to
use JNDI. I get "service not running". So I am not sure what I have to type in there. I dont have port, if I had one it wouldn't work as well. And what makes
me really nerveous is the long encrypted string in the generated URL.
So please help me to connect MX4J and the Application Manager.
Thank you!
Jan Rudert
New to ADSelfService Plus?