• Post Reply Bookmark Topic Watch Topic
  • New Topic

Distributed ReadWriteLock wanted

 
John Vilkovich
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Our app runs on Tomcat. During execution the application runs various jobs. Some jobs relay on the same resources, so they need acquire the lock before running (read or write, depending on semantics). I�ve used ReentrantReadWriteLock from java.util.concurrent.locks to implement this.
This works for the single instance of Tomcat. But we decided to run the app on several instances of the tomcat.
Is there any implementation of ReadWriteLock mechanism that I could use for my case?
I suppose it should use database to store lock information.
Thanks.
 
Chris Hurst
Ranch Hand
Posts: 443
3
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Terracota does exactly what you want and I believe its already been integrated with Tomcat. Its pretty straight forward to use as well.

http://www.terracotta.org/
 
narendra darlanka
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i think it can also be achieved by using the DistributedLockManagerin JGroups
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!