12.4. MBeans

12.4.1. Log MBean
12.4.2. Kodo Pooling DataSource MBean
12.4.3. PreparedStatement Cache MBean
12.4.4. Query Cache MBean
12.4.5. Datastore Cache MBean
12.4.6. TimeWatch MBean
12.4.7. Runtime MBean
12.4.8. Profiling MBean

12.4.1. Log MBean

The Log MBean allows for remote monitoring of Log messages (see Chapter 3, Logging). The MBean has a single Notification that, if listened to, will add an appender to the root logger that will send log messages as notifications. This MBean currently only provides log messages when using the Log4J logging service. The name of the Log MBean is kodo:type=log,name=LogMBean.

12.4.2. Kodo Pooling DataSource MBean

The Kodo Pooling DataSource (see Section 4.1, “Using the Kodo JDO DataSource”) is managed by an MBean. The name of the MBean is kodo:type=PoolingDataSource.

The Kodo DataSource has a number of Attributes which allow for viewing / editing of pool settings, and viewing of pool statistics. The Kodo Pooling DataSource also has a number of Statistic Notifications.

12.4.3. PreparedStatement Cache MBean

The PreparedStatement Cache (see MaxCachedStatements under Section 4.1, “Using the Kodo JDO DataSource”) is managed by an MBean. The name of the MBean is kodo:type=PreparedStatementCache.

The cache has a single MaxCachedStatements Attribute for viewing / editing the number of statements to cache, and a number of Attributes for viewing cache statistics. The cache also has a number of Statistic Notifications.

12.4.4. Query Cache MBean

The Query Cache (see Section 14.3.3, “Query Caching”) is managed by an MBean. The name of the MBean is kodo:type=QueryCacheImpl.

The cache has a CacheSize Attribute for viewing / editing the size of the LRU cache, and a SoftReferenceSize Attribute for editing the size of the soft cache. It also has a number of Attributes for viewing cache statistics. The cache also has a clear operation and a number of Statistic Notifications.

12.4.5. Datastore Cache MBean

Each Datastore Cache (see Section 14.3, “Datastore Cache”) is managed by an MBean. The name of the MBean is kodo:type=DataCacheImpl,name=<cache name> where <cache name> is the name of the cache as defined in data-cache metadata extension (see Section 6.2.4.7, “data-cache”).

Each cache has a number of Attributes which allow for viewing / editing of cache settings, and viewing of cache statistics. Each cache also has a number of Statistic Notifications.

12.4.6. TimeWatch MBean

Each TimeWatch Statistic is managed by an MBean. For information on creating TimeWatch Statistics, see TimeWatch and KodoTimeWatchManager in the Kodo Javadoc. The name of the MBean is kodo.TimeWatch:type=stat,name=<watchable name>, stat=<block name> where <watchable name> is the name of the TimeWatch and where <block name> is the name of the named code block.

12.4.7. Runtime MBean

The Runtime MBean allows for remote monitoring of the JVM Runtime in which Kodo is running. The MBean provides attributes for viewing the amount free memory available, and the total memory allocated to the JVM. It also has Statistic Notifications for free and total memory. The name of the Log MBean is kodo:type=runtime.

12.4.8. Profiling MBean

The Kodo Profiling MBean allows for profiling of application code. It is designed to help optimize the use of Kodo, and is not intended to be a generic profiling tool. Only Kodo specific APIs are instrumented. This section describes how to setup the profiling capability within the Kodo Management Console. For more information about the profiling capability, see Section 14.7, “Profiling”.

To use the Profiling MBean, perform the following steps:

The MBean Panel contains a custom viewer when the Profiling MBean is selected. This custom viewer contains the Kodo Profiling Console. Additionally, the console toolbar will have profiling toolbar options. Please see Section 14.7, “Profiling” for more information.