History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CACHE-178
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Lars Torunski
Reporter: Christoph Kutzinski
Votes: 2
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
OSCache

JMX Monitoring/Administration via Spring

Created: 08/Jun/05 05:16 AM   Updated: 01/May/07 11:01 AM
Component/s: Base Classes
Affects Version/s: 2.1.1
Fix Version/s: 2.4

File Attachments: 1. Text File StatisticListenerImpl JMX Spring Notes.txt (1 kb)
2. Java Source File StatisticListenerImpl.java (9 kb)

Environment: All
Issue Links:
Related
 
This issue is related to:
CACHE-21 Cache manager Minor Open


 Description  « Hide
JMX has (IMO) become a de-facto standard for configuration and management tasks in java environments. It is already supported by many other open source projects (Tomcat, Hibernate, ...).

So:
It would be great if OSCache would offer some JMX MBeans (and register them) for various monitoring and administration tasks.
Some ideas for infos/operations:

- Hit/Miss/Expired-statistics
- configuration of cache sizes/expiry patterns etc.
- cache flushes: single items, full cache, multiple items based on a regular expression over the cache-key

There are surely much more useful operations that could be integrated, but these would be great as a start.

 All   Comments   Change History      Sort Order:
Christoph Kutzinski - [08/Jun/05 05:24 AM ]
This is related to this issue.
http://jira.opensymphony.com/browse/CACHE-21
However this request goes further and asks specifically for JMX.



Lars Torunski - [11/Jul/05 02:48 PM ]
Hit/Miss/Expired-statistics can be based on http://wiki.opensymphony.com/display/CACHE/Statistics

Ashleigh Gordon - [11/Oct/06 08:24 PM ]
Based on the code in http://wiki.opensymphony.com/display/CACHE/Statistics, it is fairly easy to expose the stats as attributes, which would be a start. Maybe make something like the way org.hibernate.jmx.StatisticsService is done, so you can choose to enable/disable statistics (with them disabled by default). I'd be happy to create a patch and do some doco on using it if people are interested.

Ashleigh Gordon - [11/Oct/06 09:30 PM ]
Looks like the stats are already collected by:

CacheMapAccessEventListenerImpl
CacheEntryEventListenerImpl
ScopeEventListenerImpl

All that remains is to work out a way of getting a reference to those classes so they can be exposed via JMX.

Ashleigh Gordon - [11/Oct/06 10:31 PM ]
JMX version of StatisticListenerImpl.java example. This version uses static counters so that a reference to the listener is not needed. This enables the stats to be accessed the same way regardless of how oscache is integrated. Please see the attachment "StatisticListenerImpl JMX Spring Notes.txt" for notes on how to integrate this with Spring JMX.

Ashleigh Gordon - [11/Oct/06 10:33 PM ]
Notes on how to expose the OsCache statistics via JMX.

Lars Torunski - [13/Oct/06 02:01 PM ]
Thanks for the source code and the infos.

Lars Torunski - [17/Feb/07 06:55 AM ]
The JMX Monitor class is available by the current SVN revision 403.

Lars Torunski - [17/Feb/07 07:04 AM ]
Christoph, can you improve or enhance the wiki documentation http://wiki.opensymphony.com/display/CACHE/JMX+Monitoring ?