activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject activemq git commit: Polished
Date Sun, 17 Jan 2016 09:21:42 GMT
Repository: activemq
Updated Branches:
  refs/heads/activemq-5.13.x 24a9fa79f -> d5101d46a


Polished


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/d5101d46
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/d5101d46
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/d5101d46

Branch: refs/heads/activemq-5.13.x
Commit: d5101d46a79ab6bd6bd4a547c90119865f490dfb
Parents: 24a9fa7
Author: Claus Ibsen <claus.ibsen@gmail.com>
Authored: Sun Jan 17 10:20:37 2016 +0100
Committer: Claus Ibsen <claus.ibsen@gmail.com>
Committed: Sun Jan 17 10:21:34 2016 +0100

----------------------------------------------------------------------
 .../camel/component/ActiveMQComponent.java      | 29 ++++++++++++++++++--
 .../camel/component/ActiveMQConfiguration.java  |  8 +-----
 2 files changed, 28 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/d5101d46/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java
----------------------------------------------------------------------
diff --git a/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java
b/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java
index 3826857..df38a00 100644
--- a/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java
+++ b/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQComponent.java
@@ -35,6 +35,7 @@ import org.apache.camel.util.URISupport;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.jms.connection.SingleConnectionFactory;
+import org.springframework.jms.core.JmsTemplate;
 
 import javax.jms.Connection;
 
@@ -92,18 +93,28 @@ public class ActiveMQComponent extends JmsComponent implements EndpointCompleter
         setConfiguration(configuration);
     }
 
+    /**
+     * Sets the broker URL to use to connect to ActiveMQ using the
+     * <a href="http://activemq.apache.org/configuring-transports.html">ActiveMQ URI
format</a>
+     */
     public void setBrokerURL(String brokerURL) {
         if (getConfiguration() instanceof ActiveMQConfiguration) {
             ((ActiveMQConfiguration)getConfiguration()).setBrokerURL(brokerURL);
         }
     }
 
+    /**
+     * Sets the username to be used to login to ActiveMQ
+     */
     public void setUserName(String userName) {
         if (getConfiguration() instanceof ActiveMQConfiguration) {
             ((ActiveMQConfiguration)getConfiguration()).setUserName(userName);
         }
     }
 
+    /**
+     * Sets the password/passcode used to login to ActiveMQ
+     */
     public void setPassword(String password) {
         if (getConfiguration() instanceof ActiveMQConfiguration) {
             ((ActiveMQConfiguration)getConfiguration()).setPassword(password);
@@ -117,19 +128,33 @@ public class ActiveMQComponent extends JmsComponent implements EndpointCompleter
     /**
      * If enabled this will cause all Queues in the ActiveMQ broker to be eagerly populated
into the CamelContext
      * so that they can be easily browsed by any Camel tooling. This option is disabled by
default.
-     *
-     * @param exposeAllQueues
      */
     public void setExposeAllQueues(boolean exposeAllQueues) {
         this.exposeAllQueues = exposeAllQueues;
     }
 
+    /**
+     * Enables or disables whether a PooledConnectionFactory will be used so that when
+     * messages are sent to ActiveMQ from outside of a message consuming thread, pooling
will be used rather
+     * than the default with the Spring {@link JmsTemplate} which will create a new connection,
session, producer
+     * for each message then close them all down again.
+     * <p/>
+     * The default value is true. Note that this requires an extra dependency on commons-pool2.
+     */
     public void setUsePooledConnection(boolean usePooledConnection) {
         if (getConfiguration() instanceof ActiveMQConfiguration) {
             ((ActiveMQConfiguration)getConfiguration()).setUsePooledConnection(usePooledConnection);
         }
     }
 
+    /**
+     * Enables or disables whether a Spring {@link SingleConnectionFactory} will be used
so that when
+     * messages are sent to ActiveMQ from outside of a message consuming thread, pooling
will be used rather
+     * than the default with the Spring {@link JmsTemplate} which will create a new connection,
session, producer
+     * for each message then close them all down again.
+     * <p/>
+     * The default value is false and a pooled connection is used by default.
+     */
     public void setUseSingleConnection(boolean useSingleConnection) {
         if (getConfiguration() instanceof ActiveMQConfiguration) {
             ((ActiveMQConfiguration)getConfiguration()).setUseSingleConnection(useSingleConnection);

http://git-wip-us.apache.org/repos/asf/activemq/blob/d5101d46/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java
----------------------------------------------------------------------
diff --git a/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java
b/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java
index 5b9007b..7eecac2 100644
--- a/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java
+++ b/activemq-camel/src/main/java/org/apache/activemq/camel/component/ActiveMQConfiguration.java
@@ -17,7 +17,6 @@
 package org.apache.activemq.camel.component;
 
 import java.lang.reflect.Constructor;
-
 import javax.jms.ConnectionFactory;
 
 import org.apache.activemq.Service;
@@ -32,12 +31,12 @@ import org.springframework.transaction.PlatformTransactionManager;
  *
  */
 public class ActiveMQConfiguration extends JmsConfiguration {
+    private ActiveMQComponent activeMQComponent;
     private String brokerURL = ActiveMQConnectionFactory.DEFAULT_BROKER_URL;
     private boolean useSingleConnection = false;
     private boolean usePooledConnection = true;
     private String userName;
     private String password;
-    private ActiveMQComponent activeMQComponent;
 
     public ActiveMQConfiguration() {
     }
@@ -66,7 +65,6 @@ public class ActiveMQConfiguration extends JmsConfiguration {
 
     /**
      * Sets the username to be used to login to ActiveMQ
-     * @param userName
      */
     public void setUserName(String userName) {
         this.userName = userName;
@@ -78,8 +76,6 @@ public class ActiveMQConfiguration extends JmsConfiguration {
 
     /**
      * Sets the password/passcode used to login to ActiveMQ
-     *
-     * @param password
      */
     public void setPassword(String password) {
         this.password = password;
@@ -92,8 +88,6 @@ public class ActiveMQConfiguration extends JmsConfiguration {
      * for each message then close them all down again.
      * <p/>
      * The default value is false and a pooled connection is used by default.
-     *
-     * @param useSingleConnection
      */
     public void setUseSingleConnection(boolean useSingleConnection) {
         this.useSingleConnection = useSingleConnection;


Mime
View raw message