You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2006/11/10 05:19:18 UTC

svn commit: r473181 - in /incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq: ActiveMQConnection.java ActiveMQConnectionFactory.java

Author: chirino
Date: Thu Nov  9 20:19:15 2006
New Revision: 473181

URL: http://svn.apache.org/viewvc?view=rev&rev=473181
Log:
Merged in revision 473167 from trunk

Modified:
    incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
    incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java

Modified: incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?view=diff&rev=473181&r1=473180&r2=473181
==============================================================================
--- incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java (original)
+++ incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java Thu Nov  9 20:19:15 2006
@@ -360,6 +360,16 @@
         this.userSpecifiedClientID = true;
         ensureConnectionInfoSent();
     }
+    
+    /**
+     * Sets the default client id that the connection will use if explicitly not set with
+     * the setClientId() call.
+     */
+    public void setDefaultClientID(String clientID) throws JMSException {
+        this.info.setClientId(clientID);
+        this.userSpecifiedClientID = true;
+    }
+
 
     /**
      * Gets the metadata for this connection.

Modified: incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java
URL: http://svn.apache.org/viewvc/incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java?view=diff&rev=473181&r1=473180&r2=473181
==============================================================================
--- incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java (original)
+++ incubator/activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnectionFactory.java Thu Nov  9 20:19:15 2006
@@ -260,7 +260,7 @@
             transport.start();
 
             if( clientID !=null )
-                connection.setClientID(clientID);
+                connection.setDefaultClientID(clientID);
 
             return connection;
         }