This content has been marked as final.
Show 6 replies
-
1. Re: Programmatic MBean access under JBoss AS 7.1 via jmx to find servername, hostname and port in JBoss AS 7
pmm Sep 22, 2014 11:51 AM (in response to sarfaraz-alam.md)Do you need local (same VM) or remote JMX acccess?
-
2. Re: Programmatic MBean access under JBoss AS 7.1 via jmx to find servername, hostname and port in JBoss AS 7
sarfaraz-alam.md Sep 22, 2014 12:29 PM (in response to pmm)Hello Philippe,
I needed same VM access? hope you understand my question that i posted originally.
-
3. Re: Programmatic MBean access under JBoss AS 7.1 via jmx to find servername, hostname and port in JBoss AS 7
pmm Sep 23, 2014 3:48 AM (in response to sarfaraz-alam.md)The code that should access the MBeans, does it run inside JBoss or does it run in a separated process (and JVM) that tries to connect to JBoss?
-
4. Re: Programmatic MBean access under JBoss AS 7.1 via jmx to find servername, hostname and port in JBoss AS 7
sarfaraz-alam.md Sep 23, 2014 3:53 AM (in response to pmm)Hello Philippe,
The code is inside a war file which is deployed in Jboss server.
-
5. Re: Re: Programmatic MBean access under JBoss AS 7.1 via jmx to find servername, hostname and port in JBoss AS 7
pmm Sep 23, 2014 5:37 AM (in response to sarfaraz-alam.md)Ok, very well. You should find most of the information in JMX. For example you can find the HTTP port with something similar to this:
MBeanServerConnection mbeanServerConnection = ManagementFactory.getPlatformMBeanServer(); ObjectName mbeanName = new ObjectName("jboss.as:socket-binding-group=standard-sockets,socket-binding=http"); mbeanServerConnection.getAttribute(mbeanName, "port");
If you explore the JMX tree in VisualVM you should find the other information you are looking for.
-
6. Re: Programmatic MBean access under JBoss AS 7.1 via jmx to find servername, hostname and port in JBoss AS 7
sarfaraz-alam.md Sep 23, 2014 6:23 AM (in response to pmm)Thanks Philippe,
The solution provided is working as expected.