I have a cluster with an admin server, server 1 and server 2 the application is deployed to the cluster to server 1 and 2.
the following code works fine if I deploy the application in a local, single server
InitialContext ctx = new InitialContext();
(MBeanServer) ctx.lookup("java:comp/env/jmx/domainRuntime");
but once deployed to cluster it fails ( NamingException)
looking at the JNDI tree, I see that jmx/domainRuntime is available only in the adminserver.
so basically that is the reason of my question, how that access that resource in the adminserver if the application is in server 1 or 2.
thanks in advance.