openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <>
Subject [jira] Commented: (OPENJPA-1844) Create a JConsole plugin to display DataCache statistics and help tune the cache
Date Thu, 21 Oct 2010 16:28:14 GMT


Rick Curtis commented on OPENJPA-1844:

A few comments for the initial code drop:
 - Look closely at the DataCacheManager changes. I added the ability to selectively start/stop
caching a certain type.
 - Look closely at MetaDataRepository/ClassMetaData changes. I added a mapping of {String
class name] -> java.lang.Class.

There are still a few todos:
 - There are a number of strings in the plugin code that should be localized
 - Still need to add some unit tests for the new runtime changes.
 - Need to add doc.

For any early tire kickers out there, here are the steps needed to get this plugin working
(in JSE). I'm going to recommend using the Sun JVM for now.
- Start a JPA application with openjpa.Instrumentation enabled for the DataCache[1].
- After a EntityManager is created, launch the jconsole[2].
- If you haven't enabled DataCache statistics, check the enable statistics box.

[1] <property name="openjpa.Instrumentation" value="jmx(Instrument='DataCache,QueryCache')"/>
[2] [java_home]\bin>jconsole.exe -pluginpath openjpa-all-2.1.0-SNAPSHOT.jar -J-Djava.class.path=..\lib\jconsole.jar;..\lib\tools.jar;openjpa-all-2.1.0-SNAPSHOT.jar

> Create a JConsole plugin to display DataCache statistics and help tune the cache
> --------------------------------------------------------------------------------
>                 Key: OPENJPA-1844
>                 URL:
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: datacache, instrumentation
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.1.0
>         Attachments: screenshot.jpg
> I have created a simple JConsole plugin that will enable a OpenJPA user to view DataCache
statistics and it also allows for some runtime interactions with the cache. These changes
are going to come in two parts. The first part will be the plugin side of changes and second
part is going to come via another JIRA which will feature the OpenJPA core runtime changes.
> The features that I have currently implemented are:
>  - A view of cache hits, reads, and writes.
>  - A button to evict the entire contents of the cache.
>  - A button to reset the statistics.
>  - A check box to enable / disable statistics gathering
>  - The ability to disable / enable caching specific types.
> I would like to add the following features:
>  - Show the current DataCache configuration and show what (if any) changes have been
made at runtime (ie: Stopped caching a certain type).
>  - Allow changing the cache size.
>  - Evict only a certain type.
>  - Make some cute bar charts for hit/miss ratio.
> This works both in a JSE environment and in a WebSphere environment(sans security). I'll
add more details on how to run jconsole with the plugin once I have some code committed.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message