File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
It's not a secret anymore!