Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Using LockModeType.PESSIMISTIC_READ as shared lock in PostgreSQL

Hi all.
 
I'm using PostgreSQL 9.4 with EL-2.6.0
 
I'm observing that when locking with LockModeType.PESSIMISTIC_READ, EclipseLink issues a "SELECT ... FOR UPDATE"-statement.
 
I would assume "SELECT ... FOR SHARE" would be used when locking with LockModeType.PESSIMISTIC_READ, and the docs seem to think so too: "LockModeType.PESSIMISTIC_READ represents a shared lock".
 
Is there a way to make EL issue a "SELECT ... FOR SHARE" lock in an JPQL-query?
 
Thanks.
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963

Back to the top