Author: awhite
Date: Mon Jan 29 12:11:43 2007
New Revision: 501171

URL: http://svn.apache.org/viewvc?view=rev&rev=501171
Log:
Fix documentation on openjpa.LockManager property.  Remove some redundant logic
from BrokerImpl.


Modified:
    
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
    incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml

Modified: 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java?view=diff&rev=501171&r1=501170&r2=501171
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
 Mon Jan 29 12:11:43 2007
@@ -780,17 +780,15 @@
                     // after making instance transactional for locking
                     if (!sm.isTransactional() && useTransactionalState(fetch))
                         sm.transactional();
-                    boolean loaded = sm.isLoading();
-                    if (!loaded) {
-                        try {
-                            loaded = sm.load(fetch, StateManagerImpl.LOAD_FGS, 
-                                exclude, edata, false);
-                        } catch (ObjectNotFoundException onfe) {
-                            if ((flags & OID_NODELETED) != 0
-                                || (flags & OID_NOVALIDATE) != 0)
-                                throw onfe;
-                            return call.processReturn(oid, null);
-                        }
+                    boolean loaded = false;
+                    try {
+                        loaded = sm.load(fetch, StateManagerImpl.LOAD_FGS, 
+                            exclude, edata, false);
+                    } catch (ObjectNotFoundException onfe) {
+                        if ((flags & OID_NODELETED) != 0
+                            || (flags & OID_NOVALIDATE) != 0)
+                            throw onfe;
+                        return call.processReturn(oid, null);
                     }
 
                     // if no data needed to be loaded and the user wants to

Modified: 
incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml?view=diff&rev=501171&r1=501170&r2=501171
==============================================================================
--- incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml 
(original)
+++ incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml 
Mon Jan 29 12:11:43 2007
@@ -1955,18 +1955,20 @@
 LockManager</literal>
             </para>
             <para>
-<emphasis role="bold">Default: </emphasis><literal>pessimistic</literal>
+<emphasis role="bold">Default: </emphasis><literal>version</literal>
             </para>
             <para>
 <emphasis role="bold">Possible values: </emphasis><literal>none</literal>,
-<literal>sjvm</literal>, <literal>pessimistic</literal>
+<literal>sjvm</literal>, <literal>pessimistic</literal>, 
+<literal>version</literal>
             </para>
             <para>
 <emphasis role="bold">Description:</emphasis> A plugin string (see
 <xref linkend="ref_guide_conf_plugins"/>) describing a
 <ulink url="../javadoc/org/apache/openjpa/kernel/LockManager.html"><classname>
 org.apache.openjpa.kernel.LockManager</classname></ulink> to use for acquiring
-locks on persistent instances during transactions.
+locks on persistent instances during transactions.  See 
+<xref linkend="ref_guide_locking_lockmgr"/> for more information.
             </para>
         </section>
         <section id="openjpa.LockTimeout">


Reply via email to