activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r418900 - in /incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool: AbstractJmsClient.java JmsConsumerClient.java
Date Tue, 04 Jul 2006 02:52:47 GMT
Author: aco
Date: Mon Jul  3 19:52:46 2006
New Revision: 418900

URL: http://svn.apache.org/viewvc?rev=418900&view=rev
Log:
Fix setting of client ID to enable to run jboss durable subscriptions

Modified:
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java?rev=418900&r1=418899&r2=418900&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
Mon Jul  3 19:52:46 2006
@@ -79,6 +79,7 @@
     public Connection getConnection() throws JMSException {
         if (jmsConnection == null) {
             jmsConnection = factory.createConnection();
+            jmsConnection.setClientID(getClientName());
             log.info("Creating JMS Connection: Provider=" + getClient().getJmsProvider()
+ ", JMS Spec=" + getClient().getJmsVersion());
         }
         return jmsConnection;

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java?rev=418900&r1=418899&r2=418900&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
Mon Jul  3 19:52:46 2006
@@ -165,14 +165,6 @@
         }
     }
 
-    public Connection getConnection() throws JMSException {
-        Connection c = super.getConnection();
-        if (c.getClientID() == null && client.isDurable()) {
-            c.setClientID(getClientName());
-        }
-        return c;
-    }
-
     public MessageConsumer createJmsConsumer() throws JMSException {
         Destination[] dest = createDestination(destIndex, destCount);
         return createJmsConsumer(dest[0]);
@@ -184,7 +176,7 @@
             if (clientName == null) {
                 clientName = "JmsConsumer";
             }
-            log.info("Creating durable subscriber to: " + dest.toString());
+            log.info("Creating durable subscriber (" + getConnection().getClientID() + ")
to: " + dest.toString());
             jmsConsumer = getSession().createDurableSubscriber((Topic) dest, clientName);
         } else {
             log.info("Creating non-durable consumer to: " + dest.toString());
@@ -199,7 +191,7 @@
             if (clientName == null) {
                 clientName = "JmsConsumer";
             }
-            log.info("Creating durable subscriber to: " + dest.toString());
+            log.info("Creating durable subscriber (" + getConnection().getClientID() + ")
to: " + dest.toString());
             jmsConsumer = getSession().createDurableSubscriber((Topic) dest, clientName,
selector, noLocal);
         } else {
             log.info("Creating non-durable consumer to: " + dest.toString());



Mime
View raw message