This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes How EJB handles DB Locking ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How EJB handles DB Locking ?" Watch "How EJB handles DB Locking ?" New topic
Author

How EJB handles DB Locking ?

subramanian annamalai
Greenhorn

Joined: Mar 06, 2005
Posts: 22
Hi,

How EJB Handles Database Locking ? like for example Optimistic locking.

Please explain me.

Thanks
Subu
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Subramanian,

Data concurrency is a complex subject and usually it is achieved through specific database technologies and transaction isolation levels. However there are other vendor specific strategies. WebLogic for example has four concurrency strategies:
  • Exclusive
  • Database
  • Read-only
  • Optimistic


  • The default is the database concurrency strategy, which will delegate the responsibility of data locking to the underlying database system.
    The optimistic strategy enforces concurrency using the classic client/server approach of ensuring that the data have not been changed by other clients during the transaction. This of course works only with CMP and for each update the container will issue a query like this:

    Regards.


    I think, therefore I exist -- Rene Descartes
     
    I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
     
    subject: How EJB handles DB Locking ?
     
    It's not a secret anymore!