[jboss-user] [Management, JMX/JBoss] - find mbean server - example of code not JBoss specific.
michele.curioni
do-not-reply at jboss.com
Tue Jan 16 12:14:35 EST 2007
Hi all,
I discovered that in the JVM that runs Jboss there can be more than one instances of MBeanServer.
This creates a problem when the code doesn't use JBoss specific classes to look up on of these instances.
If I use the following code I can get more than one instance back:
List list = MBeanServerFactory.findMBeanServer(null);
if (!list.isEmpty()) {
MBeanServer server = (MBeanServer) list.iterator().next();
....
}
Say that I run this code inside JBoss, I want my code to use JBoss own MBeanServer.
How to do that, and keep the code vendor agnostic?
Thanks,
Michele
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002357#4002357
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002357
More information about the jboss-user
mailing list