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...
http://www.jboss.org/file-access/default/members/jbosscache/freezone/docs...
(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&...]