This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.25.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.25.x by this push:
     new 784dd1f  CAMEL-15377: Remove deprecation from transactedInOut
784dd1f is described below

commit 784dd1fcd555168b0efd400b0c178bb8566bfbf5
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Aug 5 19:22:53 2020 +0200

    CAMEL-15377: Remove deprecation from transactedInOut
---
 .../camel/component/jms/JmsConfiguration.java      | 30 ++++++++++++++++------
 .../apache/camel/component/jms/JmsEndpoint.java    |  1 -
 2 files changed, 22 insertions(+), 9 deletions(-)

diff --git 
a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
 
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
index 8a471b9..ac4b1cc 100644
--- 
a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
+++ 
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
@@ -252,7 +252,8 @@ public class JmsConfiguration implements Cloneable {
     @UriParam(label = "transaction",
             description = "Specifies whether to use transacted mode")
     private boolean transacted;
-    @Deprecated
+    @UriParam(label = "transaction",
+            description = "Specifies whether InOut operations (request reply) 
default to using transacted mode")
     private boolean transactedInOut;
     @UriParam(defaultValue = "true", label = "transaction,advanced",
             description = "If true, Camel will create a JmsTransactionManager, 
if there is no transactionManager injected when option transacted=true.")
@@ -1359,17 +1360,30 @@ public class JmsConfiguration implements Cloneable {
         this.transacted = consumerTransacted;
     }
 
-    /**
-     * Should InOut operations (request reply) default to using transacted 
mode?
-     * <p>
-     * By default this is false as you need to commit the outgoing request 
before you can consume the input
-     */
-    @Deprecated
     public boolean isTransactedInOut() {
         return transactedInOut;
     }
 
-    @Deprecated
+    /**
+     * Specifies whether InOut operations (request reply) default to using 
transacted mode.
+     *
+     * If this flag is set to true, then Spring JmsTemplate will have
+     * sessionTransacted set to true, and the acknowledgeMode as transacted
+     * on the JmsTemplate used for InOut operations.
+     *
+     * Note from Spring JMS: that within a JTA transaction, the parameters 
passed to
+     * createQueue, createTopic methods are not taken into account. Depending 
on the Java EE transaction context,
+     * the container makes its own decisions on these values. Analogously, 
these
+     * parameters are not taken into account within a locally managed 
transaction
+     * either, since Spring JMS operates on an existing JMS Session in this 
case.
+     * <p>Setting this flag to true will use a short local JMS transaction
+     * when running outside of a managed transaction, and a synchronized local
+     * JMS transaction in case of a managed transaction (other than an XA
+     * transaction) being present. This has the effect of a local JMS
+     * transaction being managed alongside the main transaction (which might
+     * be a native JDBC transaction), with the JMS transaction committing
+     * right after the main transaction.
+     */
     public void setTransactedInOut(boolean transactedInOut) {
         this.transactedInOut = transactedInOut;
     }
diff --git 
a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
 
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
index 91e8a11..1f1d612 100644
--- 
a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
+++ 
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
@@ -1042,7 +1042,6 @@ public class JmsEndpoint extends DefaultEndpoint 
implements AsyncEndpoint, Heade
     }
 
     @ManagedAttribute
-    @Deprecated
     public void setTransactedInOut(boolean transactedInOut) {
         getConfiguration().setTransactedInOut(transactedInOut);
     }

Reply via email to