openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r936440 - in /openjpa/branches/2.0.x: ./ openjpa-project/src/doc/manual/ref_guide_runtime.xml
Date Wed, 21 Apr 2010 18:54:35 GMT
Author: curtisr7
Date: Wed Apr 21 18:54:35 2010
New Revision: 936440

URL: http://svn.apache.org/viewvc?rev=936440&view=rev
Log:
OPENJPA-1604: Doc update.

Modified:
    openjpa/branches/2.0.x/   (props changed)
    openjpa/branches/2.0.x/openjpa-project/src/doc/manual/ref_guide_runtime.xml

Propchange: openjpa/branches/2.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Apr 21 18:54:35 2010
@@ -1,2 +1,2 @@
 /openjpa/branches/1.0.x:736493
-/openjpa/trunk:934507,935033,935035,935073-935074
+/openjpa/trunk:934507,935033,935035,935073-935074,936436

Modified: openjpa/branches/2.0.x/openjpa-project/src/doc/manual/ref_guide_runtime.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/2.0.x/openjpa-project/src/doc/manual/ref_guide_runtime.xml?rev=936440&r1=936439&r2=936440&view=diff
==============================================================================
--- openjpa/branches/2.0.x/openjpa-project/src/doc/manual/ref_guide_runtime.xml (original)
+++ openjpa/branches/2.0.x/openjpa-project/src/doc/manual/ref_guide_runtime.xml Wed Apr 21
18:54:35 2010
@@ -936,6 +936,24 @@ state in question to circumvent the data
 from issuing a locking SELECT in the first place.
                     </para>
                 </listitem>
+                <listitem>
+                    <para>
+When using the pessimistic lock manager and named queries you will see the following
+<literal>WARNING</literal> message logged if you do not specify a lockMode on
the named query
+or you explicitly set it to <literal>LockModeType.NONE</literal>. When using
the pessimistic
+lock manager a <literal>LockModeType.NONE</literal> will always be promoted to
<literal>LockModeType.READ</literal>.
+<programlisting>
+WARN   [main] openjpa.MetaData - Encountered a read lock level less than LockModeType.READ
when processing the NamedQuery annotation "findEmployeeById" in class "org.apache.openjpa.persistence.lockmgr.LockEmployee".
Setting query lock level to LockModeType.READ.
+</programlisting>
+If you are using the pessimistic lock manager and you truly do want to set the lock mode
to NONE for a
+given query, you can use a fetch plan to do so.
+<programlisting>
+OpenJPAQuery q = em.createNamedQuery("findEmployeeById"); 
+FetchPlan fp = q.getFetchPlan();
+fp.setReadLockMode(LockModeType.NONE);
+</programlisting>
+                    </para>
+                </listitem>                
             </itemizedlist>
         </section>
     </section>



Mime
View raw message