/**
 *
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.activemq.store.jdbc.adapter;

import java.sql.Blob;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @org.apache.xbean.XBean element="db2JDBCAdapter"
 *
 * @version $Revision: 1.2 $
 */
public class DB2JDBCAdapter extends DefaultJDBCAdapter {

    public DB2JDBCAdapter() {
        batchStatments=false;
    }
    
    protected byte[] getBinaryData(ResultSet rs, int index) throws SQLException {
        // Get as a BLOB
        Blob aBlob = rs.getBlob(index);
        return aBlob.getBytes(1, (int) aBlob.length());
    }
}

@@ -844,16 +844,67 @@
 apter;%0A%0A
+import org.apache.activemq.store.jdbc.Statements;%0A%0A
 import j
@@ -977,24 +977,50 @@
 ion;%0A%0A/**%0A *
+ @version $Revision: 1.2 $
 %0A * @org.apa
@@ -1064,40 +1064,8 @@
 er%22%0A
- *%0A * @version $Revision: 1.2 $%0A
  */%0A
@@ -1121,17 +1121,16 @@
 apter %7B%0A
-%0A
     publ
@@ -1173,17 +1173,19 @@
 tatments
-=
+ = 
 false;%0A 
@@ -1189,20 +1189,295 @@
 ;%0A    %7D%0A
-    
+%0A    public void setStatements(Statements statements) %7B%0A        String lockCreateStatement = %22LOCK TABLE %22 + statements.getFullLockTableName() + %22 IN EXCLUSIVE MODE%22;%0A        statements.setLockCreateStatement(lockCreateStatement);%0A%0A        super.setStatements(statements);%0A    %7D%0A
 %0A    pro

fix for AMQ-1193