This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Toplink locking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Toplink locking" Watch "Toplink locking" New topic

Toplink locking

Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152

Is there a default locking if we don't use locking explicitly in Toplink? If yes, is it pessimistic or optimistic.

James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
The default is not locking in TopLink and JPA. You should configure either optimistic locking or pessimistic locking.
Normally optimistic locking is recommended for web applications, but it depends on your locking requirements.


TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
I agree. Here's the link:
subject: Toplink locking
Similar Threads
Toplink witth JPA vs Toplink API
Oracle Objects JDBC vs Hibernate/Toplink
Is EJB is a solution
"exists" Clause on JPQL
how to cache objects MANUALLY