| From Stephen Fikes: “Aside from lock(), I think there is also an issue with EntityManager.find(...) which raises OptimisticLockException when using javax.persistence.LockModeType.PESSIMISTIC_WRITE (whether or not the entity has an optimistic version property). Per the JavaDoc [1] think it is supposed to be a PessimisticLockException (at least when not using a version property - not sure if it should differ when using a version property).” |