You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/01/08 17:40:56 UTC
[01/10] camel git commit: CAMEL-9491 : statement.maxRows not working
as expected camel jdbc
Repository: camel
Updated Branches:
refs/heads/camel-2.15.x 5ee90c1aa -> e36c7bfcb
refs/heads/camel-2.16.x 110f4001d -> 9311f8254
refs/heads/master 7253ae98f -> dbd5c5b13
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/6778aa26
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6778aa26
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6778aa26
Branch: refs/heads/master
Commit: 6778aa26187863be617b96fa67a195241097ae3d
Parents: 5ff0eb1
Author: gautric <ga...@redhat.com>
Authored: Fri Jan 8 16:36:44 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jan 8 17:38:32 2016 +0100
----------------------------------------------------------------------
.../camel/component/jdbc/JdbcFix9491Test.java | 61 ++++++++++++++++++++
1 file changed, 61 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/6778aa26/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
----------------------------------------------------------------------
diff --git a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
new file mode 100644
index 0000000..32928bf
--- /dev/null
+++ b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
@@ -0,0 +1,61 @@
+/**
+ * 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.camel.component.jdbc;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Unit test based on user forum request about this component
+ */
+public class JdbcFix9491Test extends AbstractJdbcTestSupport {
+
+ @EndpointInject(uri = "mock:result")
+ private MockEndpoint mock;
+
+ @EndpointInject(uri = "direct:start")
+ private ProducerTemplate direct;
+
+ @Test
+ public void testTimerInvoked() throws Exception {
+ mock.expectedMessageCount(2);
+
+ direct.sendBody("select * from customer");
+ direct.sendBody("select * from customer");
+
+ assertMockEndpointsSatisfied();
+ Assert.assertEquals(3,mock.getReceivedExchanges().get(1).getIn().getBody(List.class).size());
+
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ public void configure() throws Exception {
+ from("direct:start").
+ to("jdbc:testdb").to("mock:result");
+ }
+ };
+ }
+}
[08/10] camel git commit: CAMEL-9491 : statement.maxRows not working
as expected camel jdbc
Posted by da...@apache.org.
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/6603feb8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6603feb8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6603feb8
Branch: refs/heads/camel-2.15.x
Commit: 6603feb8a870a56e022f67b295c7122b4e360957
Parents: 5ee90c1
Author: gautric <ga...@redhat.com>
Authored: Fri Jan 8 16:36:44 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jan 8 17:40:35 2016 +0100
----------------------------------------------------------------------
.../camel/component/jdbc/JdbcFix9491Test.java | 61 ++++++++++++++++++++
1 file changed, 61 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/6603feb8/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
----------------------------------------------------------------------
diff --git a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
new file mode 100644
index 0000000..32928bf
--- /dev/null
+++ b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
@@ -0,0 +1,61 @@
+/**
+ * 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.camel.component.jdbc;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Unit test based on user forum request about this component
+ */
+public class JdbcFix9491Test extends AbstractJdbcTestSupport {
+
+ @EndpointInject(uri = "mock:result")
+ private MockEndpoint mock;
+
+ @EndpointInject(uri = "direct:start")
+ private ProducerTemplate direct;
+
+ @Test
+ public void testTimerInvoked() throws Exception {
+ mock.expectedMessageCount(2);
+
+ direct.sendBody("select * from customer");
+ direct.sendBody("select * from customer");
+
+ assertMockEndpointsSatisfied();
+ Assert.assertEquals(3,mock.getReceivedExchanges().get(1).getIn().getBody(List.class).size());
+
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ public void configure() throws Exception {
+ from("direct:start").
+ to("jdbc:testdb").to("mock:result");
+ }
+ };
+ }
+}
[05/10] camel git commit: CAMEL-9491 : statement.maxRows not working
as expected camel jdbc
Posted by da...@apache.org.
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/1c66c303
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1c66c303
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1c66c303
Branch: refs/heads/camel-2.16.x
Commit: 1c66c303f1401ae3215326ff1557eef3e840a941
Parents: 110f400
Author: gautric <ga...@redhat.com>
Authored: Fri Jan 8 16:36:44 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jan 8 17:40:05 2016 +0100
----------------------------------------------------------------------
.../camel/component/jdbc/JdbcFix9491Test.java | 61 ++++++++++++++++++++
1 file changed, 61 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/1c66c303/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
----------------------------------------------------------------------
diff --git a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
new file mode 100644
index 0000000..32928bf
--- /dev/null
+++ b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
@@ -0,0 +1,61 @@
+/**
+ * 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.camel.component.jdbc;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Unit test based on user forum request about this component
+ */
+public class JdbcFix9491Test extends AbstractJdbcTestSupport {
+
+ @EndpointInject(uri = "mock:result")
+ private MockEndpoint mock;
+
+ @EndpointInject(uri = "direct:start")
+ private ProducerTemplate direct;
+
+ @Test
+ public void testTimerInvoked() throws Exception {
+ mock.expectedMessageCount(2);
+
+ direct.sendBody("select * from customer");
+ direct.sendBody("select * from customer");
+
+ assertMockEndpointsSatisfied();
+ Assert.assertEquals(3,mock.getReceivedExchanges().get(1).getIn().getBody(List.class).size());
+
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ public void configure() throws Exception {
+ from("direct:start").
+ to("jdbc:testdb").to("mock:result");
+ }
+ };
+ }
+}
[06/10] camel git commit: CAMEL-9491 : statement.maxRows not working
as expected camel jdbc
Posted by da...@apache.org.
CAMEL-9491 : statement.maxRows not working as expected camel jdbc
add maxrows test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6c54fdcd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6c54fdcd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6c54fdcd
Branch: refs/heads/camel-2.16.x
Commit: 6c54fdcd6e5525c208b3c018d37f47cf6d8affc4
Parents: 1c66c30
Author: gautric <ga...@redhat.com>
Authored: Fri Jan 8 16:49:43 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jan 8 17:40:11 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/camel/component/jdbc/JdbcFix9491Test.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/6c54fdcd/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
----------------------------------------------------------------------
diff --git a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
index 32928bf..dc80d42 100644
--- a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
+++ b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
@@ -45,7 +45,7 @@ public class JdbcFix9491Test extends AbstractJdbcTestSupport {
direct.sendBody("select * from customer");
assertMockEndpointsSatisfied();
- Assert.assertEquals(3,mock.getReceivedExchanges().get(1).getIn().getBody(List.class).size());
+ Assert.assertEquals(2,mock.getReceivedExchanges().get(1).getIn().getBody(List.class).size());
}
@@ -54,7 +54,7 @@ public class JdbcFix9491Test extends AbstractJdbcTestSupport {
return new RouteBuilder() {
public void configure() throws Exception {
from("direct:start").
- to("jdbc:testdb").to("mock:result");
+ to("jdbc:testdb?statement.maxRows=2").to("mock:result");
}
};
}
[02/10] camel git commit: Fix potential NPE and set body instead of
lazy.
Posted by da...@apache.org.
Fix potential NPE and set body instead of lazy.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5ff0eb17
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5ff0eb17
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5ff0eb17
Branch: refs/heads/master
Commit: 5ff0eb17a6194dbc898e9190a8f9c0cc317771be
Parents: 7253ae9
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Jan 8 15:48:44 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jan 8 17:38:32 2016 +0100
----------------------------------------------------------------------
.../apache/camel/component/irc/IrcMessage.java | 4 ++++
.../apache/camel/component/irc/IrcProducer.java | 23 ++++++++++----------
2 files changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/5ff0eb17/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcMessage.java
----------------------------------------------------------------------
diff --git a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcMessage.java b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcMessage.java
index 48a8e6b..be4bc8a 100644
--- a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcMessage.java
+++ b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcMessage.java
@@ -39,6 +39,7 @@ public class IrcMessage extends DefaultMessage {
this.messageType = messageType;
this.user = user;
this.message = message;
+ setBody(message);
}
public IrcMessage(String messageType, String target, IRCUser user, String message) {
@@ -46,6 +47,7 @@ public class IrcMessage extends DefaultMessage {
this.target = target;
this.user = user;
this.message = message;
+ setBody(message);
}
public IrcMessage(String messageType, String target, IRCUser user, String whoWasKickedNick, String message) {
@@ -54,6 +56,7 @@ public class IrcMessage extends DefaultMessage {
this.user = user;
this.whoWasKickedNick = whoWasKickedNick;
this.message = message;
+ setBody(message);
}
public IrcMessage(String messageType, String target, IRCUser user) {
@@ -67,6 +70,7 @@ public class IrcMessage extends DefaultMessage {
this.num = num;
this.value = value;
this.message = message;
+ setBody(message);
}
public String getMessageType() {
http://git-wip-us.apache.org/repos/asf/camel/blob/5ff0eb17/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcProducer.java b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcProducer.java
index 409b376..a129be9 100644
--- a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcProducer.java
+++ b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcProducer.java
@@ -50,16 +50,18 @@ public class IrcProducer extends DefaultProducer {
throw new RuntimeCamelException("Lost connection to " + connection.getHost());
}
- if (isMessageACommand(msg)) {
- LOG.debug("Sending command: {}", msg);
- connection.send(msg);
- } else if (targetChannel != null) {
- LOG.debug("Sending to: {} message: {}", targetChannel, msg);
- connection.doPrivmsg(targetChannel, msg);
- } else {
- for (IrcChannel channel : endpoint.getConfiguration().getChannels()) {
- LOG.debug("Sending to: {} message: {}", channel, msg);
- connection.doPrivmsg(channel.getName(), msg);
+ if (msg != null) {
+ if (isMessageACommand(msg)) {
+ LOG.debug("Sending command: {}", msg);
+ connection.send(msg);
+ } else if (targetChannel != null) {
+ LOG.debug("Sending to: {} message: {}", targetChannel, msg);
+ connection.doPrivmsg(targetChannel, msg);
+ } else {
+ for (IrcChannel channel : endpoint.getConfiguration().getChannels()) {
+ LOG.debug("Sending to: {} message: {}", channel, msg);
+ connection.doPrivmsg(channel.getName(), msg);
+ }
}
}
}
@@ -72,7 +74,6 @@ public class IrcProducer extends DefaultProducer {
endpoint.joinChannels();
}
-
@Override
protected void doStop() throws Exception {
if (connection != null) {
[04/10] camel git commit: CAMEL-9491 : statement.maxRows not working
as expected camel jdbc
Posted by da...@apache.org.
CAMEL-9491 : statement.maxRows not working as expected camel jdbc
add maxrows test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f024f716
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f024f716
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f024f716
Branch: refs/heads/master
Commit: f024f7168a14f66387abe9581ee97af6aee1824f
Parents: 6778aa2
Author: gautric <ga...@redhat.com>
Authored: Fri Jan 8 16:49:43 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jan 8 17:38:33 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/camel/component/jdbc/JdbcFix9491Test.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/f024f716/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
----------------------------------------------------------------------
diff --git a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
index 32928bf..dc80d42 100644
--- a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
+++ b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
@@ -45,7 +45,7 @@ public class JdbcFix9491Test extends AbstractJdbcTestSupport {
direct.sendBody("select * from customer");
assertMockEndpointsSatisfied();
- Assert.assertEquals(3,mock.getReceivedExchanges().get(1).getIn().getBody(List.class).size());
+ Assert.assertEquals(2,mock.getReceivedExchanges().get(1).getIn().getBody(List.class).size());
}
@@ -54,7 +54,7 @@ public class JdbcFix9491Test extends AbstractJdbcTestSupport {
return new RouteBuilder() {
public void configure() throws Exception {
from("direct:start").
- to("jdbc:testdb").to("mock:result");
+ to("jdbc:testdb?statement.maxRows=2").to("mock:result");
}
};
}
[09/10] camel git commit: CAMEL-9491 : statement.maxRows not working
as expected camel jdbc
Posted by da...@apache.org.
CAMEL-9491 : statement.maxRows not working as expected camel jdbc
add maxrows test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c080086b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c080086b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c080086b
Branch: refs/heads/camel-2.15.x
Commit: c080086be0f74ec17e0d6a2063c457c94bc25f87
Parents: 6603feb
Author: gautric <ga...@redhat.com>
Authored: Fri Jan 8 16:49:43 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jan 8 17:40:41 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/camel/component/jdbc/JdbcFix9491Test.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/c080086b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
----------------------------------------------------------------------
diff --git a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
index 32928bf..dc80d42 100644
--- a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
+++ b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcFix9491Test.java
@@ -45,7 +45,7 @@ public class JdbcFix9491Test extends AbstractJdbcTestSupport {
direct.sendBody("select * from customer");
assertMockEndpointsSatisfied();
- Assert.assertEquals(3,mock.getReceivedExchanges().get(1).getIn().getBody(List.class).size());
+ Assert.assertEquals(2,mock.getReceivedExchanges().get(1).getIn().getBody(List.class).size());
}
@@ -54,7 +54,7 @@ public class JdbcFix9491Test extends AbstractJdbcTestSupport {
return new RouteBuilder() {
public void configure() throws Exception {
from("direct:start").
- to("jdbc:testdb").to("mock:result");
+ to("jdbc:testdb?statement.maxRows=2").to("mock:result");
}
};
}
[03/10] camel git commit: CAMEL-9491 : statement.maxRows not working as expected camel jdbc
Posted by da...@apache.org.
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 <ga...@redhat.com>
Authored: Fri Jan 8 16:54:01 2016 +0100
Committer: Claus Ibsen <da...@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);
[10/10] camel git commit: CAMEL-9491 : statement.maxRows not working as expected camel jdbc
Posted by da...@apache.org.
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/e36c7bfc
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e36c7bfc
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e36c7bfc
Branch: refs/heads/camel-2.15.x
Commit: e36c7bfcb4a903f3d8f5971f2b29e5267636a2d8
Parents: c080086
Author: gautric <ga...@redhat.com>
Authored: Fri Jan 8 16:54:01 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jan 8 17:40:47 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/e36c7bfc/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 13ecade..6ece40c 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);
[07/10] camel git commit: CAMEL-9491 : statement.maxRows not working as expected camel jdbc
Posted by da...@apache.org.
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/9311f825
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9311f825
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9311f825
Branch: refs/heads/camel-2.16.x
Commit: 9311f8254a2acfb8586ef344f4512ff2dfae6488
Parents: 6c54fdc
Author: gautric <ga...@redhat.com>
Authored: Fri Jan 8 16:54:01 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri Jan 8 17:40:17 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/9311f825/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);