should help. Perhaps particularly:
import org.jboss.mx.util.MBeanServerLocator; ... // find the local MBeanServer MBeanServer server = MBeanServerLocator.locateJBoss();
I have tried this method and now that I have time I retested on 4.0.1 vs 4.0.2, it seems something has changed between these 2 implementation, JMX wise that is.
I am running both server on 1.4.2_03 jre. The findMBeaServer works on 4.0.1 but not on 4.0.2.
Any thoughts or suggestions ?