svn commit: r919676 - in /websites/production/camel/content: cache/main.pageCache camel-2140-release.html

2014-08-17 Thread buildbot
Author: buildbot
Date: Mon Aug 18 06:17:48 2014
New Revision: 919676

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/camel-2140-release.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/camel-2140-release.html
==
--- websites/production/camel/content/camel-2140-release.html (original)
+++ websites/production/camel/content/camel-2140-release.html Mon Aug 18 
06:17:48 2014
@@ -84,7 +84,7 @@

 
 
-Camel 2.14.0 
release (currently in progress)http://camel.apache.org/download.data/camel-box-v1.0-150x200.png"; 
data-image-src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png";> New and NoteworthyWelcome to 
the 2.14.0 release which approx XXX issues resolved (new features, improvements 
and bug fixes such as...)Support for running on Java 1.8 
JVMsSpring 4.x supported.REST DSL to define REST services using a REST style 
with verbs such as get/post/put/delete etc. The Rest DSL supports Java and XML 
DSL.REST DSL
  integrated with Swagger to expose 
the service as swagger apis.Simple language defined in routes using 
resultType as boolean is now evaluated as predicate instead of as 
expression.Introduced RuntimeEndpointRegistry to capture runtime usage 
of endpoints in use during routing, such as dynamic endpoints from dynamic EIPs.Added event notification for 
routes added and removed.Allow to configure cache size in Recipient 
List, Routing Slip and Dynamic Router EIPs; and as well turn caching 
off.Netty 
HTTP producer now supports the CamelHttpPath header to define a 
dynamic context-path and query parameters to call the remote http 
server.Polling Consumer allows to configure 
initial queue size and whether to block when full when using the default
  EventDrivenPollingConsumer which most components does. We 
now block by default, as otherwise the message may be lost if the queue was 
full, and a new message was offered.https://issues.apache.org/jira/browse/CAMEL-7435";>Added a generic 
callback to configure the APNS service 
builder.Added StreamList option to 
the JDBC 
componentAllow to define Simple expressions for sql parameters 
of the SQL component.A new XML tokenizer that is truly XML-aware (e.g., 
supporting XML namespaces and complex hierarchical structures)Added 
option parallelAggregate to Multicast, Splitter and Recipient 
List EIPsSupport to set the variable map from message header 
in Velocity, Freemarker, StringTemplate.Added 
HazelcastInstance option to Hazelcast 
component.Producers from static EIPs such as  is is now also enlisted in JMX when Camel is starting 
routes.Unmarshal json to pojo using camel-jackson 
now supports a header to tell Camel what the pojo class name is, to allow more 
dynamic behavior, as otherwise the class name would be hardcoded.Also 
allow to configure camel-jackson to skip null values, by 
setting includes to NOT_NULL.And camel-jackson can now easily be configured to unmarshal 
 >to a List or 
 >List instead of either a single pojo 
 >or Map 
 >type. Introduced SynchronizationRouteAware 
 >allowing to have callbacks before/after an Exchange is being routed. This 
 >allows to trigger custom code at these points, for example after a route, but 
 >before a Consumer writes any response back to a caller (InOut 
 >mode).JDBC now supports 
 >outputClass for SelectList type.Routes starting from shape="rect" href="jms.html">JMS will now shutdown the consumer 
 >(MessageListenerContainer) quicker when CamelContext is being stopped. 
 >(assuming the acceptMessagesWhileStopping hasn't been set to true). This can 
 >also help a cleaner shutdown as otherwise some JMS clients may attempt 
 >re-connect/fail
 over during shutdown which isn't desired anyway as we are shutting 
down.OnCompletion can now be configured to use or not 
use a thread pool, and as well whether to run before or after the route 
consumer. Running before the consumer allows to modify the exchange before the 
consumer writes it as response to the callee (if consumer is InOut mode)Added Bulk Index message operation to Elasticsearch 
component.Added 
RoutePolicyFactory to create and 
assign a RoutePolicy for every route, instead of having to 
configure this for every route.https://cwiki.apache.org/confluence/display/CAMEL/Metrics+Component"; 
style="
 line-height: 1.4285715;">MetricsRoutePolicyFactory to expose route statistics using the 
codehale metrics 
library.Improved NettyWorkerPoolBuilder#build https://issues.apache.org/jira/browse/CAMEL-7583";>visibility.Fixed IssuesTimer consumer is 
now scheduled after CamelContext has started all routes, to ensure other routes 
is running when timer routes is tr

[2/2] git commit: Merge branch 'CAMEL-7589' of https://github.com/wuwen5/camel

2014-08-17 Thread davsclaus
Merge branch 'CAMEL-7589' of https://github.com/wuwen5/camel


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

Branch: refs/heads/master
Commit: e896fe5202ff9685c5aa7a6f200401a97dea6817
Parents: 8576a1f de13f93
Author: Claus Ibsen 
Authored: Mon Aug 18 07:55:15 2014 +0200
Committer: Claus Ibsen 
Committed: Mon Aug 18 07:55:15 2014 +0200

--
 .../org/apache/camel/impl/DefaultProducerTemplate.java  | 12 
 .../apache/camel/impl/DefaultProducerTemplateTest.java  |  3 +++
 2 files changed, 11 insertions(+), 4 deletions(-)
--




[1/2] git commit: CAMEL-7589: fix NPE

2014-08-17 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 8576a1fea -> e896fe520


CAMEL-7589: fix NPE


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

Branch: refs/heads/master
Commit: de13f934ecb300a93d3fc311fbb2f1de50343400
Parents: fc4cbdb
Author: wuwen 
Authored: Mon Aug 18 00:07:06 2014 +0800
Committer: wuwen 
Committed: Mon Aug 18 00:07:06 2014 +0800

--
 .../org/apache/camel/impl/DefaultProducerTemplate.java  | 12 
 .../apache/camel/impl/DefaultProducerTemplateTest.java  |  3 +++
 2 files changed, 11 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/de13f934/camel-core/src/main/java/org/apache/camel/impl/DefaultProducerTemplate.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/impl/DefaultProducerTemplate.java 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultProducerTemplate.java
index 7f852f7..6a7cfd4 100644
--- 
a/camel-core/src/main/java/org/apache/camel/impl/DefaultProducerTemplate.java
+++ 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultProducerTemplate.java
@@ -233,8 +233,10 @@ public class DefaultProducerTemplate extends 
ServiceSupport implements ProducerT
 Exchange result = send(endpoint, new Processor() {
 public void process(Exchange exchange) {
 Message in = exchange.getIn();
-for (Map.Entry header : headers.entrySet()) {
-in.setHeader(header.getKey(), header.getValue());
+if (headers != null) {
+for (Map.Entry header : 
headers.entrySet()) {
+in.setHeader(header.getKey(), header.getValue());
+}
 }
 in.setBody(body);
 }
@@ -251,8 +253,10 @@ public class DefaultProducerTemplate extends 
ServiceSupport implements ProducerT
 Exchange exchange = send(endpoint, pattern, new Processor() {
 public void process(Exchange exchange) throws Exception {
 Message in = exchange.getIn();
-for (Map.Entry header : headers.entrySet()) {
-in.setHeader(header.getKey(), header.getValue());
+if (headers != null) {
+for (Map.Entry header : 
headers.entrySet()) {
+in.setHeader(header.getKey(), header.getValue());
+}
 }
 in.setBody(body);
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/de13f934/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java
 
b/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java
index ab966eb..8e5942b 100644
--- 
a/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java
+++ 
b/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateTest.java
@@ -198,6 +198,9 @@ public class DefaultProducerTemplateTest extends 
ContextTestSupport {
 out = producer.requestBodyAndHeaders("Hello", headers);
 assertEquals("Bye Bye World", out);
 
+out = producer.requestBodyAndHeaders("Hello", null);
+assertEquals("Bye Bye World", out);
+
 producer.stop();
 }
 



[CONF] Apache Camel > Camel 2.14.0 Release

2014-08-17 Thread Claus Ibsen (Confluence)














  


Claus Ibsen edited the page:
 


Camel 2.14.0 Release   






...
New Languages 

XMLTokenizer

New Examples 

 camel-example-splunk 
 camel-example-servlet-rest-blueprint 
 camel-example-servlet-rest-tomcat 
 camel-example-spark-rest-tomcat 
 camel-example-box-osgi 

New Tutorials 
New Tooling
API changes
...






 View Online  · Like  · View Changes  
 Stop watching space  · Manage Notifications  


 


 


  This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software  






git commit: CAMEL-4304: Added camel-example-splunk. Thanks to Ninad Naik.

2014-08-17 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master fc4cbdbe7 -> 8576a1fea


CAMEL-4304: Added camel-example-splunk. Thanks to Ninad Naik.


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

Branch: refs/heads/master
Commit: 8576a1fea37fa6f447178e069888b533d6b1f5e0
Parents: fc4cbdb
Author: Claus Ibsen 
Authored: Mon Aug 18 07:53:07 2014 +0200
Committer: Claus Ibsen 
Committed: Mon Aug 18 07:53:07 2014 +0200

--
 examples/camel-example-splunk/README.txt|  45 
 examples/camel-example-splunk/pom.xml   | 113 +++
 .../example/splunk/SplunkEventProcessor.java|  36 
 .../splunk/SplunkPublishEventClient.java|  44 
 .../splunk/SplunkPublishEventRouteBuilder.java  |  38 
 .../example/splunk/SplunkSavedSearchClient.java |  36 
 .../splunk/SplunkSavedSearchRouteBuilder.java   |  37 
 .../example/splunk/SplunkSearchClient.java  |  37 
 .../splunk/SplunkSearchRouteBuilder.java|  38 
 .../src/main/resources/META-INF/LICENSE.txt | 203 +++
 .../src/main/resources/META-INF/NOTICE.txt  |  11 +
 .../src/main/resources/application.properties   |  21 ++
 .../src/main/resources/log4j.properties |  26 +++
 examples/pom.xml|   1 +
 parent/pom.xml  |   5 +
 15 files changed, 691 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/8576a1fe/examples/camel-example-splunk/README.txt
--
diff --git a/examples/camel-example-splunk/README.txt 
b/examples/camel-example-splunk/README.txt
new file mode 100644
index 000..5b61530
--- /dev/null
+++ b/examples/camel-example-splunk/README.txt
@@ -0,0 +1,45 @@
+Camel Splunk example
+=
+
+An example which shows how to integrate Camel with Splunk.
+
+This example requires that an Splunk Server is up and running.
+(For this example, sample data provide by Splunk was used. Steps 
+for loading this data into splunk are documented here:
+   
http://docs.splunk.com/Documentation/Splunk/latest/SearchTutorial/GetthetutorialdataintoSplunk)
+
+You can configure the details of the Splunk server in the file:
+  src/main/resources/application.properties
+
+You will need to compile this example first:
+  mvn compile
+
+This project consists of the following examples:
+   -Random search query on Splunk
+   -Saved search query on Splunk
+   -Publish an event to Splunk
+
+
+To run the random search client you type:
+  mvn compile exec:java -Psearch-client
+... and response data will be printed on the console.
+
+To run the saved search client you type:
+  mvn compile exec:java -Psaved-search-client
+... and response data will be printed on the console.
+
+To run the saved search client you type:
+  mvn compile exec:java -Ppublish-event-client
+... and logs will be printed on the console.
+
+You can enable verbose logging by adjusting the 
src/main/resources/log4j.properties
+  file as documented in the file.
+
+If you hit any problems please let us know on the Camel Forums
+  http://camel.apache.org/discussion-forums.html
+
+Please help us make Apache Camel better - we appreciate any feedback you may
+have.  Enjoy!
+
+
+The Camel riders!

http://git-wip-us.apache.org/repos/asf/camel/blob/8576a1fe/examples/camel-example-splunk/pom.xml
--
diff --git a/examples/camel-example-splunk/pom.xml 
b/examples/camel-example-splunk/pom.xml
new file mode 100644
index 000..cede766
--- /dev/null
+++ b/examples/camel-example-splunk/pom.xml
@@ -0,0 +1,113 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+  4.0.0
+
+  
+org.apache.camel
+examples
+2.14-SNAPSHOT
+  
+
+  camel-example-splunk
+  Camel :: Example :: Splunk
+  An example using Splunk
+
+  
+
+
+  org.apache.camel
+  camel-core
+
+
+
+  org.apache.camel
+  camel-splunk
+
+
+
+
+  org.slf4j
+  slf4j-log4j12
+
+
+
+  log4j
+  log4j
+
+
+  
+
+  
+
+
+  search-client
+  
+
+  
+  
+org.codehaus.mojo
+exec-maven-plugin
+
+  
org.apache.camel.example.splunk.SplunkSearchClient
+  false
+
+  
+
+  
+
+
+
+  saved-search-client
+  
+
+  
+  
+

git commit: CAMEL-7700: Limit the SQL component maxMessagesPerPoll option by using the jdbcTemplate.setMaxRows(size) method

2014-08-17 Thread cmueller
Repository: camel
Updated Branches:
  refs/heads/camel-2.12.x c12e76955 -> dc3c36bdc


CAMEL-7700: Limit the SQL component maxMessagesPerPoll option by using the 
jdbcTemplate.setMaxRows(size) method


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

Branch: refs/heads/camel-2.12.x
Commit: dc3c36bdca21d4e2740099a3e50d62bc5989b52d
Parents: c12e769
Author: cmueller 
Authored: Thu Aug 14 23:35:58 2014 +0200
Committer: cmueller 
Committed: Sun Aug 17 18:16:30 2014 +0200

--
 .../apache/camel/component/sql/SqlConsumer.java |  17 ++--
 .../sql/SqlConsumerMaxMessagesPerPollTest.java  | 101 +++
 .../sql/createAndPopulateDatabase4.sql  |  21 
 3 files changed, 133 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/dc3c36bd/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
--
diff --git 
a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
 
b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
index 57e80e5..8f9800c 100644
--- 
a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
+++ 
b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
@@ -36,9 +36,6 @@ import org.springframework.dao.DataAccessException;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.core.PreparedStatementCallback;
 
-/**
- *
- */
 public class SqlConsumer extends ScheduledBatchPollingConsumer {
 
 private final String query;
@@ -165,9 +162,8 @@ public class SqlConsumer extends 
ScheduledBatchPollingConsumer {
 int total = exchanges.size();
 
 // limit if needed
-if (maxMessagesPerPoll > 0 && total > maxMessagesPerPoll) {
-log.debug("Limiting to maximum messages to poll " + 
maxMessagesPerPoll + " as there was " + total + " messages in this poll.");
-total = maxMessagesPerPoll;
+if (maxMessagesPerPoll > 0 && total == maxMessagesPerPoll) {
+log.debug("Limiting to maximum messages to poll " + 
maxMessagesPerPoll + " as there was more messages in this poll.");
 }
 
 for (int index = 0; index < total && isBatchAllowed(); index++) {
@@ -311,4 +307,13 @@ public class SqlConsumer extends 
ScheduledBatchPollingConsumer {
 public void setBreakBatchOnConsumeFail(boolean breakBatchOnConsumeFail) {
 this.breakBatchOnConsumeFail = breakBatchOnConsumeFail;
 }
+
+@Override
+public void setMaxMessagesPerPoll(int maxMessagesPerPoll) {
+super.setMaxMessagesPerPoll(maxMessagesPerPoll);
+
+if (jdbcTemplate != null) {
+jdbcTemplate.setMaxRows(maxMessagesPerPoll);
+}
+}
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/dc3c36bd/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlConsumerMaxMessagesPerPollTest.java
--
diff --git 
a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlConsumerMaxMessagesPerPollTest.java
 
b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlConsumerMaxMessagesPerPollTest.java
new file mode 100644
index 000..51a7bb0
--- /dev/null
+++ 
b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlConsumerMaxMessagesPerPollTest.java
@@ -0,0 +1,101 @@
+/**
+ * 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.sql;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.After;
+import org.junit.Before;
+import org.jun

git commit: CAMEL-7700: Limit the SQL component maxMessagesPerPoll option by using the jdbcTemplate.setMaxRows(size) method

2014-08-17 Thread cmueller
Repository: camel
Updated Branches:
  refs/heads/camel-2.13.x 82b3e0785 -> a78377e50


CAMEL-7700: Limit the SQL component maxMessagesPerPoll option by using the 
jdbcTemplate.setMaxRows(size) method


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

Branch: refs/heads/camel-2.13.x
Commit: a78377e50e1eb031fd75bffc2a11ccc16a86273a
Parents: 82b3e07
Author: cmueller 
Authored: Thu Aug 14 23:35:58 2014 +0200
Committer: cmueller 
Committed: Sun Aug 17 18:01:45 2014 +0200

--
 .../apache/camel/component/sql/SqlConsumer.java |  17 ++--
 .../sql/SqlConsumerMaxMessagesPerPollTest.java  | 101 +++
 .../sql/createAndPopulateDatabase4.sql  |  21 
 3 files changed, 133 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a78377e5/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
--
diff --git 
a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
 
b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
index 57e80e5..8f9800c 100644
--- 
a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
+++ 
b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlConsumer.java
@@ -36,9 +36,6 @@ import org.springframework.dao.DataAccessException;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.core.PreparedStatementCallback;
 
-/**
- *
- */
 public class SqlConsumer extends ScheduledBatchPollingConsumer {
 
 private final String query;
@@ -165,9 +162,8 @@ public class SqlConsumer extends 
ScheduledBatchPollingConsumer {
 int total = exchanges.size();
 
 // limit if needed
-if (maxMessagesPerPoll > 0 && total > maxMessagesPerPoll) {
-log.debug("Limiting to maximum messages to poll " + 
maxMessagesPerPoll + " as there was " + total + " messages in this poll.");
-total = maxMessagesPerPoll;
+if (maxMessagesPerPoll > 0 && total == maxMessagesPerPoll) {
+log.debug("Limiting to maximum messages to poll " + 
maxMessagesPerPoll + " as there was more messages in this poll.");
 }
 
 for (int index = 0; index < total && isBatchAllowed(); index++) {
@@ -311,4 +307,13 @@ public class SqlConsumer extends 
ScheduledBatchPollingConsumer {
 public void setBreakBatchOnConsumeFail(boolean breakBatchOnConsumeFail) {
 this.breakBatchOnConsumeFail = breakBatchOnConsumeFail;
 }
+
+@Override
+public void setMaxMessagesPerPoll(int maxMessagesPerPoll) {
+super.setMaxMessagesPerPoll(maxMessagesPerPoll);
+
+if (jdbcTemplate != null) {
+jdbcTemplate.setMaxRows(maxMessagesPerPoll);
+}
+}
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a78377e5/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlConsumerMaxMessagesPerPollTest.java
--
diff --git 
a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlConsumerMaxMessagesPerPollTest.java
 
b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlConsumerMaxMessagesPerPollTest.java
new file mode 100644
index 000..51a7bb0
--- /dev/null
+++ 
b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlConsumerMaxMessagesPerPollTest.java
@@ -0,0 +1,101 @@
+/**
+ * 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.sql;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.After;
+import org.junit.Before;
+import org.jun

svn commit: r919605 - in /websites/production/camel/content: cache/main.pageCache metrics-component.html

2014-08-17 Thread buildbot
Author: buildbot
Date: Sun Aug 17 09:17:53 2014
New Revision: 919605

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/metrics-component.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/metrics-component.html
==
--- websites/production/camel/content/metrics-component.html (original)
+++ websites/production/camel/content/metrics-component.html Sun Aug 17 
09:17:53 2014
@@ -217,7 +217,7 @@ from("direct:in")
 And from XML DSL you define a  as follows:
 
-The MetricsRoutePolicyFactory 
and MetricsRoutePolicy supports the following 
options:NameDefaultDescriptionuseJmxtrueWhether to report the statistics to JMXjmxDomainorg.apache.camel.metricsThe JMX domain namemetricsRegistry Allow to use a shared 
com.codahale.metrics.MetricRegistry. If none is provided then 
Camel will create a shared instance used by the this 
CamelContext. From Java code tou 
can get hold of 
the com.codahale.metrics.MetricRegistry from the 
org.apache.camel.component.metrics.routepolicy.MetricsRegistryService
 as shown below:
+The MetricsRoutePolicyFactory 
and MetricsRoutePolicy supports the following 
options:NameDefaultDescriptionuseJmxfalseWhether to report fine grained statistics to JMX by using 
the com.codahale.metrics.JmxReporter.Notice that 
if JMX is enabled on CamelContext 
then a MetricsRegistryService mbean is enlisted under the services 
type in the JMX tree. That mbean has a single operation to output the 
statistics using json. Setting useJmx to true is onl
 y needed if you want fine grained mbeans per statistics type.jmxDomainorg.apache.camel.metricsThe JMX domain nameprettyPrintfalseWhether to use pretty print when outputting statistics in 
json formatmetricsRegistry Allow to use a shared 
com.codahale.metrics.MetricRegistry. If none is provided then 
Camel will create a shared instance used by the this 
CamelContext. From Java code tou 
can get hold of the com.
 codahale.metrics.MetricRegistry from the 
org.apache.camel.component.metrics.routepolicy.MetricsRegistryService
 as shown below:
 

[CONF] Apache Camel > Metrics Component

2014-08-17 Thread Claus Ibsen (Confluence)














  


Claus Ibsen edited the page:
 


Metrics Component   






...
The metrics: component allows to collect various metrics directly from Camel routes. Supported metric types are counter, histogram, meter and timer. Metrics provides simple way to measure behaviour of application. Configurable reporting backend is enabling different integration options for collecting and visualizing statistics. The component also provides a MetricsRoutePolicyFactory which allows to expose route statistics using codehale metrics, see bottom of page for details.
...
Each metric has type and name. Supported types are counter, histogram, meter and timer. Metric name is simple string. If metric type is not provided then type meter is used by default.
...




Name
Default
Description


useJmx
truefalse
Whether to report fine grained statistics to JMX by using the com.codahale.metrics.JmxReporter.  Notice that if JMX is enabled on CamelContext then a MetricsRegistryService mbean is enlisted under the services type in the JMX tree. That mbean has a single operation to output the statistics using json. Setting useJmx to true is only needed if you want fine grained mbeans per statistics type.


jmxDomain
org.apache.camel.metrics
The JMX domain name


prettyPrint
false
Whether to use pretty print when outputting statistics in json format


metricsRegistry
 
Allow to use a shared com.codahale.metrics.MetricRegistry. If none is provided then Camel will create a shared instance used by the this CamelContext.




...



  

git commit: CAMEL-7696: camel-metrics - Add a route policy to expose route stats as codehale metrics. Work in progress.

2014-08-17 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 1f5872639 -> fc4cbdbe7


CAMEL-7696: camel-metrics - Add a route policy to expose route stats as 
codehale metrics. Work in progress.


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

Branch: refs/heads/master
Commit: fc4cbdbe70b319da272ed341702ce96e78eb9401
Parents: 1f58726
Author: Claus Ibsen 
Authored: Sun Aug 17 10:31:32 2014 +0200
Committer: Claus Ibsen 
Committed: Sun Aug 17 10:34:53 2014 +0200

--
 components/camel-metrics/pom.xml| 12 +++
 .../routepolicy/MetricsRegistryMBean.java   | 26 ++
 .../routepolicy/MetricsRegistryService.java | 38 +++-
 .../metrics/routepolicy/MetricsRoutePolicy.java | 10 ++
 .../routepolicy/MetricsRoutePolicyFactory.java  | 15 +++-
 .../ManagedMetricsRoutePolicyTest.java  | 12 +++
 .../features/src/main/resources/features.xml|  4 +++
 7 files changed, 115 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/fc4cbdbe/components/camel-metrics/pom.xml
--
diff --git a/components/camel-metrics/pom.xml b/components/camel-metrics/pom.xml
index 58aaf69..52ce3b1 100644
--- a/components/camel-metrics/pom.xml
+++ b/components/camel-metrics/pom.xml
@@ -49,6 +49,18 @@
   ${metrics-version}
 
 
+
+
+  com.codahale.metrics
+  metrics-json
+  ${metrics-version}
+
+
+  com.fasterxml.jackson.core
+  jackson-databind
+  ${jackson2-version}
+
+
 
 
   org.apache.camel

http://git-wip-us.apache.org/repos/asf/camel/blob/fc4cbdbe/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRegistryMBean.java
--
diff --git 
a/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRegistryMBean.java
 
b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRegistryMBean.java
new file mode 100644
index 000..e37f8b6
--- /dev/null
+++ 
b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRegistryMBean.java
@@ -0,0 +1,26 @@
+/**
+ * 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.metrics.routepolicy;
+
+import org.apache.camel.api.management.ManagedOperation;
+
+public interface MetricsRegistryMBean {
+
+@ManagedOperation(description = "Dumps the statistics as json")
+String dumpStatisticsAsJson();
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/fc4cbdbe/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRegistryService.java
--
diff --git 
a/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRegistryService.java
 
b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRegistryService.java
index dc8f584..8ec1534 100644
--- 
a/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRegistryService.java
+++ 
b/components/camel-metrics/src/main/java/org/apache/camel/component/metrics/routepolicy/MetricsRegistryService.java
@@ -16,25 +16,36 @@
  */
 package org.apache.camel.component.metrics.routepolicy;
 
+import java.util.concurrent.TimeUnit;
 import javax.management.MBeanServer;
 
 import com.codahale.metrics.JmxReporter;
 import com.codahale.metrics.MetricRegistry;
+import com.codahale.metrics.json.MetricsModule;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectWriter;
 import org.apache.camel.CamelContext;
 import org

[CONF] Apache Camel > Metrics Component

2014-08-17 Thread Claus Ibsen (Confluence)














  


Claus Ibsen edited the page:
 


Metrics Component   






...
The metrics: component allows to collect various metrics directly from Camel routes. Supported metric types are counter, histogram, meter and timer. Metrics provides simple way to measure behaviour of application. Configurable reporting backend is enabling different integration options for collecting and visualizing statistics. The component also provides a MetricsRoutePolicyFactory which allows to expose route statistics using codehale metrics, see bottom of page for details.
...
Each metric has type and name. Supported types are counter, histogram, meter and timer. Metric name is simple string. If metric type is not provided then type meter is used by default.
...




Name
Default
Description


useJmx
true
Whether to report the fine grained statistics to JMX by using the com.codahale.metrics.JmxReporter


jmxDomain
org.apache.camel.metrics
The JMX domain name


prettyPrint
false
Whether to use pretty print when outputting statistics in json format


metricsRegistry
 
Allow to use a shared com.codahale.metrics.MetricRegistry. If none is provided then Camel will create a shared instance used by the this CamelContext.




...






 View Online  · Like  · View Changes  
 Stop watching space  · Manage Notifications

svn commit: r919600 - in /websites/production/camel/content: cache/main.pageCache solr.html

2014-08-17 Thread buildbot
Author: buildbot
Date: Sun Aug 17 08:17:53 2014
New Revision: 919600

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/solr.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/solr.html
==
--- websites/production/camel/content/solr.html (original)
+++ websites/production/camel/content/solr.html Sun Aug 17 08:17:53 2014
@@ -85,55 +85,21 @@

 
 
-Solr 
Component
-Available as of Camel 2.9
-
-The Solr component allows you to interface with an http://lucene.apache.org/solr/";>Apache Lucene 
Solr server (based on SolrJ 3.5.0).
-
-Maven users will need to add the following dependency to their 
pom.xml for this component:
-
-

Solr Component

Available as of Camel 2.9

The Solr component allows you to interface with an http://lucene.apache.org/solr/";>Apache Lucene Solr server (based on SolrJ 3.5.0).

Maven users will need to add the following dependency to their pom.xml for this component:

+