1.12. Management / Monitoring
Prev | Chapter 1. Kodo Sample Code | Next

## 1.12. Management / Monitoring

This sample shows how to use the Kodo Monitoring technology preview.

Steps to use:

- 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.monitoring.SeedDatabase`

- Add the following line to your `kodo.properties` file: `kodo.ManagementUI: gui`

- `java samples.monitoring.MonitorSample`

In order to see an example of remote monitoring:

- 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.monitoring.SeedDatabase`

- Add the following line to your `kodo.properties` file: `kodo.ManagementServer: true`

- In one window, run: `java samples.monitoring.MonitorSampleRemote`

- Within a few seconds, in a second window, run: `remotemanagementtool`

Note that the Kodo PersistenceManagerFactory DataCache also implements the Watchable interface. You can see an example of DataCache monitoring 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 Watchable can be found in `QueryThread.java`. A TimeWatch Watchable allows for monitoring named code blocks.

Prev | Up | Next
1.11. Example of full-text searching in JDO | Home | Part VII. Kodo Development Workbench Guide