Community
Participate
Working Groups
When trying to 'SELECT FOR UPDATE NOWAIT' using JPA on an Oracle DB, if the lock wasn't acquired then a PessimisticLockException is thrown instead of a LockTimeoutException, which is the expected exception (thrown in any other case where the timeout is larger than 0). This causes the JTA transaction to be marked for rollback (as written in the PessimisticLockException's documentation), but it really shouldn't do that. Code example: props.put("javax.persistence.lock.timeout", 0); em.find(MyEntity.class, id, LockModeType.PESSIMISTIC_READ, props); It also happens when running a native query. The following code will produce the expected behavior, but it requires invoking EclipseLink's specific classes: em.unwrap(Session.class).executeQuery(((JpaQuery)query).getDatabaseQuery()) btw, I'm not 100% sure about my EclipseLink version. I'm using the default EclipseLink which comes with Weblogic 12.1, and in the logs it says it's version 2.3.2.
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink