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.
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.
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.