Issue Details (XML | Word | Printable)

Key: HB-1396
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Steve Ebersole
Reporter: Michael Kopp
Votes: 0
Watchers: 0
Operations

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

JBoss Cache as MBean

Created: 20/Jan/05 07:23 AM   Updated: 07/Mar/05 06:35 AM
Component/s: core
Affects Version/s: 2.1.7
Fix Version/s: 2.1.9, 3.0 final

Time Tracking:
Not Specified


 Description  « Hide
The JBoss Tree Cache can be used as an MBean. I would like to have the possibility to reference an existing JBossCache MBean instance instead of creating a new one.

Actually that should be an easy change.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Steve Ebersole added a comment - 20/Jan/05 09:21 AM
JBoss already contains a Hibernate CacheProvider meant for this purpose (org.jboss.hibernate.cache.DeployedTreeCacheProvider).

It relies on a TreeCache being available through JNDI, which was a feature added to JBoss TreeCache MBean (although, certainly, anything could bind TreeCache into JNDI). That particular feature is being removed from the latest TreeCache.

At some point, I will move that provider over to the Hibernate source tree, based on the refactorings I did in the Cache/CacheProvider structure.

In the meantime, feel free to use the Provider I mentioned above.

I'll leave this case open lest I forget to do that source move.

Steve Ebersole added a comment - 05/Mar/05 10:36 PM
Hibernate now contains a new CacheProvider named JndiBoundTreeCacheProvider. Its purpose is to locate an existing TreeCache instance from a JNDI lookup and use that as the backing for the 2nd level cache. Also, be sure to set the new hibernate.cache.jndi property to the JNDI namespace where the TreeCache instance is bound.

Michael Kopp added a comment - 07/Mar/05 12:32 AM
Good, but as TreeCache does not support JNDI anymore, the registration there has to be done by some extra piece of code?

Steve Ebersole added a comment - 07/Mar/05 06:35 AM
Well, as I have mentioned numerous times JBoss has its own hibernate cache provider, which will be re-purposed to use a deployed tree cache mbean "directly"; meaning you will simply configure the ObjectName for the tree cache hibernate shoulld use as its 2nd level cache.

That is all JBoss specific, the JNDI piece is AS-agnostic.