You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2017/04/11 22:39:31 UTC

qpid-jms git commit: QPIDJMS-283 Ensure new TX started whenever there is pipelined failure

Repository: qpid-jms
Updated Branches:
  refs/heads/master 6c4abcf46 -> 091aa1df3


QPIDJMS-283 Ensure new TX started whenever there is pipelined failure

When offline the failover provider allows rollback to complete normally
as the TX has been terminated already so the command doesn't need to be
held.  We need to ensure that when these states happen we still look and
begin a new TX which will wait for connection restoration to complete.

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/091aa1df
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/091aa1df
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/091aa1df

Branch: refs/heads/master
Commit: 091aa1df304a2c954593e6a4e418bc40dbd392e9
Parents: 6c4abcf
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Apr 11 18:39:24 2017 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Tue Apr 11 18:39:24 2017 -0400

----------------------------------------------------------------------
 .../org/apache/qpid/jms/JmsLocalTransactionContext.java   | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/091aa1df/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsLocalTransactionContext.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsLocalTransactionContext.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsLocalTransactionContext.java
index e9a49ed..936d76c 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsLocalTransactionContext.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsLocalTransactionContext.java
@@ -206,6 +206,8 @@ public class JmsLocalTransactionContext implements JmsTransactionContext {
                         }
                     }
 
+                    throw cause;
+                } finally {
                     try {
                         // If the provider failed to start a new transaction there will not be
                         // a current provider transaction id present, so we attempt to create
@@ -217,10 +219,8 @@ public class JmsLocalTransactionContext implements JmsTransactionContext {
                         // TODO
                         // At this point the transacted session is now unrecoverable, we should
                         // probably close it.
-                        LOG.info("Failed to start new Transaction after failed commit of: {}", oldTransactionId);
+                        LOG.info("Failed to start new Transaction after failed rollback of: {}", oldTransactionId);
                     }
-
-                    throw cause;
                 }
             }
         } finally {
@@ -286,6 +286,8 @@ public class JmsLocalTransactionContext implements JmsTransactionContext {
                     }
                 }
 
+                throw cause;
+            } finally {
                 try {
                     // If the provider failed to start a new transaction there will not be
                     // a current provider transaction id present, so we attempt to create
@@ -299,8 +301,6 @@ public class JmsLocalTransactionContext implements JmsTransactionContext {
                     // probably close it.
                     LOG.info("Failed to start new Transaction after failed rollback of: {}", oldTransactionId);
                 }
-
-                throw cause;
             }
         } finally {
             lock.writeLock().unlock();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org