activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r893661 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc: JDBCPersistenceAdapter.java adapter/DefaultJDBCAdapter.java
Date Thu, 24 Dec 2009 00:38:28 GMT
Author: gtully
Date: Thu Dec 24 00:38:28 2009
New Revision: 893661

URL: http://svn.apache.org/viewvc?rev=893661&view=rev
Log:
last piece of https://issues.apache.org/activemq/browse/AMQ-2540 - fix order or audit recovery
replay

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java?rev=893661&r1=893660&r2=893661&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
Thu Dec 24 00:38:28 2009
@@ -519,7 +519,7 @@
             e = e.getNextException();
             s += ", due to: " + e.getMessage();
         }
-        LOG.debug(s, e);
+        LOG.warn(s, e);
     }
 
     public Statements getStatements() {

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java?rev=893661&r1=893660&r2=893661&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DefaultJDBCAdapter.java
Thu Dec 24 00:38:28 2009
@@ -25,6 +25,7 @@
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
@@ -335,8 +336,13 @@
             s = c.getConnection().prepareStatement(this.statements.getFindAllMessageIdsStatement());
             s.setMaxRows(limit);
             rs = s.executeQuery();
+            // jdbc scrollable cursor requires jdbc ver > 1.0 andis  often implemented
locally so avoid
+            LinkedList<MessageId> reverseOrderIds = new LinkedList<MessageId>();
             while (rs.next()) {
-                listener.messageId(new MessageId(rs.getString(2), rs.getLong(3)));
+                reverseOrderIds.addFirst(new MessageId(rs.getString(2), rs.getLong(3)));
+            }
+            for (MessageId id : reverseOrderIds) {
+                listener.messageId(id);
             }
         } finally {
             close(rs);



Mime
View raw message