1.13. JMX Management
Prev | Chapter 1. Kodo Sample Code | Next

## 1.13. JMX Management

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 lines to your `kodo.properties` file:

  `kodo.MBeanServerStrategy: any-create`

  `kodo.RemoteJMXAdaptor: mx4j-jrmp`

- 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 adding the following setting to your `kodo.properties` file:

- `kodo.ProfilingAgent: remote`

The Kodo ProfilingAgent also has a local mode. You can see an example of local profiling if you turn on the ProfilingAgent by adding the following settings to your `kodo.properties` file:

- `kodo.ProfilingAgent: local`

- `kodo.ProfilingInterface: 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.

Prev | Up | Next
1.12. Example of full-text searching in JDO | Home | 1.14. XML Store Manager