From faff4999f462676585e0dcdaa3918bf9e99fef78 Mon Sep 17 00:00:00 2001 From: "Adrian T. Co" Date: Wed, 28 Jun 2006 03:26:05 +0000 Subject: [PATCH] Minor API change. git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@417658 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/tool/spi/ClassLoaderSPIConnectionFactory.java | 4 ++-- .../activemq/tool/spi/ReflectionSPIConnectionFactory.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java index 59df52a870..961547e696 100644 --- a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java +++ b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java @@ -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; } diff --git a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java index d284188346..e379ca7221 100644 --- a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java +++ b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java @@ -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;