1 18 package org.apache.activemq.store.jdbc.adapter; 19 20 import org.apache.activemq.store.jdbc.Statements; 21 22 import java.sql.Blob ; 23 import java.sql.ResultSet ; 24 import java.sql.SQLException ; 25 26 30 public class DB2JDBCAdapter extends DefaultJDBCAdapter { 31 public DB2JDBCAdapter() { 32 batchStatments = false; 33 } 34 35 public void setStatements(Statements statements) { 36 String lockCreateStatement = "LOCK TABLE " + statements.getFullLockTableName() + " IN EXCLUSIVE MODE"; 37 statements.setLockCreateStatement(lockCreateStatement); 38 39 super.setStatements(statements); 40 } 41 42 protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException { 43 Blob aBlob = rs.getBlob(index); 45 return aBlob.getBytes(1, (int) aBlob.length()); 46 } 47 } 48 | Popular Tags |