12.3. Accessing the MBeanServer from Code

You can access the MBeanServer in which the Kodo MBeans are registered KodoConfiguration interface's getMBeanServer method.

Example 12.1. Accessing the MBeanServer

JPA:

OpenJPAEntityManagerFactory kemf = OpenJPAPersistence.cast (emf);
MBeanServer mbServer = kemf.getConfiguration ().getMBeanServer ();

JDO:

KodoPersistenceManagerFactory kpmf = KodoJDOHelper.cast (pmf);
MBeanServer mbServer = kpmf.getConfiguration ().getMBeanServer ();

 

Skip navigation bar   Back to Top