• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Distributed ReadWriteLock wanted

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 443
3
Eclipse IDE C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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/
 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i think it can also be achieved by using the DistributedLockManagerin JGroups
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic