These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Using TreeCacheListener with JBoss-Cache
PostPosted: Wed Jun 29, 2005 1:08 pm 
Newbie

Joined: Sat Feb 05, 2005 8:15 pm
Posts: 2
Hibernate version:2.1.8

I'm using JBoss-Cache as the second level cache in Hibernate. The application is deployed across two nodes and the treecache.xml file has appropriate settings to enable asynchronous replication (REPL_ASYNC)

The problem is that state is maintained in an application cache also, there is no way to change this (legacy code). When a cache update (or insert) is received by the JBoss-Cache through cache replication, I need to propagate the change to my application cache. I found that I could do this by registering for cache events using the TreeCacheListener interface, however I can't figure out how to register my implementation of the TreeCacheListener with TreeCache. AFAIK the only way to register a listener is by calling TreeCache.addListener() - since I'm using Tree-Cache behind hibernate I don't have a reference to the TreeCache object. Is there a way to get a reference to the TreeCache object from Hibernate? I can always change the scope of net.sf.cache.TreeCache.cache from private to public static but would rather not play with the code if avoidable

I'm cross-posting to the jbosscache forum to find out if they have a solution...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.