CAMEL-10918 create sjms2 component to add support for JMS 2.0

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

Branch: refs/heads/master
Commit: 5259843cd29f20cd10e275fb8acc8687f8c5e177
Parents: 014ab4c
Author: Claus Ibsen <davscl...@apache.org>
Authored: Mon Mar 13 20:02:25 2017 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Mon Mar 13 20:02:25 2017 +0100

----------------------------------------------------------------------
 components/camel-sjms2/pom.xml                  | 21 +++++++-------------
 .../src/main/docs/sjms2-component.adoc          |  4 ++--
 .../camel/component/sjms2/Sjms2Component.java   |  1 -
 .../camel/component/sjms2/Sjms2Endpoint.java    | 11 +++-------
 parent/pom.xml                                  |  1 +
 5 files changed, 13 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5259843c/components/camel-sjms2/pom.xml
----------------------------------------------------------------------
diff --git a/components/camel-sjms2/pom.xml b/components/camel-sjms2/pom.xml
index 71b8db3..497db6e 100644
--- a/components/camel-sjms2/pom.xml
+++ b/components/camel-sjms2/pom.xml
@@ -33,11 +33,12 @@
   <properties>
     <camel.osgi.export.pkg>
       org.apache.camel.component.sjms2,
-      org.apache.camel.component.sjms2.jms,
+      org.apache.camel.component.sjms2.jms
     </camel.osgi.export.pkg>
     <camel.osgi.export.service>
-      org.apache.camel.spi.ComponentResolver;component=sjms2,
+      org.apache.camel.spi.ComponentResolver;component=sjms2
     </camel.osgi.export.service>
+    
<camel.osgi.import.additional>javax.jms;version="[2,3)"</camel.osgi.import.additional>
   </properties>
 
   <dependencies>
@@ -67,14 +68,6 @@
       <scope>provided</scope>
     </dependency>
 
-
-    <!-- support camel documentation -->
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>apt</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
     <!-- logging -->
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
@@ -123,25 +116,25 @@
     <dependency>
       <groupId>org.apache.activemq</groupId>
       <artifactId>artemis-server</artifactId>
-      <version>1.5.3</version>
+      <version>${activemq-artemis-version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.activemq</groupId>
       <artifactId>artemis-jms-server</artifactId>
-      <version>1.5.3</version>
+      <version>${activemq-artemis-version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.activemq</groupId>
       <artifactId>artemis-jms-client</artifactId>
-      <version>1.5.3</version>
+      <version>${activemq-artemis-version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.activemq</groupId>
       <artifactId>artemis-amqp-protocol</artifactId>
-      <version>1.5.3</version>
+      <version>${activemq-artemis-version}</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

http://git-wip-us.apache.org/repos/asf/camel/blob/5259843c/components/camel-sjms2/src/main/docs/sjms2-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-sjms2/src/main/docs/sjms2-component.adoc 
b/components/camel-sjms2/src/main/docs/sjms2-component.adoc
index 299975e..ad7fd86 100644
--- a/components/camel-sjms2/src/main/docs/sjms2-component.adoc
+++ b/components/camel-sjms2/src/main/docs/sjms2-component.adoc
@@ -150,7 +150,7 @@ with the following path and query parameters:
 | namedReplyTo | producer |  | String | Sets the reply to destination name 
used for InOut producer endpoints.
 | persistent | producer | true | boolean | Flag used to enable/disable message 
persistence.
 | producerCount | producer | 1 | int | Sets the number of producers used for 
this endpoint.
-| ttl | producer | 1 | long | Flag used to adjust the Time To Live value of 
produced messages.
+| ttl | producer | -1 | long | Flag used to adjust the Time To Live value of 
produced messages.
 | allowNullBody | producer (advanced) | true | boolean | Whether to allow 
sending messages with no body. If this option is false and the message body is 
null then an JMSException is thrown.
 | prefillPool | producer (advanced) | true | boolean | Whether to prefill the 
producer connection pool on startup or create connections lazy when needed.
 | responseTimeOut | producer (advanced) | 5000 | long | Sets the amount of 
time we should wait before timing out a InOut response.
@@ -169,7 +169,7 @@ with the following path and query parameters:
 | errorHandlerLoggingLevel | logging | WARN | LoggingLevel | Allows to 
configure the default errorHandler logging level for logging uncaught 
exceptions.
 | errorHandlerLogStackTrace | logging | true | boolean | Allows to control 
whether stacktraces should be logged or not by the default errorHandler.
 | transacted | transaction | false | boolean | Specifies whether to use 
transacted mode
-| transactionBatchCount | transaction | 1 | int | If transacted sets the 
number of messages to process before committing a transaction.
+| transactionBatchCount | transaction | -1 | int | If transacted sets the 
number of messages to process before committing a transaction.
 | transactionBatchTimeout | transaction | 5000 | long | Sets timeout (in 
millis) for batch transactions the value should be 1000 or higher.
 | transactionCommitStrategy | transaction |  | TransactionCommitStrategy | 
Sets the commit strategy.
 | sharedJMSSession | transaction (advanced) | true | boolean | Specifies 
whether to share JMS session with other SJMS endpoints. Turn this off if your 
route is accessing to multiple JMS providers. If you need transaction against 
multiple JMS providers use jms component to leverage XA transaction.

http://git-wip-us.apache.org/repos/asf/camel/blob/5259843c/components/camel-sjms2/src/main/java/org/apache/camel/component/sjms2/Sjms2Component.java
----------------------------------------------------------------------
diff --git 
a/components/camel-sjms2/src/main/java/org/apache/camel/component/sjms2/Sjms2Component.java
 
b/components/camel-sjms2/src/main/java/org/apache/camel/component/sjms2/Sjms2Component.java
index 3029de9..88bb4ea 100644
--- 
a/components/camel-sjms2/src/main/java/org/apache/camel/component/sjms2/Sjms2Component.java
+++ 
b/components/camel-sjms2/src/main/java/org/apache/camel/component/sjms2/Sjms2Component.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.sjms2;
 
-
 import org.apache.camel.component.sjms.SjmsComponent;
 import org.apache.camel.component.sjms.SjmsEndpoint;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/5259843c/components/camel-sjms2/src/main/java/org/apache/camel/component/sjms2/Sjms2Endpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-sjms2/src/main/java/org/apache/camel/component/sjms2/Sjms2Endpoint.java
 
b/components/camel-sjms2/src/main/java/org/apache/camel/component/sjms2/Sjms2Endpoint.java
index 4abc311..bce7afd 100644
--- 
a/components/camel-sjms2/src/main/java/org/apache/camel/component/sjms2/Sjms2Endpoint.java
+++ 
b/components/camel-sjms2/src/main/java/org/apache/camel/component/sjms2/Sjms2Endpoint.java
@@ -27,21 +27,19 @@ import org.apache.camel.spi.UriParam;
 /**
  * The sjms2 component (simple jms) allows messages to be sent to (or consumed 
from) a JMS Queue or Topic.
  *
- * This component uses plain JMS API where as the jms component uses Spring 
JMS.
+ * This component uses plain JMS 2.x API where as the jms component uses 
Spring JMS.
  */
 @UriEndpoint(firstVersion = "2.19.0", scheme = "sjms2", extendsScheme = 
"sjms", title = "Simple JMS2",
         syntax = "sjms2:destinationType:destinationName", consumerClass = 
SjmsConsumer.class, label = "messaging")
 public class Sjms2Endpoint extends SjmsEndpoint implements AsyncEndpoint {
 
-
     @UriParam(label = "consumer")
     private String subscriptionId;
-    @UriParam(label = "consumer", defaultValue = "false")
+    @UriParam(label = "consumer")
     private boolean durable;
-    @UriParam(label = "consumer", defaultValue = "false")
+    @UriParam(label = "consumer")
     private boolean shared;
 
-
     public Sjms2Endpoint() {
     }
 
@@ -55,7 +53,6 @@ public class Sjms2Endpoint extends SjmsEndpoint implements 
AsyncEndpoint {
         return (Sjms2Component) super.getComponent();
     }
 
-
     /**
      * Sets the durable subscription Id required for durable topics.
      */
@@ -100,6 +97,4 @@ public class Sjms2Endpoint extends SjmsEndpoint implements 
AsyncEndpoint {
         this.shared = shared;
     }
 
-
-
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/5259843c/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 20e1e2f..b30738a 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -38,6 +38,7 @@
     <abdera-version>1.1.3</abdera-version>
     <!-- Note that activemq dependency is only used for testing! -->
     <activemq-version>5.14.4</activemq-version>
+    <activemq-artemis-version>1.5.4</activemq-artemis-version>
     <aether-version>1.0.2.v20150114</aether-version>
     <ahc-version>2.0.30</ahc-version>
     <ant-bundle-version>1.7.0_6</ant-bundle-version>

Reply via email to