mirror of https://github.com/apache/openjpa.git
Use the current thread's classloader in addition to the configuration class'
loader when loading globals. git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@497634 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a40baca273
commit
e2665ce5dd
|
@ -55,6 +55,7 @@ import org.apache.openjpa.lib.log.LogFactoryImpl;
|
||||||
import org.apache.openjpa.lib.log.NoneLogFactory;
|
import org.apache.openjpa.lib.log.NoneLogFactory;
|
||||||
import org.apache.openjpa.lib.util.Closeable;
|
import org.apache.openjpa.lib.util.Closeable;
|
||||||
import org.apache.openjpa.lib.util.Localizer;
|
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.ParseException;
|
||||||
import org.apache.openjpa.lib.util.Services;
|
import org.apache.openjpa.lib.util.Services;
|
||||||
import org.apache.openjpa.lib.util.StringDistance;
|
import org.apache.openjpa.lib.util.StringDistance;
|
||||||
|
@ -158,8 +159,10 @@ public class ConfigurationImpl
|
||||||
* {@link ProductDerivation}s, and from System properties.
|
* {@link ProductDerivation}s, and from System properties.
|
||||||
*/
|
*/
|
||||||
public boolean loadGlobals() {
|
public boolean loadGlobals() {
|
||||||
ConfigurationProvider provider = ProductDerivations.loadGlobals
|
MultiClassLoader loader = new MultiClassLoader();
|
||||||
(getClass().getClassLoader());
|
loader.addClassLoader(Thread.currentThread().getContextClassLoader());
|
||||||
|
loader.addClassLoader(getClass().getClassLoader());
|
||||||
|
ConfigurationProvider provider = ProductDerivations.loadGlobals(loader);
|
||||||
if (provider != null)
|
if (provider != null)
|
||||||
provider.setInto(this);
|
provider.setInto(this);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue