All locking provided implementations assume the underlying database supports (and that the connection is in) at least read-committed transaction isolation. The most glaring exclusion to this is HSQLDB which only offers support for READ_UNCOMMITTED isolation.
org.hibernate.dialect.Dialect#getLockingStrategy
| Modifier and Type | Method and Description |
|---|---|
| public void | lock(Serializable
The id of the row to be locked id, Object The current version (or null if not versioned) version, Object The object logically being locked (currently not used) object, int timeout in milliseconds, 0 = no wait, -1 = wait indefinitely timeout, SharedSessionContractImplementor The session from which the lock request originated session)Acquire an appropriate type of lock on the underlying data that will endure until the end of the current transaction. |
| lock | back to summary |
|---|---|
| public void lock(Serializable id, Object version, Object object, int timeout, SharedSessionContractImplementor session) throws StaleObjectStateException, LockingStrategyException Acquire an appropriate type of lock on the underlying data that will endure until the end of the current transaction.
| |