[jboss-user] [JBossCache] - Recipe for serial read ?

yuri.ushakov do-not-reply at jboss.com
Thu Jun 7 07:36:59 EDT 2007


Hello.

I can't seem to find a way to do serial reading, is there a commonly known solution for it?

In particular, I need to run a certain process in scope of cluster, but only one JVM should run it. For this I have a node /status, it has key "active" whose value is either "true" or "false". When JVMs start, each checks for the "active" flag, and if it's false, they run the process. And for only one JVM to run, they need to wait on the read lock, otherwise all of them start the process, because they simultaneously read "false" from the node.

I'm doing reading and writing within a DummyUserTransaction, and I tried multiple variations - pessimistic/serialisable, optimistic, etc - sooner or later there a case of mis-synchronisation on the cache data.

Thanks for any tips,
Yuri

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052071#4052071

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052071



More information about the jboss-user mailing list