mirror of https://github.com/apache/activemq.git
Minor API change.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@417658 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6086520836
commit
faff4999f4
|
@ -39,7 +39,7 @@ public abstract class ClassLoaderSPIConnectionFactory implements SPIConnectionFa
|
|||
ClassLoader newClassLoader = getContextClassLoader(settings);
|
||||
Thread.currentThread().setContextClassLoader(newClassLoader);
|
||||
|
||||
return instantiateConnectionFactory(newClassLoader, settings);
|
||||
return instantiateConnectionFactory(settings);
|
||||
}
|
||||
|
||||
protected ClassLoader getContextClassLoader(Properties settings) {
|
||||
|
@ -76,5 +76,5 @@ public abstract class ClassLoaderSPIConnectionFactory implements SPIConnectionFa
|
|||
return ClassLoaderSPIConnectionFactory.class.getClassLoader();
|
||||
}
|
||||
|
||||
protected abstract ConnectionFactory instantiateConnectionFactory(ClassLoader cl, Properties settings) throws Exception;
|
||||
protected abstract ConnectionFactory instantiateConnectionFactory(Properties settings) throws Exception;
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@ import java.util.Properties;
|
|||
|
||||
public abstract class ReflectionSPIConnectionFactory extends ClassLoaderSPIConnectionFactory {
|
||||
|
||||
public ConnectionFactory instantiateConnectionFactory(ClassLoader cl, Properties settings) throws Exception {
|
||||
Class factoryClass = cl.loadClass(getClassName());
|
||||
public ConnectionFactory instantiateConnectionFactory(Properties settings) throws Exception {
|
||||
Class factoryClass = Thread.currentThread().getContextClassLoader().loadClass(getClassName());
|
||||
ConnectionFactory factory = (ConnectionFactory)factoryClass.newInstance();
|
||||
configureConnectionFactory(factory, settings);
|
||||
return factory;
|
||||
|
|
Loading…
Reference in New Issue