HHH-4546 add JPA 2.0 locking. Javadoc change.

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@18054 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Scott Marlow 2009-11-25 00:05:08 +00:00
parent ceaea5a2a3
commit dfffe73198
1 changed files with 3 additions and 2 deletions

View File

@ -552,8 +552,9 @@ public interface Session extends Serializable {
public void lock(String entityName, Object object, LockMode lockMode) throws HibernateException; public void lock(String entityName, Object object, LockMode lockMode) throws HibernateException;
/** /**
* Build a lockRequest that specifies the LockMode, pessimistic lock timeout and lock scope. * Build a LockRequest that specifies the LockMode, pessimistic lock timeout and lock scope.
* timeout and scope is ignored for optimistic locking. * timeout and scope is ignored for optimistic locking. After building the LockRequest,
* call LockRequest.lock to perform the requested locking.
* *
* Use: session.buildLockRequest(). * Use: session.buildLockRequest().
* setLockMode(LockMode.PESSIMISTIC_WRITE).setTimeOut(1000 * 60).lock(entity); * setLockMode(LockMode.PESSIMISTIC_WRITE).setTimeOut(1000 * 60).lock(entity);