Based on some investigative work done this week, a little nugget of information has popped out regarding the best way to get a reference to an MBeanServer from an application deployed to OC4J.
There as two standard methods that can be used to get a reference to an MBeanServer:
newMBeanServer method in preference to the createMBeanServer method.
The newMBeanServer method can be used in two ways:
This will return a reference to the OC4J global MBeanServer that is wrapped with an interceptor that will ensure that all MBeans registered by the application are registered under a domain named after the application, and that all accessed MBeans are either application MBeans, or dependent resources.
Will create an application specific MBeanServer with the supplied domain name.