camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [03/10] camel git commit: CAMEL-9491 : statement.maxRows not working as expected camel jdbc

Date Fri, 08 Jan 2016 16:40:58 GMT
CAMEL-9491 : statement.maxRows not working as expected camel jdbc



Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dbd5c5b1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dbd5c5b1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dbd5c5b1

Branch: refs/heads/master
Commit: dbd5c5b136bdd7246184fa9be220a501a83054a6
Parents: f024f71
Author: gautric <gautric@redhat.com>
Authored: Fri Jan 8 16:54:01 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Jan 8 17:38:33 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/jdbc/JdbcProducer.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dbd5c5b1/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java
b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java
index 7efe001..5d45864 100644
--- a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java
+++ b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcProducer.java
@@ -23,10 +23,12 @@ import java.sql.SQLDataException;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+
 import javax.sql.DataSource;
 
 import org.apache.camel.Exchange;
@@ -193,7 +195,8 @@ public class JdbcProducer extends DefaultProducer {
             stmt = conn.createStatement();
 
             if (parameters != null && !parameters.isEmpty()) {
-                IntrospectionSupport.setProperties(stmt, parameters);
+                Map<String, Object> copy = new HashMap<String, Object>(parameters);
+                IntrospectionSupport.setProperties(stmt, copy);
             }
 
             LOG.debug("Executing JDBC Statement: {}", sql);


Mime
View raw message