This sample shows how to use the Kodo JMX Management technology preview.
In order to see an example of remote management:
Ensure that the Kodo distribution root directory is in your CLASSPATH
Ensure that an appropriate kodo.properties is in a directory in your CLASSPATH or in the root level of a jar in your CLASSPATH
Ensure that your CLASSPATH has all of the jars distributed with Kodo
javac *.java
jdoc package.jdo
mappingtool -action refresh package.jdo
java samples.management.SeedDatabase
Add the following line to your kodo.properties file:
kodo.ManagementConfiguration: remote-mgmt
In one window, run: java samples.management.ManagementSampleRemote
Within a few seconds, in a second window, run: remotejmxtool
The Kodo ProfilingAgent also has a JMX MBean. You can see an example of remote profiling if you turn on the ProfilingAgent by making the following setting in your kodo.properties file:
kodo.ManagementConfiguration: remote-mgmt-prof
The Kodo ProfilingAgent also has a local mode. You can see an example of local profiling if you turn on the ProfilingAgent by making the following setting in your kodo.properties file:
kodo.ManagementConfiguration: profiling-gui
A fetch group g has been pre-configured in the package.jdo file. You can turn on the usage of that fetch group in the example by adding the following setting to your kodo.properties file:
kodo.FetchGroups: g
Note that the Kodo PersistenceManagerFactory DataCache also has a JMX MBean. You can see an example of DataCache management if you turn on the data cache by adding the following settings to your kodo.properties file:
kodo.DataCache: true
kodo.RemoteCommitProvider: sjvm
An example of how to use the TimeWatch can be found in QueryThread.java. A TimeWatch allows for monitoring of named code blocks.