From 387805efeb3492b63c521a66ac1e6983b135a0b1 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Mon, 24 Jul 2006 06:51:41 +0000 Subject: [PATCH] used the new clientIDPrefix and made the code easier to run on Java 5 git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@424932 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/activemq/test/Main.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/test/Main.java b/activemq-core/src/test/java/org/apache/activemq/test/Main.java index 00e8cec2bb..80657e941e 100644 --- a/activemq-core/src/test/java/org/apache/activemq/test/Main.java +++ b/activemq-core/src/test/java/org/apache/activemq/test/Main.java @@ -54,14 +54,18 @@ public class Main { broker = new BrokerService(); broker.setPersistent(false); broker.setUseJmx(true); + broker.getManagementContext().setCreateConnector(false); broker.setPlugins(new BrokerPlugin[] { new ConnectionDotFilePlugin() }); broker.addConnector("tcp://localhost:61616"); broker.addConnector("stomp://localhost:61613"); } broker.start(); + ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(); + factory.setClientIDPrefix("testClient"); + // lets create a dummy couple of consumers - Connection connection = new ActiveMQConnectionFactory().createConnection(); + Connection connection = factory.createConnection(); connection.start(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer consumer1 = session.createConsumer(new ActiveMQQueue("Orders.IBM"));