Hello all,
I'm developing applications in JBOss 4.0 (resource adapter and web application).
I need to find out the listenning host and port of the JBoss instance in runtime.
I've found following way to calculate the host:
MBeanServer server = MBeanServerLocator.locateJBoss();
ObjectName serverInfoObjectName = new ObjectName("jboss.system:type=ServerInfo");
host = (String)server.getAttribute(serverInfoObjectName, "HostAddress");
Is it a correct way?
How can I calculate the listenning port?
Thanks a lot. Victor.