Details
-
Enhancement
-
Resolution: Done
-
Major
-
7.12.0.Final
-
1
-
NEW
-
NEW
-
2018 Week 39-41
Description
JpaProcessPersistenceContext.findProcessInstanceInfo() uses LockModeType.PESSIMISTIC_FORCE_INCREMENT
LockModeType.PESSIMISTIC_FORCE_INCREMENT always issues "select for update" with "nowait".
The request is to be able to:
- Use "select for update" without "nowait"
- Use "javax.persistence.lock.timeout" as a hint of pessimistic lock timeout. (Only feasible to some databases. https://docs.oracle.com/javaee/7/tutorial/persistence-locking002.htm#GKJIU)
It would be likely to change from LockModeType.PESSIMISTIC_FORCE_INCREMENT to LockModeType.PESSIMISTIC_WRITE.
This change would break backward compatibility so please introduce this feature with a environment entry switch e.g. "org.kie.api.persistence.pessimistic.wait" (= if you don't give the entry, the default behaviour would be the same ... "select for update nowait").
Additional note: PostgreSQLDialect (even PostgreSQL itself) doesn't support time based wait so the timeout value is meaningless.
However, this enhancement is still useful because users can choose "select for update" without "nowait".
Attachments
Issue Links
- clones
-
RHPAM-1573 Able to lock without "nowait" for jBPM pessimistic locking
- Closed