diff --git a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSupport.java b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSupport.java index 675efd4886..914fa0282b 100644 --- a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSupport.java +++ b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSupport.java @@ -18,7 +18,6 @@ package org.apache.activemq.tool; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.activemq.ActiveMQConnectionFactory; import javax.jms.ConnectionFactory; import javax.jms.Session; diff --git a/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSystemSupport.java b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSystemSupport.java new file mode 100644 index 0000000000..54f2534253 --- /dev/null +++ b/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsClientSystemSupport.java @@ -0,0 +1,142 @@ +/** + * + * Copyright 2005-2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.tool; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.Properties; +import java.util.Iterator; + +public abstract class JmsClientSystemSupport { + private static final Log log = LogFactory.getLog(JmsClientSystemSupport.class); + + public static final String PREFIX_CONFIG_SYSTEM_TEST = "sysTest."; + + protected Properties sysTestSettings = new Properties(); + protected Properties samplerSettings = new Properties(); + protected Properties jmsClientSettings = new Properties(); + protected ThreadGroup clientThreadGroup; + protected PerfMeasurementTool performanceSampler; + + protected int numClients = 1; + + public void runSystemTest() { + // Create a new copy of the settings to ensure immutability + final Properties clientSettings = getJmsClientSettings(); + + // Create performance sampler + performanceSampler = new PerfMeasurementTool(); + performanceSampler.setSamplerSettings(samplerSettings); + + clientThreadGroup = new ThreadGroup(getThreadGroupName()); + for (int i=0; i