openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r497634 - /incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
Date Thu, 18 Jan 2007 23:21:41 GMT
Author: awhite
Date: Thu Jan 18 15:21:41 2007
New Revision: 497634

URL: http://svn.apache.org/viewvc?view=rev&rev=497634
Log:
Use the current thread's classloader in addition to the configuration class' 
loader when loading globals.


Modified:
    incubator/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java

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=497634&r1=497633&r2=497634
==============================================================================
--- 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
Thu Jan 18 15:21:41 2007
@@ -55,6 +55,7 @@
 import org.apache.openjpa.lib.log.NoneLogFactory;
 import org.apache.openjpa.lib.util.Closeable;
 import org.apache.openjpa.lib.util.Localizer;
+import org.apache.openjpa.lib.util.MultiClassLoader;
 import org.apache.openjpa.lib.util.ParseException;
 import org.apache.openjpa.lib.util.Services;
 import org.apache.openjpa.lib.util.StringDistance;
@@ -158,8 +159,10 @@
      * {@link ProductDerivation}s, and from System properties.
      */
     public boolean loadGlobals() {
-        ConfigurationProvider provider = ProductDerivations.loadGlobals
-            (getClass().getClassLoader());
+        MultiClassLoader loader = new MultiClassLoader();
+        loader.addClassLoader(Thread.currentThread().getContextClassLoader());
+        loader.addClassLoader(getClass().getClassLoader());
+        ConfigurationProvider provider = ProductDerivations.loadGlobals(loader);
         if (provider != null)
             provider.setInto(this);
 



Mime
View raw message