activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1360095 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
Date Wed, 11 Jul 2012 10:12:31 GMT
Author: gtully
Date: Wed Jul 11 10:12:31 2012
New Revision: 1360095

URL: http://svn.apache.org/viewvc?rev=1360095&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-1191 - apply patch from Mikhail Melamud with thanks.
fix up lock statement when isUseLockCreateWhereClause is set

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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java?rev=1360095&r1=1360094&r2=1360095&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/TransactJDBCAdapter.java
Wed Jul 11 10:12:31 2012
@@ -28,12 +28,12 @@ import org.apache.activemq.store.jdbc.St
 public class TransactJDBCAdapter extends ImageBasedJDBCAdaptor {
     @Override
     public void setStatements(Statements statements) {
-        String lockCreateStatement = "SELECT * FROM " + statements.getFullLockTableName();
+        String lockCreateStatement = "SELECT * FROM " + statements.getFullLockTableName()
+ " WITH (UPDLOCK, ROWLOCK)";
 
         if (statements.isUseLockCreateWhereClause()) {
             lockCreateStatement += " WHERE ID = 1";
         }
-        lockCreateStatement += " WITH (UPDLOCK, ROWLOCK)";
+
         statements.setLockCreateStatement(lockCreateStatement);
 
         super.setStatements(statements);



Mime
View raw message