Author: awhite
Date: Tue Sep 26 09:54:30 2006
New Revision: 450114

URL: http://svn.apache.org/viewvc?view=rev&rev=450114
Log:
Change default MaxFetchDepth to -1 (unlimited).  Also move the use of multiple
configuration prefixes to ProductDerivations for simple static access.  Modify
some cases of looking for "openjpa." prefixes to properties to properly look 
for all configured prefixes instead.


Modified:
    
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfiguration.java
    
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
    
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCProductDerivation.java
    
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
    
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
    
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
    
incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
    
incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/schema/localizer.properties
    
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
    
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
    
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
    
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java
    
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/AbstractProductDerivation.java
    
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configuration.java
    
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
    
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
    
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivation.java
    
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
    
incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java
    
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
    
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
    
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
    
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java
    incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_conf.xml
    incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml

Modified: 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfiguration.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfiguration.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfiguration.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfiguration.java
 Tue Sep 26 09:54:30 2006
@@ -241,7 +241,6 @@
      * <li><code>parallel</code>: When querying for objects, also select for
      * both 1-1 relations using joins and to-many relations using batched
      * selects.</li>
-     * </li>
      * </ul>
      */
     public void setEagerFetchMode(String mode);

Modified: 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
 Tue Sep 26 09:54:30 2006
@@ -865,9 +865,15 @@
     }
 
     protected boolean isInvalidProperty(String propName) {
+        if (super.isInvalidProperty(propName))
+            return true;
+
         // handle openjpa.jdbc.SomeMisspelledProperty, but not
         // openjpa.someotherimplementation.SomeProperty
-        return super.isInvalidProperty(propName)
-            || propName.toLowerCase().startsWith("openjpa.jdbc");
+        String[] prefixes = ProductDerivations.getConfigurationPrefixes();
+        for (int i = 0; i < prefixes.length; i++)
+            if (propName.toLowerCase().startsWith(prefixes[i] + ".jdbc"))
+                return true; 
+        return false;
     }
 }

Modified: 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCProductDerivation.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCProductDerivation.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCProductDerivation.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCProductDerivation.java
 Tue Sep 26 09:54:30 2006
@@ -39,8 +39,7 @@
     public boolean beforeConfigurationConstruct(ConfigurationProvider cp) {
         // default to JDBC when no broker factory set
         if (BrokerFactoryValue.get(cp) == null) {
-            cp.addProperty(BrokerFactoryValue.getKey(cp),
-                JDBCBrokerFactory.class.getName());
+            BrokerFactoryValue.set(cp, JDBCBrokerFactory.class.getName());
             return true;
         }
         return false;

Modified: 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
 Tue Sep 26 09:54:30 2006
@@ -930,7 +930,7 @@
         flags.dropTables = opts.removeBooleanProperty
             ("dropTables", "dt", flags.dropTables);
         flags.openjpaTables = opts.removeBooleanProperty
-            ("openjpaTables", "kt", flags.openjpaTables);
+            ("openjpaTables", "ot", flags.openjpaTables);
         flags.dropSequences = opts.removeBooleanProperty
             ("dropSequences", "dsq", flags.dropSequences);
         flags.readSchema = opts.removeBooleanProperty

Modified: 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
 Tue Sep 26 09:54:30 2006
@@ -1376,7 +1376,7 @@
         flags.ignoreErrors = opts.removeBooleanProperty
             ("ignoreErrors", "i", flags.ignoreErrors);
         flags.openjpaTables = opts.removeBooleanProperty
-            ("openjpaTables", "kt", flags.openjpaTables);
+            ("openjpaTables", "ot", flags.openjpaTables);
         flags.primaryKeys = opts.removeBooleanProperty
             ("primaryKeys", "pk", flags.primaryKeys);
         flags.foreignKeys = opts.removeBooleanProperty

Modified: 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
 Tue Sep 26 09:54:30 2006
@@ -80,7 +80,7 @@
     public String autoAssignSequenceName = null;
 
     /**
-     * Flag to use OpenJPA 3 style naming for auto assign sequence name and
+     * Flag to use OpenJPA 0.3 style naming for auto assign sequence name and
      * trigger name for backwards compatibility.
      */
     public boolean openjpa3GeneratedKeyNames = false;

Modified: 
incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
 (original)
+++ 
incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/meta/localizer.properties
 Tue Sep 26 09:54:30 2006
@@ -264,7 +264,7 @@
        \t[-foreignKeys/-fk <true/t | false/f>]\n\
        \t[-indexes/-ix <true/t | false/f>]\n\
        \t[-dropTables/-dt <true/t | false/f>]\n\
-       \t[-openjpaTables/-kt <true/t | false/f>]\n\
+       \t[-openjpaTables/-ot <true/t | false/f>]\n\
        \t[-dropSequences/-dsq <true/t | false/f>]\n\
        \t[-sequences/-sq <true/t | false/f>]\n\
        \t[-ignoreErrors/-i <true/t | false/f>]\n\

Modified: 
incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/schema/localizer.properties
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/schema/localizer.properties?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/schema/localizer.properties
 (original)
+++ 
incubator/openjpa/trunk/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/schema/localizer.properties
 Tue Sep 26 09:54:30 2006
@@ -54,7 +54,7 @@
        \t[-file/-f <stdout | output file or resource>]\n\
        \t[-ignoreErrors/-i <true/t | false/f>]\n\
        \t[-dropTables/-dt <true/t | false/f>]\n\
-       \t[-openjpaTables/-kt <true/t | false/f>]\n\
+       \t[-openjpaTables/-ot <true/t | false/f>]\n\
        \t[-dropSequences/-dsq <true/t | false/f>]\n\
        \t[-sequences/-sq <true/t | false/f>]\n\
        \t[-primaryKeys/-pk <true/t | false/f>]\n\

Modified: 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
 Tue Sep 26 09:54:30 2006
@@ -23,6 +23,7 @@
 import org.apache.openjpa.kernel.BrokerFactory;
 import org.apache.openjpa.lib.conf.ConfigurationProvider;
 import org.apache.openjpa.lib.conf.PluginValue;
+import org.apache.openjpa.lib.conf.ProductDerivations;
 
 /**
  * Value type used to represent the [EMAIL PROTECTED] BrokerFactory}. This 
type is
@@ -40,20 +41,10 @@
     private static final List _aliases = new ArrayList();
     private static final List _prefixes = new ArrayList(2);
     static {
-        _prefixes.add("openjpa");
         addDefaultAlias("abstractstore",
             AbstractStoreBrokerFactory.class.getName());
     }
-    
-    /**
-     * Add <code>prefix</code> to the list of prefixes under which 
configuration
-     * properties may be scoped.
-     */
-    public static void addPropertyPrefix(String prefix) {
-        if (!_prefixes.contains(prefix))
-            _prefixes.add(prefix);
-    }
-    
+
     /**
      * Add a mapping from <code>alias</code> to <code>cls</code> to the list
      * of default aliases for new values created after this invocation.
@@ -67,10 +58,11 @@
      * Extract the value of this property if set in the given provider.
      */
     public static Object get(ConfigurationProvider cp) {
+        String[] prefixes = ProductDerivations.getConfigurationPrefixes();
         Map props = cp.getProperties();
         Object bf;
-        for (int i = 0; i < _prefixes.size (); i++) {
-            bf = props.get(_prefixes.get(i) + "." + KEY);
+        for (int i = 0; i < prefixes.length; i++) {
+            bf = props.get(prefixes[i] + "." + KEY);
             if (bf != null)
                 return  bf;
         }
@@ -78,10 +70,10 @@
     }
 
     /**
-     * Return the key to use for this property.
+     * Set the value of this property in the given provider.
      */
-    public static String getKey(ConfigurationProvider cp) {
-        return _prefixes.get(0) + "." + KEY;
+    public static void set(ConfigurationProvider cp, String value) {
+        cp.addProperty("openjpa." + KEY, value);
     }
 
     public BrokerFactoryValue() {

Modified: 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
 Tue Sep 26 09:54:30 2006
@@ -165,14 +165,6 @@
         super(false);
         String[] aliases;
 
-        // setup super's log factory plugin
-        logFactoryPlugin.setProperty("Log");
-        logFactoryPlugin.setAlias("openjpa", 
-            "org.apache.openjpa.lib.log.LogFactoryImpl");
-        aliases = logFactoryPlugin.getAliases();
-        logFactoryPlugin.setDefault(aliases[0]);
-        logFactoryPlugin.setString(aliases[0]);
-
         classResolverPlugin = addPlugin("ClassResolver", true);
         aliases = new String[]{
             "default", "org.apache.openjpa.util.ClassResolverImpl",
@@ -401,8 +393,8 @@
         fetchBatchSize.set(-1);
 
         maxFetchDepth = addInt("MaxFetchDepth");
-        maxFetchDepth.setDefault("1");
-        maxFetchDepth.set(1);
+        maxFetchDepth.setDefault("-1");
+        maxFetchDepth.set(-1);
 
         fetchGroups = addStringList("FetchGroups");
         fetchGroups.setDefault("default");

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=450114&r1=450113&r2=450114
==============================================================================
--- 
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
 Tue Sep 26 09:54:30 2006
@@ -3399,8 +3399,8 @@
             default:
                 // use store manager for native sequence
                 if (fmd == null) {
-                    // this will return a sequence even for app id classes, 
which
-                    // is what we want for backwards-compatibility
+                    // this will return a sequence even for app id classes, 
+                    // which is what we want for backwards-compatibility
                     return _store.getDataStoreIdSequence(meta);
                 }
                 return _store.getValueSequence(fmd);

Modified: 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java
 Tue Sep 26 09:54:30 2006
@@ -297,8 +297,7 @@
                 _extent = _broker.newExtent(cls, _subclasses);
                 _extent.setIgnoreChanges(_ignoreChanges);
             } else if (_extent != null
-                && _extent.getIgnoreChanges() != _ignoreChanges && cls != null)
-            {
+                && _extent.getIgnoreChanges() != _ignoreChanges && cls != 
null){
                 _extent = _broker.newExtent(cls, _extent.hasSubclasses());
                 _extent.setIgnoreChanges(_ignoreChanges);
             }

Modified: 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/AbstractProductDerivation.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/AbstractProductDerivation.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/AbstractProductDerivation.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/AbstractProductDerivation.java
 Tue Sep 26 09:54:30 2006
@@ -27,6 +27,10 @@
 public abstract class AbstractProductDerivation

     implements ProductDerivation {

 

+    public String getConfigurationPrefix() {

+        return null;

+    }

+

     public ConfigurationProvider loadGlobals(ClassLoader loader)

         throws Exception {

         return null;


Modified: 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configuration.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configuration.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configuration.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configuration.java
 Tue Sep 26 09:54:30 2006
@@ -78,8 +78,7 @@
     public String getProductName();
     
     /**
-     * Set the product name.  The set name will automatically be added to
-     * the property prefixes.
+     * Set the product name.
      */
     public void setProductName(String name);
 
@@ -159,14 +158,6 @@
      * part of the equality and hashing calculations.
      */
     public void fromProperties(Map map);
-
-    /**
-     * Add <code>prefix</code> to the list of prefixes to use
-     * to identify valid configuration properties. "openjpa" and any
-     * product name set with [EMAIL PROTECTED] #setProductName} will 
automatically
-     * be added.
-     */
-    public void addPropertyPrefix(String prefix);
 
     /**
      * Adds a listener for any property changes. The property events fired

Modified: 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
 Tue Sep 26 09:54:30 2006
@@ -108,7 +108,6 @@
     private boolean _globals = false;
     private String _auto = null;
     private final List _vals = new ArrayList();
-    private List _prefixes = new ArrayList(2);
 
     // property listener helper
     private PropertyChangeSupport _changeSupport = null;
@@ -131,11 +130,12 @@
      * @param loadGlobals whether to attempt to load the global properties
      */
     public ConfigurationImpl(boolean loadGlobals) {
-        setProductName("openjpa"); // also adds as prop prefix
+        setProductName("openjpa");
 
         logFactoryPlugin = addPlugin("Log", true);
         String[] aliases = new String[]{
             "true", LogFactoryImpl.class.getName(),
+            "openjpa", LogFactoryImpl.class.getName(),
             "commons", "org.apache.openjpa.lib.log.CommonsLogFactory",
             "log4j", "org.apache.openjpa.lib.log.Log4JLogFactory",
             "none", NoneLogFactory.class.getName(),
@@ -183,7 +183,6 @@
 
     public void setProductName(String name) {
         _product = name;
-        addPropertyPrefix(name);
     }
 
     public LogFactory getLogFactory() {
@@ -307,8 +306,8 @@
         // keep cached props up to date
         if (_props != null) {
             if (newString == null)
-                remove(_props, val);
-            else if (containsKey(_props, val)
+                Configurations.removeProperty(val.getProperty(), _props);
+            else if (Configurations.containsProperty(val.getProperty(), _props)
                 || val.getDefault() == null
                 || !val.getDefault().equals(newString))
                 put(_props, val, newString);
@@ -534,11 +533,6 @@
     // To/from maps
     ////////////////
 
-    public void addPropertyPrefix(String prefix) {
-        if (!_prefixes.contains(prefix))
-            _prefixes.add(prefix);
-    }
-
     public Map toProperties(boolean storeDefaults) {
         // clone properties before making any modifications; we need to keep
         // the internal properties instance consistent to maintain equals and
@@ -560,7 +554,8 @@
                 // if key in existing properties, we already know value is up
                 // to date
                 val = (Value) _vals.get(i);
-                if (_props != null && containsKey(_props, val))
+                if (_props != null && Configurations.containsProperty
+                    (val.getProperty(), _props))
                     continue;
 
                 str = val.getString();
@@ -605,14 +600,13 @@
                 ser &= o instanceof Serializable;
                 val.setObject(o);
             }
-            remove(remaining, val);
+            Configurations.removeProperty(val.getProperty(), remaining);
         }
         
         // convention is to point product at a resource with the
         // <prefix>.properties System property; remove that property so we
         // we don't warn about it
-        for (int i = 0; i < _prefixes.size(); i++)
-            remaining.remove(_prefixes.get(i) + ".properties");
+        Configurations.removeProperty("properties", remaining);
 
         // now warn if there are any remaining properties that there
         // is an unhandled prop
@@ -637,39 +631,20 @@
     private void put(Map map, Value val, Object o) {
         Object key = val.getLoadKey();
         if (key == null)
-            key = _prefixes.get(0) + "." + val.getProperty();
+            key = "openjpa." + val.getProperty();
         map.put(key, o);
     }
 
     /**
-     * Return whether <code>map</code> contains an entry for <code>val</code>.
-     */
-    private boolean containsKey(Map map, Value val) {
-        for (int i = 0; i < _prefixes.size(); i++)
-            if (map.containsKey(_prefixes.get(i) + "." + val.getProperty()))
-                return true;
-        return false;
-    }
-
-    /**
-     * Removes <code>val</code> from <code>map</code>. Use this method
-     * instead of attempting to remove the value directly because this will
-     * account for any duplicate-but-same-valued keys in the map.
-     */
-    private void remove(Map map, Value val) {
-        for (int i = 0; i < _prefixes.size(); i++)
-            map.remove(_prefixes.get(i) + "." + val.getProperty());
-    }
-
-    /**
      * Look up the given value, testing all available prefixes.
      */
     private Object get(Map map, Value val, boolean setLoadKey) {
+        String[] prefixes = ProductDerivations.getConfigurationPrefixes();
         String firstKey = null;
         String key;
         Object o = null;
-        for (int i = 0; i < _prefixes.size(); i++) {
-            key = _prefixes.get(i) + "." + val.getProperty();
+        for (int i = 0; i < prefixes.length; i++) {
+            key = prefixes[i] + "." + val.getProperty();
             if (firstKey == null) {
                 o = map.get(key);
                 if (o != null)
@@ -712,11 +687,11 @@
      * Return a comprehensive list of recognized map keys.
      */
     private Collection newPropertyList() {
-        List l = new ArrayList(_vals.size() * _prefixes.size());
+        String[] prefixes = ProductDerivations.getConfigurationPrefixes();
+        List l = new ArrayList(_vals.size() * prefixes.length);
         for (int i = 0; i < _vals.size(); i++) {
-            for (int j = 0; j < _prefixes.size(); j++)
-                l.add(_prefixes.get(j) + "." 
-                    + ((Value) _vals.get(i)).getProperty());
+            for (int j = 0; j < prefixes.length; j++)
+                l.add(prefixes[j] + "." + ((Value) 
_vals.get(i)).getProperty());
         }
         return l;
     }
@@ -729,12 +704,11 @@
         // handle warnings for openjpa.SomeString, but not for
         // openjpa.some.subpackage.SomeString, since it might be valid for some
         // specific implementation of OpenJPA
-        String prefix;
-        for (int i = 0; i < _prefixes.size(); i++) {
-            prefix = (String) _prefixes.get(i) + ".";
-            if (propName.toLowerCase().startsWith(prefix)
-                && propName.length() > prefix.length()
-                && propName.indexOf('.', prefix.length()) == -1)
+        String[] prefixes = ProductDerivations.getConfigurationPrefixes();
+        for (int i = 0; i < prefixes.length; i++) {
+            if (propName.toLowerCase().startsWith(prefixes[i])
+                && propName.length() > prefixes[i].length()
+                && propName.indexOf('.', prefixes[i].length()) == -1)
                 return true;
         }
         return false;
@@ -861,7 +835,6 @@
     public void readExternal(ObjectInput in)
         throws IOException, ClassNotFoundException {
         fromProperties((Map) in.readObject());
-        _prefixes = (List) in.readObject();
         _globals = in.readBoolean();
     }
 
@@ -874,7 +847,6 @@
             out.writeObject(_props);
         else
             out.writeObject(toProperties(false));
-        out.writeObject(_prefixes);
         out.writeBoolean(_globals);
     }
 
@@ -888,8 +860,6 @@
                 (new Class[]{ boolean.class });
             ConfigurationImpl clone = (ConfigurationImpl) cons.newInstance
                 (new Object[]{ Boolean.FALSE });
-            clone._prefixes.clear();
-            clone._prefixes.addAll(_prefixes);
             clone._globals = _globals;
             clone.fromProperties(toProperties(true));
             return clone;

Modified: 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
 Tue Sep 26 09:54:30 2006
@@ -468,4 +468,53 @@
                 try { ctx.close(); } catch (Exception e) {}
         }
     }
+
+    /**
+     * Test whether the map contains the given key, prefixed with any possible
+     * configuration prefix.
+     */
+    public static boolean containsProperty(String key, Map props) {
+        if (key == null || props == null)
+            return false;
+        String[] prefixes = ProductDerivations.getConfigurationPrefixes();
+        for (int i = 0; i < prefixes.length; i++)
+            if (props.containsKey(prefixes[i] + "." + key))
+                return true;
+        return false;
+    }
+
+    /**
+     * Get the property under the given key, prefixed with any possible
+     * configuration prefix.
+     */
+    public static Object getProperty(String key, Map props) {
+        if (key == null || props == null)
+            return null;
+        String[] prefixes = ProductDerivations.getConfigurationPrefixes();
+        Object val;
+        for (int i = 0; i < prefixes.length; i++) {
+            val = props.get(prefixes[i] + "." + key);
+            if (val != null)
+                return val;
+        }
+        return null;
+    }
+
+    /**
+     * Remove the property under the given key, prefixed with any possible
+     * configuration prefix.
+     */
+    public static Object removeProperty(String key, Map props) {
+        if (key == null || props == null)
+            return null;
+        String[] prefixes = ProductDerivations.getConfigurationPrefixes();
+        Object val = null;
+        Object cur;
+        for (int i = 0; i < prefixes.length; i++) {
+            cur = props.remove(prefixes[i] + "." + key);
+            if (cur != null && val == null)
+                val = cur;
+        }
+        return val;
+    }
 }

Modified: 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivation.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivation.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivation.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivation.java
 Tue Sep 26 09:54:30 2006
@@ -41,6 +41,11 @@
     public int getType();
 
     /**
+     * Return the configuration prefix for properties of this product.
+     */
+    public String getConfigurationPrefix();
+
+    /**
      * Load globals into the returned ConfigurationProvider, or return null if 
      * no globals is found.
      */

Modified: 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
 Tue Sep 26 09:54:30 2006
@@ -34,6 +34,7 @@
 public class ProductDerivations {
 
     private static final ProductDerivation[] _derivations;
+    private static final String[] _prefixes;
     static {
         Class[] pdcls = Services.getImplementorClasses(ProductDerivation.class,
             ProductDerivation.class.getClassLoader());
@@ -59,6 +60,24 @@
         Collections.sort(derivations, new ProductDerivationComparator());
         _derivations = (ProductDerivation[]) derivations.toArray
             (new ProductDerivation[derivations.size()]);
+
+        List prefixes = new ArrayList(2);
+        for (int i = 0; i < _derivations.length; i++) {
+            if (_derivations[i].getConfigurationPrefix() != null
+                && !"openjpa".equals(_derivations[i].getConfigurationPrefix()))
+                prefixes.add(_derivations[i].getConfigurationPrefix());
+        }
+        _prefixes = new String[1 + prefixes.size()];
+        _prefixes[0] = "openjpa";
+        for (int i = 0; i < prefixes.size(); i++)
+            _prefixes[i + 1] = (String) prefixes.get(i);
+    }
+
+    /**
+     * Return the recognized prefixes for configuration properties.
+     */
+    public static String[] getConfigurationPrefixes() {
+        return _prefixes;
     }
 
     /**

Modified: 
incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java
 Tue Sep 26 09:54:30 2006
@@ -69,8 +69,8 @@
         // openjpa-facade test
         assertTrue(em instanceof OpenJPAEntityManager);
         OpenJPAEntityManager ojem = (OpenJPAEntityManager) em;
-        ojem.getFetchPlan().setMaxFetchDepth(-1);
-        assertEquals(-1, ojem.getFetchPlan().getMaxFetchDepth());
+        ojem.getFetchPlan().setMaxFetchDepth(1);
+        assertEquals(1, ojem.getFetchPlan().getMaxFetchDepth());
         em.close();
     }
 

Modified: 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
 Tue Sep 26 09:54:30 2006
@@ -34,6 +34,8 @@
 import org.apache.openjpa.kernel.DelegatingBrokerFactory;
 import org.apache.openjpa.kernel.DelegatingFetchConfiguration;
 import org.apache.openjpa.kernel.FetchConfiguration;
+import org.apache.openjpa.lib.conf.Configurations;
+import org.apache.openjpa.lib.conf.ProductDerivations;
 import org.apache.openjpa.lib.conf.Value;
 import org.apache.openjpa.lib.util.Localizer;
 import org.apache.openjpa.util.ImplHelper;
@@ -145,42 +147,42 @@
             props = new HashMap(props);
 
         OpenJPAConfiguration conf = getConfiguration();
-        String user =
-            (String) props.remove("openjpa.ConnectionUserName");
+        String user = (String) Configurations.removeProperty
+            ("ConnectionUserName", props);
         if (user == null)
             user = conf.getConnectionUserName();
-        String pass =
-            (String) props.remove("openjpa.ConnectionPassword");
+        String pass = (String) Configurations.removeProperty
+            ("ConnectionPassword", props);
         if (pass == null)
             pass = conf.getConnectionPassword();
 
-        String str =
-            (String) props.remove("openjpa.TransactionMode");
+        String str = (String) Configurations.removeProperty
+            ("TransactionMode", props);
         boolean managed;
         if (str == null)
             managed = conf.isTransactionModeManaged();
         else {
-            Value val = conf.getValue("openjpa.TransactionMode");
+            Value val = conf.getValue("TransactionMode");
             managed = Boolean.parseBoolean(val.unalias(str));
         }
 
-        Object obj = props.remove("openjpa.ConnectionRetainMode");
+        Object obj = Configurations.removeProperty("ConnectionRetainMode", 
+            props);
         int retainMode;
         if (obj instanceof Number)
             retainMode = ((Number) obj).intValue();
-        else if (obj != null) {
-            Value val =
-                conf.getValue("openjpa.ConnectionRetainMode");
+        else if (obj == null)
+            retainMode = conf.getConnectionRetainModeConstant();
+        else {
+            Value val = conf.getValue("ConnectionRetainMode");
             try {
                 retainMode = Integer.parseInt(val.unalias((String) obj));
             } catch (Exception e) {
                 throw new ArgumentException(_loc.get("bad-em-prop",
                     "openjpa.ConnectionRetainMode", obj),
-                    new Throwable[]{ e },
-                    obj, true);
+                    new Throwable[]{ e }, obj, true);
             }
-        } else
-            retainMode = conf.getConnectionRetainModeConstant();
+        }
 
         Broker broker = _factory.newBroker(user, pass, managed, retainMode,
             false);
@@ -191,15 +193,23 @@
         OpenJPAEntityManager em = newEntityManagerImpl(broker);
 
         // allow setting of other bean properties of EM
+        String[] prefixes = ProductDerivations.getConfigurationPrefixes();
         List<RuntimeException> errs = null;
         Method setter = null;
-        String prop;
+        String prop, prefix;
         Object val;
         for (Map.Entry entry : (Set<Map.Entry>) props.entrySet()) {
             prop = (String) entry.getKey();
-            if (!prop.startsWith("openjpa."))
-                continue;
-            prop = prop.substring("openjpa.".length());
+            prefix = null;
+            for (int i = 0; i < prefixes.length; i++) {
+                prefix = prefixes[i] + ".";
+                if (prop.startsWith(prefix))
+                    break;
+                prefix = null; 
+            } 
+            if (prefix == null)
+                continue; 
+            prop = prop.substring(prefix.length());
             try {
                 setter = ImplHelper.getSetter(em.getClass(), prop);
             } catch (OpenJPAException ke) {

Modified: 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
 Tue Sep 26 09:54:30 2006
@@ -32,6 +32,7 @@
 import org.apache.openjpa.conf.OpenJPAConfigurationImpl;
 import org.apache.openjpa.conf.OpenJPAProductDerivation;
 import org.apache.openjpa.lib.conf.AbstractProductDerivation;
+import org.apache.openjpa.lib.conf.ProductDerivations;
 import org.apache.openjpa.lib.conf.Configuration;
 import org.apache.openjpa.lib.conf.ConfigurationProvider;
 import org.apache.openjpa.lib.conf.MapConfigurationProvider;
@@ -180,7 +181,10 @@
     @Override
     public ConfigurationProvider loadGlobals(ClassLoader loader)
         throws IOException {
-        String rsrc = System.getProperty("openjpa.properties");
+        String[] prefixes = ProductDerivations.getConfigurationPrefixes();
+        String rsrc = null;
+        for (int i = 0; i < prefixes.length && StringUtils.isEmpty(rsrc); i++)
+           rsrc = System.getProperty(prefixes[i] + ".properties"); 
         boolean explicit = !StringUtils.isEmpty(rsrc);
         String anchor = null;
         int idx = (!explicit) ? -1 : rsrc.lastIndexOf('#');

Modified: 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
 Tue Sep 26 09:54:30 2006
@@ -50,8 +50,7 @@
 public class PersistenceProviderImpl
     implements PersistenceProvider {
 
-    static final String CLASS_TRANSFORMER_OPTIONS =
-        "openjpa.ClassTransformerOptions";
+    static final String CLASS_TRANSFORMER_OPTIONS = "ClassTransformerOptions";
 
     /**
      * Loads the entity manager specified by <code>name</code>, applying
@@ -71,8 +70,6 @@
             if (cp == null)
                 return null;
 
-            if (m != null)
-                cp.addProperties(m);
             BrokerFactory factory = Bootstrap.newBrokerFactory(cp, null);
             return OpenJPAPersistence.toEntityManagerFactory(factory);
         } catch (Exception e) {
@@ -97,9 +94,8 @@
             OpenJPAEntityManagerFactory emf = 
                 OpenJPAPersistence.toEntityManagerFactory(factory);
             Properties p = pui.getProperties();
-            String ctOpts = null;
-            if (p != null)
-                ctOpts = p.getProperty(CLASS_TRANSFORMER_OPTIONS);
+            String ctOpts = (String) Configurations.getProperty
+                (CLASS_TRANSFORMER_OPTIONS, p);
             pui.addTransformer(new ClassTransformerImpl(emf.getConfiguration(),
                 ctOpts, pui.getNewTempClassLoader()));
             return emf;

Modified: 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java
 (original)
+++ 
incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java
 Tue Sep 26 09:54:30 2006
@@ -403,7 +403,8 @@
         }
         if (!metaFactoryProps.isEmpty()) {
             // set persistent class locations as properties of metadata factory
-            String factory = (String) map.get("openjpa.MetaDataFactory");
+            String factory = (String) Configurations.getProperty
+                ("MetaDataFactory", map);
             if (factory == null)
                 factory = Configurations.serializeProperties(metaFactoryProps);
             else {
@@ -417,7 +418,8 @@
         }
 
         // always record provider name for product derivations to access
-        map.put(KEY_PROVIDER, info.getPersistenceProviderClassName());
+        if (info.getPersistenceProviderClassName() != null)
+            map.put(KEY_PROVIDER, info.getPersistenceProviderClassName());
         return map;
     }
 

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=450114&r1=450113&r2=450114
==============================================================================
--- 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 
Tue Sep 26 09:54:30 2006
@@ -2120,11 +2120,11 @@
 MaxFetchDepth</literal>
             </para>
             <para>
-<emphasis role="bold">Default:</emphasis><literal>1</literal>
+<emphasis role="bold">Default:</emphasis><literal>-1</literal>
             </para>
             <para>
 <emphasis role="bold">Description:</emphasis> The maximum depth of relations to
-traverse when eager fetching. Use -1 for no limit. Defaults to 1.  See
+traverse when eager fetching. Use -1 for no limit. Defaults to no limit.  See
 <xref linkend="ref_guide_perfpack_eager"/> for details on eager fetching.
             </para>
         </section>

Modified: 
incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml
URL: 
http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml?view=diff&rev=450114&r1=450113&r2=450114
==============================================================================
--- incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml 
(original)
+++ incubator/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_pc.xml Tue 
Sep 26 09:54:30 2006
@@ -1828,15 +1828,17 @@
 You can also set the system's default maximum fetch depth with the
 <link linkend="openjpa.MaxFetchDepth"><literal>openjpa.MaxFetchDepth</literal>
 </link> configuration property.  The maximum fetch depth determines how "deep"
-into the object graph to traverse when loading an instance.  The default 
maximum
-depth is 1, meaning that OpenJPA will load at most the target instance and its
-immediate relations.  By increasing the depth, you can allow OpenJPA to also
-load relations of relations, to arbitrary depth.  A value of -1 symbolizes an
-infinite maximum, telling OpenJPA to fetch configured relations until it 
reaches
-the edges of the object graph.  Of course, which relation fields are loaded
-depends on whether the fields are eager or lazy, and on the active fetch 
groups.
-A fetch group member's recursion depth may also limit the fetch depth to
-something less than the configured maximum.
+into the object graph to traverse when loading an instance.  For example, with
+a <literal>MaxFetchDepth</literal> of 1, OpenJPA will load at most the target 
+instance and its immediate relations.  With a <literal>MaxFetchDepth</literal>
+of 2, OpenJPA may load the target instance, its immediate relations, and
+the relations of those relations.  This works to arbitrary depth.  In fact,
+the default <literal>MaxFetchDepth</literal> value is -1, which symbolizes 
+infinite depth.  Under this setting, OpenJPA will fetch configured relations 
+until it reaches the edges of the object graph.  Of course, which relation 
+fields are loaded depends on whether the fields are eager or lazy, and on the 
+active fetch groups.  A fetch group member's recursion depth may also limit 
+the fetch depth to something less than the configured maximum.
             </para>
             <para>
 OpenJPA's <classname>OpenJPAEntityManager</classname> and <classname>


Reply via email to