You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2012/09/10 16:52:59 UTC

svn commit: r1382911 - in /camel/branches/camel-2.9.x: ./ components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java

Author: ningjiang
Date: Mon Sep 10 14:52:59 2012
New Revision: 1382911

URL: http://svn.apache.org/viewvc?rev=1382911&view=rev
Log:
Merged revisions 1382897 via svnmerge from 
https://svn.apache.org/repos/asf/camel/branches/camel-2.10.x

................
  r1382897 | ningjiang | 2012-09-10 22:45:36 +0800 (Mon, 10 Sep 2012) | 13 lines
  
  Merged revisions 1378825,1378827 via svnmerge from 
  https://svn.apache.org/repos/asf/camel/trunk
  
  ........
    r1378825 | ningjiang | 2012-08-30 15:08:46 +0800 (Thu, 30 Aug 2012) | 1 line
    
    CAMEL-5551 fix the issue that String types not converted from CLOB
  ........
    r1378827 | ningjiang | 2012-08-30 15:11:27 +0800 (Thu, 30 Aug 2012) | 1 line
    
    CAMEL-5551 fix the CS error
  ........
................

Modified:
    camel/branches/camel-2.9.x/   (props changed)
    camel/branches/camel-2.9.x/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1378825,1378827
  Merged /camel/branches/camel-2.10.x:r1382897

Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.9.x/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java?rev=1382911&r1=1382910&r2=1382911&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java (original)
+++ camel/branches/camel-2.9.x/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java Mon Sep 10 14:52:59 2012
@@ -21,6 +21,7 @@ import java.sql.ResultSet;
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
 import java.sql.Statement;
+import java.sql.Types;
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -213,7 +214,12 @@ public class JdbcProducer extends Defaul
                     }
                 }
                 // use index based which should be faster
-                row.put(columnName, rs.getObject(columnNumber));
+                int columnType = meta.getColumnType(columnNumber);
+                if (columnType == Types.CLOB || columnType == Types.BLOB) {
+                    row.put(columnName, rs.getString(columnNumber));
+                } else {
+                    row.put(columnName, rs.getObject(columnNumber));
+                }
             }
             data.add(row);
             rowNumber++;