[jboss-user] [JBossCache] - Explicit locking?

aditsu do-not-reply at jboss.com
Tue May 22 07:08:06 EDT 2007


I'm using Jboss Cache 1.4.1 SP3 (TreeCache). Is there a way to lock a node explicitly?
I want to have a process that contains the cache, and other processes connect to it and perform operations. One desired operation would be "get and lock", and another one would be "update and release".

I saw that the cache does internal locking (with transactions), but I don't know how to handle that in the situation described above. Which process begins and commits the transaction, and how can they work together?

I also found "acquire" and "release" methods in the Node class, but they seem to be undocumented, they're just "not to be exposed", whatever that means o_O
The acquire methods have a timeout parameter, but I'm not sure what it means. Is it the time to wait trying to acquire the lock? Or the maximum time to hold the lock? If it's the former, then how can I release locks automatically after a timeout period?

Thanks
Adrian

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

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



More information about the jboss-user mailing list