activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r393265 - in /incubator/activemq/trunk/activemq-core/src/main: java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_db2_jdbc_universal_driver_architecture
Date Tue, 11 Apr 2006 17:29:29 GMT
Author: chirino
Date: Tue Apr 11 10:29:26 2006
New Revision: 393265

URL: http://svn.apache.org/viewcvs?rev=393265&view=rev
Log:
Better DB2 support.  Thanks goes to Klaus Terjung on activemq-users list for providing the
needed info.

Added:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
  (with props)
Modified:
    incubator/activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_db2_jdbc_universal_driver_architecture

Added: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java?rev=393265&view=auto
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
(added)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
Tue Apr 11 10:29:26 2006
@@ -0,0 +1,40 @@
+/**
+ *
+ * Copyright 2005-2006 The Apache Software Foundation
+ *
+ * Licensed 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());
+    }
+}

Propchange: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/DB2JDBCAdapter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_db2_jdbc_universal_driver_architecture
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_db2_jdbc_universal_driver_architecture?rev=393265&r1=393264&r2=393265&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_db2_jdbc_universal_driver_architecture
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/resources/META-INF/services/org/apache/activemq/store/jdbc/ibm_db2_jdbc_universal_driver_architecture
Tue Apr 11 10:29:26 2006
@@ -1 +1 @@
-class=org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter
\ No newline at end of file
+class=org.apache.activemq.store.jdbc.adapter.DB2JDBCAdapter
\ No newline at end of file



Mime
View raw message