• 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Record Locking. Implementation

 
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
What are the different methods though which we can have Record Locking in J2EE web application so that same record is not edited by more than teo users at a time.
Thanks for the time.
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a classic problem in all web development, not just J2EE. The best treatment that I have seen for this problem can be found in Martin Fowler's Masterpiece: Patterns of Enterprise Application Architecture. The two patterns you are going to be interested in reading are: Optimistic Offline Lock and Pessimistic Offline Lock. The best advice that I can give you is to pick up a copy of this book.
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
For record locking mechanism, u can use isolation levels.The isolation level called TRNSACTION_SERIALIZABLE would take care of locking mechanism so that it wud prevent dirty reads and phantom reads.
Since this incurs some resource overhead u can go in for optimistic or pessimistic locking.
Cheers
Geeta
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic