[jboss-user] [JBoss Cache] - jboss cache as hibernate 2nd level - cluster node doesn't persist replicated data

Sergey Graschenko do-not-reply at jboss.com
Tue Jun 8 16:15:42 EDT 2010


Sergey Graschenko [http://community.jboss.org/people/Sintetik7] created the discussion

"jboss cache as hibernate 2nd level - cluster node doesn't persist replicated data"

To view the discussion, visit: http://community.jboss.org/message/546892#546892

--------------------------------------------------------------
I'm trying to build an architecture basically described in user guide

 http://www.jboss.org/file-access/default/members/jbosscache/freezone/docs/3.2.1.GA/userguide_en/html/cache_loaders.html#d0e3090 http://www.jboss.org/file-access/default/members/jbosscache/freezone/docs/3.2.1.GA/userguide_en/html/cache_loaders.html#d0e3090

(Replicated caches with each cache having its own store.)

but having jboss cache configured as hibernate second level cache.


I've read manual for several days and played with the settings but could not achieve the result - the data in memory (jboss cache) gets _replicated_ across the hosts, but it's not _persisted_ in the datasource/database of the target (not original) cluster host.

I had a hope that a node might become persistent at eviction, so I've got a cache listener and attached it to @NoveEvicted event.
I found that though I could adjust eviction policy to fully control it, no any persistence takes place.

Then I had a though that I could try to modify CacheLoader to set "passivate" to true, but I found that in my case (hibernate 2nd level cache) I don't have a way to access a loader.


I wonder if replicated data persistence is possible at all by configuration tuning ?

If not, will it work for me to create some manual peristence in CacheListener (I could check whether the eviction event is local, and if not - persist it to hibernate datasource somehow) ?

I've used mvcc-entity configuration with the modification of cacheMode - set to REPL_ASYNC. I've also played with the eviction policy configuration.

Last thing to mention is that I've tested entty persistence and replication in project that has been generated with Seam. I guess it's not important though.

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/546892#546892]

Start a new discussion in JBoss Cache at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2052]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100608/9c1e9223/attachment-0001.html 


More information about the jboss-user mailing list