It looks like this is an open JIRA[1] that has some changes already committed... since you're using WAS, I'd suggest going through support to see about getting an iFix.
Thanks, Rick [1] https://issues.apache.org/jira/browse/OPENJPA-2235 On Wed, Jan 16, 2013 at 8:53 AM, Venkataganesh Thoppae <tkvgan...@gmail.com>wrote: > Environment: OpenJPA 2.1 with Websphere 7.1/DB2. > > When one user is attempting to update a table, and another user is > attempting to read the same table (with no intent to update), we are > running into OptimisticLockException. > > If the read-only user used a native query with 'FOR FETCH ONLY with UR', we > are just fine. I am looking for an option with JPA which can impart the > same behavior, so far I have found none. > > query.setReadLockMode() doesn't seem to work. > > App Server isolation level is READ COMMITTED. And our tables are > non-versioned. > > Any thoughts would be helpful > -- *Rick Curtis*