openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard Mak" <>
Subject NamedQuery + LockModeType.NONE
Date Mon, 21 Jun 2010 16:52:14 GMT

I'm trying to get my NamedQuery to do SELECT *without* UPDLOCK with
OpenJPA 2.0.0. claims that I cannot
use LockModeType.NONE with NamedQuery.

e_locking_issues seems to contradict this with the following snippet:

OpenJPAQuery q = em.createNamedQuery("findEmployeeById"); 
FetchPlan fp = q.getFetchPlan();

Can anyone answer the following [or direct me to the right forum]?

Q1.	Is the JIRA claim [that LockModeType.NONE no longer works]

Q2.	What is the difference between
Query.getFetchPlan().setReadLocKMode(NONE) [specific to OpenJPA] +
Query.setLockMode(NONE) [available in JPA API]?

Q3.	Even when I do FetchPlan.setReadLockMode(NONE), I still get the

	openjpa.MetaData <WARN   > Encountered a read lock level less
than LockModeType.READ when processing the NamedQuery annotation "..."
in class "...". Setting query lock level to LockModeType.READ

	Can we change AnnotationPersistenceMetaDataParser to make this
log suppressable?
	Perhaps introduce a compatibility flag that will respect
@NamedQuery(lockMode=NONE) as is?

Thanks for any help. 

- Howard

This email and any files transmitted with it are confidential and intended solely for the
use of the individual or entity to whom they are addressed. Please note that any views or
opinions presented in this email are solely those of the author and do not necessarily represent
those of the company. Finally, the recipient should check this email and any attachments for
the presence of viruses. The company accepts no liability for any damage caused by any virus
transmitted by this email. If you have received this email in error please delete it and notify
the system administrator at

View raw message