[jboss-dev-forums] [Design of POJO Server] - Re: Locking in DeploymentRepository

jason.greene@jboss.com do-not-reply at jboss.com
Fri Mar 6 15:46:55 EST 2009


It sounds like you need a simple flag, or alternatively a latch instead of a lock:
http://anonsvn.jboss.org/repos/jbosscache/core/trunk/src/main/java/org/jboss/cache/util/concurrent/ReclosableLatch.java

If you really want a lock that can be shared across threads, in order to conform to the Lock interface, you need to use a thread local. Manik and I created one specific to jboss cache transactional locks here (you can derive from it if you like):

http://anonsvn.jboss.org/repos/jbosscache/core/trunk/src/main/java/org/jboss/cache/util/concurrent/locks/OwnableReentrantLock.java

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

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



More information about the jboss-dev-forums mailing list