JPOX
JPOX
 Project  |  Ver 1.1  |  Ver 1.2  |  JDO  |  JPA  |  Guides  |  Tools
1.2 | Persistence | JDO ORM | JPA ORM | Runtime | JDO Runtime | JPA Runtime | Extensions | Developer
JPOX Runtime
RDBMS Datastores
DB4O Datastore
Management

JPOX provides MBeans that can be used to monitor, manage and configure JPOX at runtime. More about JMX here. To enable this you must specify the persistence property org.jpox.managedRuntime as true when creating the PMF/EMF.

JPOX MBeans are registered in a MBean Server when JPOX is started up (e.g. upon JDO PMF or JPA EMF instantiation). To see the full list of JPOX MBeans, refer to the javadocs.

MBean Servers
Plug-inDescription
org.jpox.management.platformJVM Platform MBean Server.
org.jpox.management.mx4jThe MX4J JMX MBean Server implementation.




Usage with JRE 1.5 MBean Server

A MBean server is bundled with Sun JRE since its version 1.5, and you can easily activate JPOX MBeans registration by adding the JPOX Management Platform plugin (org.jpox.management.platform) found in jar jpox-management-{version}.jar to the classpath.

Additionaly, setting a few system properties are necessary for configuring the Sun JMX implementation. The minimum properties required are the following:

  • com.sun.management.jmxremote
  • com.sun.management.jmxremote.authenticate
  • com.sun.management.jmxremote.ssl
  • com.sun.management.jmxremote.port=<port number>

Usage example:

java -cp TheClassPathInHere
     -Dcom.sun.management.jmxremote
     -Dcom.sun.management.jmxremote.authenticate=false
     -Dcom.sun.management.jmxremote.ssl=false
     -Dcom.sun.management.jmxremote.port=8001
     TheMainClassInHere

Once you start your application and JPOX is initialized you can browse JPOX MBeans using a tool called jconsole (jconsole is distributed with the Sun JDK) via the URL:

service:jmx:rmi:///jndi/rmi://hostName:portNum/jmxrmi

Note that the mode of usage is presented in this document as matter of example, and by no means we recommend to disable authentication and secured communication channels. Further details on the Sun JMX implementation and how to configure it properly can be found in here.



Usage with MX4J MBean Server

JPOX provides a plugin for MX4J, and you should add this plugin (org.jpox.management.mx4j) found in jar jpox-mx4j-{version}.jar to the classpath.