activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-5384 - apply variant of patch from Tomasz Skorka with thanks
Date Tue, 07 Oct 2014 14:55:26 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk b5581166b -> ad770ea79


https://issues.apache.org/jira/browse/AMQ-5384 - apply variant of patch from Tomasz Skorka
with thanks


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

Branch: refs/heads/trunk
Commit: ad770ea79d9eaf9e40216ed2e116b2544fcd8e3e
Parents: b558116
Author: gtully <gary.tully@gmail.com>
Authored: Tue Oct 7 15:54:21 2014 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Tue Oct 7 15:54:21 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/activemq/store/jdbc/JDBCMessageStore.java | 7 ++-----
 .../apache/activemq/store/jdbc/JDBCPersistenceAdapter.java    | 4 ++--
 2 files changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/ad770ea7/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
----------------------------------------------------------------------
diff --git a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
index 9f53cc1..43daff2 100755
--- a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
+++ b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCMessageStore.java
@@ -248,7 +248,7 @@ public class JDBCMessageStore extends AbstractMessageStore {
 
     	long seq = ack.getLastMessageId().getFutureOrSequenceLong() != null ?
                 (Long) ack.getLastMessageId().getFutureOrSequenceLong() :
-                persistenceAdapter.getStoreSequenceIdForMessageId(ack.getLastMessageId(),
destination)[0];
+                persistenceAdapter.getStoreSequenceIdForMessageId(context, ack.getLastMessageId(),
destination)[0];
 
         // Get a connection and remove the message from the DB
         TransactionContext c = persistenceAdapter.getTransactionContext(context);
@@ -260,9 +260,6 @@ public class JDBCMessageStore extends AbstractMessageStore {
         } finally {
             c.close();
         }
-        //if (context != null && context.getXid() != null) {
-        //    ack.getLastMessageId().setEntryLocator(seq);
-        //}
     }
 
     public void recover(final MessageRecoveryListener listener) throws Exception {
@@ -389,7 +386,7 @@ public class JDBCMessageStore extends AbstractMessageStore {
     @Override
     public void setBatch(MessageId messageId) {
         try {
-            long[] storedValues = persistenceAdapter.getStoreSequenceIdForMessageId(messageId,
destination);
+            long[] storedValues = persistenceAdapter.getStoreSequenceIdForMessageId(null,
messageId, destination);
             lastRecoveredSequenceId.set(storedValues[0]);
             lastRecoveredPriority.set(storedValues[1]);
         } catch (IOException ignoredAsAlreadyLogged) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/ad770ea7/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
----------------------------------------------------------------------
diff --git a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
index 0a6dde8..3c7c7cd 100755
--- a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
+++ b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
@@ -833,9 +833,9 @@ public class JDBCPersistenceAdapter extends DataSourceServiceSupport implements
         }
     }
 
-    long[] getStoreSequenceIdForMessageId(MessageId messageId, ActiveMQDestination destination)
throws IOException {
+    long[] getStoreSequenceIdForMessageId(ConnectionContext context, MessageId messageId,
ActiveMQDestination destination) throws IOException {
         long[] result = new long[]{-1, Byte.MAX_VALUE -1};
-        TransactionContext c = getTransactionContext();
+        TransactionContext c = getTransactionContext(context);
         try {
             result = adapter.getStoreSequenceId(c, destination, messageId);
         } catch (SQLException e) {


Mime
View raw message