You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Rick Curtis (JIRA)" <ji...@apache.org> on 2010/10/19 23:02:27 UTC

[jira] Created: (OPENJPA-1844) Create a JConsole plugin to display DataCache statistics and help tune the cache

Create a JConsole plugin to display DataCache statistics and help tune the cache
--------------------------------------------------------------------------------

                 Key: OPENJPA-1844
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1844
             Project: OpenJPA
          Issue Type: Improvement
          Components: datacache, instrumentation
            Reporter: Rick Curtis
            Assignee: Rick Curtis
             Fix For: 2.1.0


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.


[jira] Commented: (OPENJPA-1844) Create a JConsole plugin to display DataCache statistics and help tune the cache

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924708#action_12924708 ] 

Donald Woods commented on OPENJPA-1844:
---------------------------------------

Add code to handle different location of jconsole.jar on MacOSX in r1027257.

> Create a JConsole plugin to display DataCache statistics and help tune the cache
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1844
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1844
>             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.


[jira] Commented: (OPENJPA-1844) Create a JConsole plugin to display DataCache statistics and help tune the cache

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923501#action_12923501 ] 

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: https://issues.apache.org/jira/browse/OPENJPA-1844
>             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.


[jira] Commented: (OPENJPA-1844) Create a JConsole plugin to display DataCache statistics and help tune the cache

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12926326#action_12926326 ] 

Rick Curtis commented on OPENJPA-1844:
--------------------------------------

With revision 1028808 I committed all of the changes for the JConsole plugin to openjpa-tools... but I messed up the commit message. See OPENJPA-1801 for the commit. I took a 180 from my original commit as I removed the dependency on ANY runtime code and now it can run in a true standalone fashion.

[java_home]\bin>jconsole.exe -pluginpath openjpa-tools-0.1.0-SNAPSHOT.jar

A few things to note:
 * This plugin is now completely independent from the OpenJPA runtime code. I had to make use of java.util.ResourceBundle and java.text.MessageFormat for localization of strings.
 * To launch the plugin you no longer need to specify the classpath.
 * I added org.apache.openjpa.jconsole.DataCacheMBean interface which includes a subset of the runtimes MBean interface(org.apache.openjpa.instrumentation.jmx.DataCacheJMXInstrumentMBean). I did this as a convenience so I could use JMX.newMBeanProxy(...), rather than using the 'reflection' way of invoking MBean methods.


> Create a JConsole plugin to display DataCache statistics and help tune the cache
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1844
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1844
>             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.


[jira] Commented: (OPENJPA-1844) Create a JConsole plugin to display DataCache statistics and help tune the cache

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925004#action_12925004 ] 

Donald Woods commented on OPENJPA-1844:
---------------------------------------

trunk/openjpa-tools would be the only other place, which would get pulled into the zip and openjpa-all.jar and/or openjpa.jar

> Create a JConsole plugin to display DataCache statistics and help tune the cache
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1844
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1844
>             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.


[jira] Updated: (OPENJPA-1844) Create a JConsole plugin to display DataCache statistics and help tune the cache

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Curtis updated OPENJPA-1844:
---------------------------------

    Attachment: screenshot.jpg

Attaching a screenshot of the JConsole UI.

> Create a JConsole plugin to display DataCache statistics and help tune the cache
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1844
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1844
>             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.


[jira] Commented: (OPENJPA-1844) Create a JConsole plugin to display DataCache statistics and help tune the cache

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924979#action_12924979 ] 

Rick Curtis commented on OPENJPA-1844:
--------------------------------------

@Pinaki - Agreed. Any suggestions?

> Create a JConsole plugin to display DataCache statistics and help tune the cache
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1844
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1844
>             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.


[jira] Commented: (OPENJPA-1844) Create a JConsole plugin to display DataCache statistics and help tune the cache

Posted by "Jeremy Bauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925385#action_12925385 ] 

Jeremy Bauer commented on OPENJPA-1844:
---------------------------------------

I think the JConsole/Swing code should be pulled out of kernel and included into a new trunk/openjpa-tools submodule.  I don't think the tools artifacts should go into the base openjpa.jar, but wouldn't be opposed to putting it into the openjpa-all jar.  Also, I think the binary distribution zip should include the tools jar along side the openjpa and openjpa-all jars.

> Create a JConsole plugin to display DataCache statistics and help tune the cache
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1844
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1844
>             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.


[jira] Commented: (OPENJPA-1844) Create a JConsole plugin to display DataCache statistics and help tune the cache

Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924694#action_12924694 ] 

Donald Woods commented on OPENJPA-1844:
---------------------------------------

The following doesn't work on Mac OSX -
        <dependency>
            <groupId>sun.jconsole</groupId>
            <artifactId>jconsole</artifactId>
            <version>1.6.0</version>
            <scope>system</scope>
            <systemPath>${java.home}/../lib/jconsole.jar</systemPath>
        </dependency>
as there is no JRE vs. JDK separation.  Instead it needs to be -
            <systemPath>${java.home}/lib/jconsole.jar</systemPath>


> Create a JConsole plugin to display DataCache statistics and help tune the cache
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1844
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1844
>             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.


[jira] Commented: (OPENJPA-1844) Create a JConsole plugin to display DataCache statistics and help tune the cache

Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924758#action_12924758 ] 

Pinaki Poddar commented on OPENJPA-1844:
----------------------------------------

While I like the feature, there must be a better way than to bring  JConsole dependency to openjpa kerne



> Create a JConsole plugin to display DataCache statistics and help tune the cache
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1844
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1844
>             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.