activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r515963 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
Date Thu, 08 Mar 2007 08:23:07 GMT
Author: jstrachan
Date: Thu Mar  8 00:23:06 2007
New Revision: 515963

URL: http://svn.apache.org/viewvc?view=rev&rev=515963
Log:
fix for   AMQ-1193

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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java?view=diff&rev=515963&r1=515962&r2=515963
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
Thu Mar  8 00:23:06 2007
@@ -17,22 +17,28 @@
  */
 package org.apache.activemq.store.jdbc.adapter;
 
+import org.apache.activemq.store.jdbc.Statements;
+
 import java.sql.Blob;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
 /**
- *
- * @org.apache.xbean.XBean element="db2JDBCAdapter"
- *
  * @version $Revision: 1.2 $
+ * @org.apache.xbean.XBean element="db2JDBCAdapter"
  */
 public class DB2JDBCAdapter extends DefaultJDBCAdapter {
-
     public DB2JDBCAdapter() {
-        batchStatments=false;
+        batchStatments = false;
     }
-    
+
+    public void setStatements(Statements statements) {
+        String lockCreateStatement = "LOCK TABLE " + statements.getFullLockTableName() +
" IN EXCLUSIVE MODE";
+        statements.setLockCreateStatement(lockCreateStatement);
+
+        super.setStatements(statements);
+    }
+
     protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException {
         // Get as a BLOB
         Blob aBlob = rs.getBlob(index);



Mime
View raw message