activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r892729 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc: Statements.java adapter/DefaultJDBCAdapter.java
Date Mon, 21 Dec 2009 08:49:56 GMT
Author: dejanb
Date: Mon Dec 21 08:49:56 2009
New Revision: 892729

URL: http://svn.apache.org/viewvc?rev=892729&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQ-2473 - fix find all message ids statement

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.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/Statements.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java?rev=892729&r1=892728&r2=892729&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/Statements.java
Mon Dec 21 08:49:56 2009
@@ -65,6 +65,7 @@
     private String destinationMessageCountStatement;
     private String findNextMessagesStatement;
     private boolean useLockCreateWhereClause;
+    private String findAllMessageIdsStatement;
 
     public String[] getCreateSchemaStatements() {
         if (createSchemaStatements == null) {
@@ -146,14 +147,14 @@
         return findAllMessagesStatement;
     }
     
-    public String getFindAllMessageIds() {
+    public String getFindAllMessageIdsStatement() {
         //  this needs to be limited maybe need to use getFindLastSequenceIdInMsgsStatement
         // and work back for X
-        if (findAllMessagesStatement == null) {
-            findAllMessagesStatement = "SELECT ID, MSGID_PROD, MSGID_SEQ FROM " + getFullMessageTableName()
+        if (findAllMessageIdsStatement == null) {
+            findAllMessageIdsStatement = "SELECT ID, MSGID_PROD, MSGID_SEQ FROM " + getFullMessageTableName()
                                        + " WHERE CONTAINER=? ORDER BY ID DESC";
         }
-        return findAllMessagesStatement;
+        return findAllMessageIdsStatement;
     }
 
     public String getFindLastSequenceIdInMsgsStatement() {

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=892729&r1=892728&r2=892729&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
Mon Dec 21 08:49:56 2009
@@ -332,7 +332,7 @@
         PreparedStatement s = null;
         ResultSet rs = null;
         try {
-            s = c.getConnection().prepareStatement(this.statements.getFindAllMessageIds());
+            s = c.getConnection().prepareStatement(this.statements.getFindAllMessageIdsStatement());
             s.setString(1, destination.getQualifiedName());
             // limit the query. just need the the last few messages that could be replayed

             // on recovery. send or commit reply lost so it gets replayed.



Mime
View raw message