Skip to content

Commit 3cb9867

Browse files
committed
add an @APinote to LockAcquisitionException and LockTimeoutException
1 parent 0b71d3b commit 3cb9867

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

hibernate-core/src/main/java/org/hibernate/exception/LockAcquisitionException.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
* A {@link JDBCException} indicating a problem acquiring a lock
1414
* on the database.
1515
*
16+
* @apiNote Some databases make it quite hard to for a client to
17+
* distinguish a {@linkplain LockTimeoutException lock timeout}
18+
* from other sorts of rejected lock acquisitions, and so
19+
* application programs should not over-interpret the distinction
20+
* made between {@code LockAcquisitionException} and its subclass
21+
* {@link LockTimeoutException} on such platforms.
22+
*
1623
* @author Steve Ebersole
1724
*/
1825
public class LockAcquisitionException extends PessimisticLockException {

hibernate-core/src/main/java/org/hibernate/exception/LockTimeoutException.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
* A {@link JDBCException} indicating that a {@linkplain org.hibernate.LockMode lock}
1313
* request timed out on the database.
1414
*
15+
* @apiNote Some databases make it quite hard to for a client
16+
* to distinguish a lock timeout from other sorts of rejected
17+
* lock acquisitions, and so application programs should avoid
18+
* over-interpreting the distinction made between
19+
* {@code LockTimeoutException} and its superclass
20+
* {@link LockAcquisitionException} on such platforms.
21+
*
1522
* @author Steve Ebersole
1623
*
1724
* @see org.hibernate.LockOptions#getTimeOut

0 commit comments

Comments
 (0)