svn commit: r919676 - in /websites/production/camel/content: cache/main.pageCache camel-2140-release.html
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 @@ tbody tr td valign=top width=100% -div class=wiki-content maincontenth1 id=Camel2.14.0Release-Camel2.14.0release(currentlyinprogress)Camel 2.14.0 release (currently in progress)/h1div style=padding-right:20px;float:left;margin-left:-20px;pimg class=confluence-embedded-image confluence-external-resource src=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;/p/divdiv style=min-height:200px#160;/divh2 id=Camel2.14.0Release-NewandNoteworthyNew and Noteworthy/h2pWelcome to the 2.14.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)/pulliSupport for running on Java 1.8 JVMs/liliSpring 4.x supported./lilia shape=rect href=rest-dsl.htmlREST DSL/a 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./lilia shape=rect href=rest-dsl.htmlREST DSL /a integrated with a shape=rect href=swagger.htmlSwagger/a to expose the service as swagger apis./liliSimple language defined in routes using resultType as boolean is now evaluated as predicate instead of as expression./liliIntroduced RuntimeEndpointRegistry to capture runtime usage of endpoints in use during routing, such as dynamic endpoints from dynamic a shape=rect href=eip.htmlEIP/as./liliAdded event notification for routes added and removed./liliAllow to configure cache size in Recipient List, Routing Slip and Dynamic Router EIPs; and as well turn caching off./lilia shape=rect href=netty-http.htmlNetty HTTP/a#160;producer now supports the spanCamelHttpPath header to define a dynamic context-path and query parameters to call the remote http server./span/lilispana shape=rect href=polling-consumer.htmlPolling Consumer/a#160;allows to configure initial queue size and whether to block when full when using the default #160;codeEventDrivenPollingConsumer/code 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./span/lilispana shape=rect class=external-link href=https://issues.apache.org/jira/browse/CAMEL-7435;Added/a a generic callback to configure the a shape=rect href=apns.htmlAPNS/a service builder./span/lilispanAdded#160;codeStreamList/code option to the#160;a shape=rect href=jdbc.htmlJDBC/a component/span/liliAllow to define Simple expressions for sql parameters of the a shape=rect href=sql-component.htmlSQL/a component.spanbr clear=none/span/liliA new XML tokenizer that is truly XML-aware (e.g., supporting XML namespaces and complex hierarchical structures)/liliAdded option#160;codeparallelAggregate/code to a shape=rect href=multicast.htmlMulticast/a, a shape=rect href=splitter.htmlSplitter/a and a s hape=rect href=recipient-list.htmlRecipient List/a#160;EIPs/liliSupport to set the variable map from message header in a shape=rect href=velocity.htmlVelocity/a, a shape=rect href=freemarker.htmlFreemarker/a, a shape=rect href=stringtemplate.htmlStringTemplate/a./lilispanAdded HazelcastInstance option to#160;spana shape=rect href=hazelcast-component.htmlHazelcast/a component./span/span/liliProducers from static a shape=rect href=eip.htmlEIPs/a such as lt;togt; is is now also enlisted in a shape=rect href=camel-jmx.htmlJMX/a when Camel is starting routes./liliUnmarshal json to pojo using#160;codecamel-jackson/code 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./liliAlso allow to configure#160;codecamel-jackson/code to skip null values, by setting includes to#160;codeNOT_NULL/code./lili And#160;codecamel-jackson/code can now easily be configured to unmarshal to a#160;codeListlt;pojogt;/code#160;or codeListlt;Mapgt;/code#160;instead of either a single pojo or#160;codeMap/code type.#160;/liliIntroduced#160;codeSynchronizationRouteAware/code 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
[CONF] Apache Camel Camel 2.14.0 Release
Claus Ibsen edited the page: Camel 2.14.0 Release ... Timer consumer is now scheduled after CamelContext has started all routes, to ensure other routes is running when timer routes is triggered to run. Netty HTTP now returns HTTP status 404 if resource not found instead of 503. Fixed the MongoDBreadPreferenceoption which used to cause an IllegalArgumentExceptionto be thrown. Fixed issue with Netty producer may leak HashWhealTimer instances when having many producers that are not reused. Fixed issue with Netty consumer should wait for join to complete when joining a multicast group over UDP Improved stability when testing withcamel-test-blueprint component. Netty HTTPnow removes headerFilterStrategy option after resolvingit Fixed POJO aggregating when the parameter type was referring to a type that was class annotated. FixedMyBatisto keep the message body as-is when calling stored procedures, if the procedure returns data as OUT parameters. Fixed Camel Karaf commands to work with multiple CamelContext from the same bundle. Fixed Advice-With to work with transacted routes defined in XML DSL Fixed Advice-With to work with Content Based Router when adding outputs to the when clauses. Fixed Advice-With to honor autoStartup option. FixedOnCompletion to route the completedExchangeeven if it was marked to stop / failed due exception / handled by error handler etc. ... New Examples camel-example-splunkbox-osgi camel-example-servlet-rest-blueprint camel-example-servlet-rest-tomcat camel-example-spark-rest-tomcat camel-example-box-osgisplunk New ... New Tooling API changes Removed duplicate getter getMessageHistory onManagedCamelContextMBean Added org.apache.camel.spi.SynchronizationRouteAware AddedbeforeRoute and afterRoute methods to UnitOfWork. ... Polling Consumerallows to configure initial queue size and whether to block when full when
[2/6] git commit: CAMEL-7712: scala-dsl should have routeId in the DSL.
CAMEL-7712: scala-dsl should have routeId in the DSL. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6f8e98f4 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6f8e98f4 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6f8e98f4 Branch: refs/heads/master Commit: 6f8e98f48c42352c96ebb11ec24313aaba863ad8 Parents: 86b37fe Author: Claus Ibsen davscl...@apache.org Authored: Mon Aug 18 09:20:58 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Aug 18 09:20:58 2014 +0200 -- .../src/main/scala/org/apache/camel/scala/dsl/DSL.scala | 1 + .../scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala | 1 + .../test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala | 4 3 files changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/6f8e98f4/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala -- diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala index 0779746..839f644 100644 --- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala +++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala @@ -77,6 +77,7 @@ trait DSL { def recipients(expression: Exchange = Any) : DSL def resequence(expression: Exchange = Any) : SResequenceDefinition def rollback : DSL + def routeId(id: String) : DSL def routingSlip(header: String) : DSL def routingSlip(header: String, separator: String) : DSL def routingSlip(expression: Exchange = Any) : DSL http://git-wip-us.apache.org/repos/asf/camel/blob/6f8e98f4/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala -- diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala index 05fb0aa..26e19bb 100644 --- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala +++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala @@ -170,6 +170,7 @@ class RouteBuilder extends Preamble with DSL with RoutesBuilder with Languages w def recipients(expression: Exchange = Any) = stack.top.recipients(expression) def resequence(expression: Exchange = Any) = stack.top.resequence(expression) def rollback = stack.top.rollback + def routeId(id: String) = stack.top.routeId(id) def routingSlip(header: String) = stack.top.routingSlip(header) def routingSlip(header: String, separator: String) = stack.top.routingSlip(header, separator) def routingSlip(expression: Exchange = Any) = stack.top.routingSlip(expression) http://git-wip-us.apache.org/repos/asf/camel/blob/6f8e98f4/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala -- diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala index 2dbf0e6..f6e51c7 100644 --- a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala +++ b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala @@ -51,6 +51,8 @@ class SOnExceptionComplexRouteTest extends OnExceptionComplexRouteTest with Rout }.maximumRedeliveries(2).handled direct:start == { + routeId(start) + handle[MyFunctionalException]{ }.maximumRedeliveries(0) @@ -59,6 +61,8 @@ class SOnExceptionComplexRouteTest extends OnExceptionComplexRouteTest with Rout } direct:start2 == { + routeId(start2) + handle[MyFunctionalException] { to(mock:handled) }.maximumRedeliveries(0).handled
[1/6] git commit: CAMEL-7714: AdviceWith - Does not honor autoStartup option
Repository: camel Updated Branches: refs/heads/camel-2.12.x dc3c36bdc - ff702629f refs/heads/camel-2.13.x a78377e50 - 3cf66ca51 refs/heads/master e896fe520 - 6f8e98f48 CAMEL-7714: AdviceWith - Does not honor autoStartup option Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/86b37fe3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/86b37fe3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/86b37fe3 Branch: refs/heads/master Commit: 86b37fe3a55a38b48d811d930b81aa4aca3bb41e Parents: e896fe5 Author: Claus Ibsen davscl...@apache.org Authored: Mon Aug 18 09:20:28 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Aug 18 09:20:28 2014 +0200 -- .../java/org/apache/camel/CamelContext.java | 7 ++ .../org/apache/camel/RuntimeConfiguration.java | 3 +- .../mbean/ManagedCamelContextMBean.java | 3 + .../apache/camel/impl/DefaultCamelContext.java | 8 ++- .../management/mbean/ManagedCamelContext.java | 4 ++ .../DefaultCamelContextAutoStartupTest.java | 8 +-- .../interceptor/AdviceWithAutoStartupTest.java | 68 7 files changed, 94 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/86b37fe3/camel-core/src/main/java/org/apache/camel/CamelContext.java -- diff --git a/camel-core/src/main/java/org/apache/camel/CamelContext.java b/camel-core/src/main/java/org/apache/camel/CamelContext.java index ce59a5a..ae31c51 100644 --- a/camel-core/src/main/java/org/apache/camel/CamelContext.java +++ b/camel-core/src/main/java/org/apache/camel/CamelContext.java @@ -553,6 +553,13 @@ public interface CamelContext extends SuspendableService, RuntimeConfiguration { void startRoute(RouteDefinition route) throws Exception; /** + * Starts all the routes which currently is not started. + * + * @throws Exception is thrown if a route could not be started for whatever reason + */ +void startAllRoutes() throws Exception; + +/** * Starts the given route if it has been previously stopped * * @param routeId the route id http://git-wip-us.apache.org/repos/asf/camel/blob/86b37fe3/camel-core/src/main/java/org/apache/camel/RuntimeConfiguration.java -- diff --git a/camel-core/src/main/java/org/apache/camel/RuntimeConfiguration.java b/camel-core/src/main/java/org/apache/camel/RuntimeConfiguration.java index 0bcaff1..e1e0e2e 100644 --- a/camel-core/src/main/java/org/apache/camel/RuntimeConfiguration.java +++ b/camel-core/src/main/java/org/apache/camel/RuntimeConfiguration.java @@ -104,7 +104,8 @@ public interface RuntimeConfiguration { * br/ * bNote:/b When setting auto startup ttfalse/tt on {@link CamelContext} then that takes precedence * and ino/i routes is started. You would need to start {@link CamelContext} explicit using - * the {@link org.apache.camel.CamelContext#start()} method, to start the context and the routes. + * the {@link org.apache.camel.CamelContext#start()} method, to start the context, and then + * you would need to start the routes manually using {@link CamelContext#startRoute(String)}. * p/ * Default is tttrue/tt to always start up. * http://git-wip-us.apache.org/repos/asf/camel/blob/86b37fe3/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java -- diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java index 9a58c0d..91ade70 100644 --- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java +++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java @@ -143,6 +143,9 @@ public interface ManagedCamelContextMBean extends ManagedPerformanceCounterMBean @ManagedOperation(description = Resume Camel) void resume() throws Exception; +@ManagedOperation(description = Starts all the routes which currently is not started) +void startAllRoutes() throws Exception; + @ManagedOperation(description = Send body (in only)) void sendBody(String endpointUri, Object body) throws Exception; http://git-wip-us.apache.org/repos/asf/camel/blob/86b37fe3/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
[4/6] git commit: CAMEL-7712: scala-dsl should have routeId in the DSL.
CAMEL-7712: scala-dsl should have routeId in the DSL. Conflicts: components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5a13af1e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5a13af1e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5a13af1e Branch: refs/heads/camel-2.13.x Commit: 5a13af1eb9b16ebaa212600d8ad2cd0d6fb3aa49 Parents: a78377e Author: Claus Ibsen davscl...@apache.org Authored: Mon Aug 18 09:20:58 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Aug 18 09:49:27 2014 +0200 -- .../camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala | 1 + .../scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala | 1 + 2 files changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/5a13af1e/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala -- diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala index 0779746..839f644 100644 --- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala +++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala @@ -77,6 +77,7 @@ trait DSL { def recipients(expression: Exchange = Any) : DSL def resequence(expression: Exchange = Any) : SResequenceDefinition def rollback : DSL + def routeId(id: String) : DSL def routingSlip(header: String) : DSL def routingSlip(header: String, separator: String) : DSL def routingSlip(expression: Exchange = Any) : DSL http://git-wip-us.apache.org/repos/asf/camel/blob/5a13af1e/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala -- diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala index 7920793..db48d3f 100644 --- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala +++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala @@ -170,6 +170,7 @@ class RouteBuilder extends Preamble with DSL with RoutesBuilder with Languages w def recipients(expression: Exchange = Any) = stack.top.recipients(expression) def resequence(expression: Exchange = Any) = stack.top.resequence(expression) def rollback = stack.top.rollback + def routeId(id: String) = stack.top.routeId(id) def routingSlip(header: String) = stack.top.routingSlip(header) def routingSlip(header: String, separator: String) = stack.top.routingSlip(header, separator) def routingSlip(expression: Exchange = Any) = stack.top.routingSlip(expression)
[3/6] git commit: CAMEL-7712: scala-dsl should have routeId in the DSL.
CAMEL-7712: scala-dsl should have routeId in the DSL. Conflicts: components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d84408e1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d84408e1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d84408e1 Branch: refs/heads/camel-2.12.x Commit: d84408e101815ad50a3417bb340a03f4519b976b Parents: dc3c36b Author: Claus Ibsen davscl...@apache.org Authored: Mon Aug 18 09:20:58 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Aug 18 09:49:13 2014 +0200 -- .../camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala | 1 + .../scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala | 1 + 2 files changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d84408e1/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala -- diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala index 9fba58d..5bc098f 100644 --- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala +++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala @@ -77,6 +77,7 @@ trait DSL { def recipients(expression: Exchange = Any) : DSL def resequence(expression: Exchange = Any) : SResequenceDefinition def rollback : DSL + def routeId(id: String) : DSL def routingSlip(header: String) : DSL def routingSlip(header: String, separator: String) : DSL def routingSlip(expression: Exchange = Any) : DSL http://git-wip-us.apache.org/repos/asf/camel/blob/d84408e1/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala -- diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala index bdfdea5..e80b934 100644 --- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala +++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala @@ -170,6 +170,7 @@ class RouteBuilder extends Preamble with DSL with RoutesBuilder with Languages w def recipients(expression: Exchange = Any) = stack.top.recipients(expression) def resequence(expression: Exchange = Any) = stack.top.resequence(expression) def rollback = stack.top.rollback + def routeId(id: String) = stack.top.routeId(id) def routingSlip(header: String) = stack.top.routingSlip(header) def routingSlip(header: String, separator: String) = stack.top.routingSlip(header, separator) def routingSlip(expression: Exchange = Any) = stack.top.routingSlip(expression)
[5/6] git commit: CAMEL-7714: AdviceWith - Does not honor autoStartup option
CAMEL-7714: AdviceWith - Does not honor autoStartup option Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3cf66ca5 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3cf66ca5 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3cf66ca5 Branch: refs/heads/camel-2.13.x Commit: 3cf66ca51cb4d5e01820b2e0bb445572798cf127 Parents: 5a13af1 Author: Claus Ibsen davscl...@apache.org Authored: Mon Aug 18 09:20:28 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Aug 18 09:50:21 2014 +0200 -- .../java/org/apache/camel/CamelContext.java | 7 ++ .../org/apache/camel/RuntimeConfiguration.java | 3 +- .../mbean/ManagedCamelContextMBean.java | 3 + .../apache/camel/impl/DefaultCamelContext.java | 8 ++- .../management/mbean/ManagedCamelContext.java | 4 ++ .../DefaultCamelContextAutoStartupTest.java | 8 +-- .../interceptor/AdviceWithAutoStartupTest.java | 68 7 files changed, 94 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3cf66ca5/camel-core/src/main/java/org/apache/camel/CamelContext.java -- diff --git a/camel-core/src/main/java/org/apache/camel/CamelContext.java b/camel-core/src/main/java/org/apache/camel/CamelContext.java index 8e32849..15c5436 100644 --- a/camel-core/src/main/java/org/apache/camel/CamelContext.java +++ b/camel-core/src/main/java/org/apache/camel/CamelContext.java @@ -492,6 +492,13 @@ public interface CamelContext extends SuspendableService, RuntimeConfiguration { void startRoute(RouteDefinition route) throws Exception; /** + * Starts all the routes which currently is not started. + * + * @throws Exception is thrown if a route could not be started for whatever reason + */ +void startAllRoutes() throws Exception; + +/** * Starts the given route if it has been previously stopped * * @param routeId the route id http://git-wip-us.apache.org/repos/asf/camel/blob/3cf66ca5/camel-core/src/main/java/org/apache/camel/RuntimeConfiguration.java -- diff --git a/camel-core/src/main/java/org/apache/camel/RuntimeConfiguration.java b/camel-core/src/main/java/org/apache/camel/RuntimeConfiguration.java index 0bcaff1..e1e0e2e 100644 --- a/camel-core/src/main/java/org/apache/camel/RuntimeConfiguration.java +++ b/camel-core/src/main/java/org/apache/camel/RuntimeConfiguration.java @@ -104,7 +104,8 @@ public interface RuntimeConfiguration { * br/ * bNote:/b When setting auto startup ttfalse/tt on {@link CamelContext} then that takes precedence * and ino/i routes is started. You would need to start {@link CamelContext} explicit using - * the {@link org.apache.camel.CamelContext#start()} method, to start the context and the routes. + * the {@link org.apache.camel.CamelContext#start()} method, to start the context, and then + * you would need to start the routes manually using {@link CamelContext#startRoute(String)}. * p/ * Default is tttrue/tt to always start up. * http://git-wip-us.apache.org/repos/asf/camel/blob/3cf66ca5/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java -- diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java index 46c611f..e316bf7 100644 --- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java +++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java @@ -143,6 +143,9 @@ public interface ManagedCamelContextMBean extends ManagedPerformanceCounterMBean @ManagedOperation(description = Resume Camel) void resume() throws Exception; +@ManagedOperation(description = Starts all the routes which currently is not started) +void startAllRoutes() throws Exception; + @ManagedOperation(description = Send body (in only)) void sendBody(String endpointUri, Object body) throws Exception; http://git-wip-us.apache.org/repos/asf/camel/blob/3cf66ca5/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java index 9f39968..e38bc71 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java +++
svn commit: r919691 - in /websites/production/camel/content: cache/main.pageCache camel-2140-release.html
Author: buildbot Date: Mon Aug 18 08:17:55 2014 New Revision: 919691 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 08:17:55 2014 @@ -84,7 +84,7 @@ tbody tr td valign=top width=100% -div class=wiki-content maincontenth1 id=Camel2.14.0Release-Camel2.14.0release(currentlyinprogress)Camel 2.14.0 release (currently in progress)/h1div style=padding-right:20px;float:left;margin-left:-20px;pimg class=confluence-embedded-image confluence-external-resource src=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;/p/divdiv style=min-height:200px#160;/divh2 id=Camel2.14.0Release-NewandNoteworthyNew and Noteworthy/h2pWelcome to the 2.14.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)/pulliSupport for running on Java 1.8 JVMs/liliSpring 4.x supported./lilia shape=rect href=rest-dsl.htmlREST DSL/a 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./lilia shape=rect href=rest-dsl.htmlREST DSL /a integrated with a shape=rect href=swagger.htmlSwagger/a to expose the service as swagger apis./liliSimple language defined in routes using resultType as boolean is now evaluated as predicate instead of as expression./liliIntroduced RuntimeEndpointRegistry to capture runtime usage of endpoints in use during routing, such as dynamic endpoints from dynamic a shape=rect href=eip.htmlEIP/as./liliAdded event notification for routes added and removed./liliAllow to configure cache size in Recipient List, Routing Slip and Dynamic Router EIPs; and as well turn caching off./lilia shape=rect href=netty-http.htmlNetty HTTP/a#160;producer now supports the spanCamelHttpPath header to define a dynamic context-path and query parameters to call the remote http server./span/lilispana shape=rect href=polling-consumer.htmlPolling Consumer/a#160;allows to configure initial queue size and whether to block when full when using the default #160;codeEventDrivenPollingConsumer/code 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./span/lilispana shape=rect class=external-link href=https://issues.apache.org/jira/browse/CAMEL-7435;Added/a a generic callback to configure the a shape=rect href=apns.htmlAPNS/a service builder./span/lilispanAdded#160;codeStreamList/code option to the#160;a shape=rect href=jdbc.htmlJDBC/a component/span/liliAllow to define Simple expressions for sql parameters of the a shape=rect href=sql-component.htmlSQL/a component.spanbr clear=none/span/liliA new XML tokenizer that is truly XML-aware (e.g., supporting XML namespaces and complex hierarchical structures)/liliAdded option#160;codeparallelAggregate/code to a shape=rect href=multicast.htmlMulticast/a, a shape=rect href=splitter.htmlSplitter/a and a s hape=rect href=recipient-list.htmlRecipient List/a#160;EIPs/liliSupport to set the variable map from message header in a shape=rect href=velocity.htmlVelocity/a, a shape=rect href=freemarker.htmlFreemarker/a, a shape=rect href=stringtemplate.htmlStringTemplate/a./lilispanAdded HazelcastInstance option to#160;spana shape=rect href=hazelcast-component.htmlHazelcast/a component./span/span/liliProducers from static a shape=rect href=eip.htmlEIPs/a such as lt;togt; is is now also enlisted in a shape=rect href=camel-jmx.htmlJMX/a when Camel is starting routes./liliUnmarshal json to pojo using#160;codecamel-jackson/code 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./liliAlso allow to configure#160;codecamel-jackson/code to skip null values, by setting includes to#160;codeNOT_NULL/code./lili And#160;codecamel-jackson/code can now easily be configured to unmarshal to a#160;codeListlt;pojogt;/code#160;or codeListlt;Mapgt;/code#160;instead of either a single pojo or#160;codeMap/code type.#160;/liliIntroduced#160;codeSynchronizationRouteAware/code 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
git commit: CAMEL-7713 Set the Xerces SecurityManager for the DocumentBuilderFactory by default
Repository: camel Updated Branches: refs/heads/master 6f8e98f48 - b592f2967 CAMEL-7713 Set the Xerces SecurityManager for the DocumentBuilderFactory by default Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b592f296 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b592f296 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b592f296 Branch: refs/heads/master Commit: b592f2967798fc3fc21457dd54f0bc7e1d6e6743 Parents: 6f8e98f Author: Willem Jiang willem.ji...@gmail.com Authored: Mon Aug 18 20:54:55 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Mon Aug 18 20:55:14 2014 +0800 -- .../org/apache/camel/converter/jaxp/XmlConverter.java | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b592f296/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java -- diff --git a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java index 4580c41..2543de5 100644 --- a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java +++ b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java @@ -957,7 +957,19 @@ public class XmlConverter { factory.setFeature(http://xml.org/sax/features/external-general-entities;, false); } catch (ParserConfigurationException e) { LOG.warn(DocumentBuilderFactory doesn't support the feature {} with value {}, due to {}. - , new Object[]{http://xml.org/sax/features/external-general-entities;, true, e}); + , new Object[]{http://xml.org/sax/features/external-general-entities;, false, e}); +} +// setup the SecurityManager by default if it's apache xerces +try { +Class? smClass = ObjectHelper.loadClass(org.apache.xerces.util.SecurityManager); +if (smClass != null) { +Object sm = smClass.newInstance(); +// Here we just use the default setting of the SeurityManager + factory.setAttribute(http://apache.org/xml/properties/security-manager;, sm); +} +} catch (Exception e) { +LOG.warn(DocumentBuilderFactory doesn't support the attribute {} with value {}, due to {}. + , new Object[]{http://apache.org/xml/properties/security-manager;, true, e}); } // setup the feature from the system property setupFeatures(factory);
[5/6] git commit: CAMEL-7701 Fixed the CS errors and added the content-type header back as it could be used later
CAMEL-7701 Fixed the CS errors and added the content-type header back as it could be used later Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2c88ba73 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2c88ba73 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2c88ba73 Branch: refs/heads/camel-2.13.x Commit: 2c88ba733f74077142c5009ab45e886a9fc07782 Parents: f73b9d4 Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Aug 15 12:27:28 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Mon Aug 18 21:22:28 2014 +0800 -- .../component/cxf/jaxrs/CxfRsProducer.java | 16 +- .../cxf/jaxrs/DefaultCxfRsBinding.java | 1 + .../component/cxf/jaxrs/CxfRsRelayTest.java | 202 +-- .../component/cxf/jaxrs/UploadService.java | 35 4 files changed, 108 insertions(+), 146 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/2c88ba73/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java -- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java index 356e199..572e991 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java @@ -277,16 +277,20 @@ public class CxfRsProducer extends DefaultProducer { return answer; } -private Method findRightMethod(ListClass? resourceClasses, String methodName, Class?[] parameterTypes) throws NoSuchMethodException { +private Method findRightMethod(ListClass? resourceClasses, String methodName, + Class?[] parameterTypes) throws NoSuchMethodException { for (Class? clazz : resourceClasses) { try { Method[] m = clazz.getMethods(); -iterate_on_methods: for (Method method : m) { -if (!method.getName().equals(methodName)) +iterate_on_methods: +for (Method method : m) { +if (!method.getName().equals(methodName)) { continue; +} Class?[] params = method.getParameterTypes(); -if (params.length != parameterTypes.length) +if (params.length != parameterTypes.length) { continue; +} for (int i = 0; i parameterTypes.length; i++) { if (!params[i].isAssignableFrom(parameterTypes[i])) { continue iterate_on_methods; @@ -298,7 +302,9 @@ public class CxfRsProducer extends DefaultProducer { // keep looking } } -throw new NoSuchMethodException(Cannot find method with name: + methodName + having parameters assignable from: + arrayToString(parameterTypes)); +throw new NoSuchMethodException(Cannot find method with name: + methodName ++ having parameters assignable from: ++ arrayToString(parameterTypes)); } private Class?[] getParameterTypes(Object[] objects) { http://git-wip-us.apache.org/repos/asf/camel/blob/2c88ba73/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java -- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java index 664ebe3..d72ceab 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java @@ -58,6 +58,7 @@ public class DefaultCxfRsBinding implements CxfRsBinding, HeaderFilterStrategyAw camelToCxfHeaderMap.put(Exchange.HTTP_URI, org.apache.cxf.message.Message.REQUEST_URI); camelToCxfHeaderMap.put(Exchange.HTTP_METHOD, org.apache.cxf.message.Message.HTTP_REQUEST_METHOD); camelToCxfHeaderMap.put(Exchange.HTTP_PATH, org.apache.cxf.message.Message.PATH_INFO); +camelToCxfHeaderMap.put(Exchange.CONTENT_TYPE, org.apache.cxf.message.Message.CONTENT_TYPE); camelToCxfHeaderMap.put(Exchange.HTTP_CHARACTER_ENCODING, org.apache.cxf.message.Message.ENCODING);
[6/6] git commit: CAMEL-7701 added Apache file-header
CAMEL-7701 added Apache file-header Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f73b9d46 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f73b9d46 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f73b9d46 Branch: refs/heads/camel-2.13.x Commit: f73b9d46595e7fd9e21146d4ce536e6ae9cac02d Parents: cae28b2 Author: Benjamin BONNET benjamin.bon...@m4x.org Authored: Fri Aug 15 00:08:19 2014 +0200 Committer: Willem Jiang willem.ji...@gmail.com Committed: Mon Aug 18 21:22:28 2014 +0800 -- .../camel/component/cxf/jaxrs/CxfRsRelayTest.java | 16 .../camel/component/cxf/jaxrs/CxfRsSpringRelay.xml | 16 2 files changed, 32 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/f73b9d46/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java -- diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java index 6c5c227..c6dbe91 100644 --- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java +++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java @@ -1,3 +1,19 @@ +/** + * 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.cxf.jaxrs; import java.io.InputStream; http://git-wip-us.apache.org/repos/asf/camel/blob/f73b9d46/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml -- diff --git a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml index c5a844e..a7d5adc 100644 --- a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml +++ b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml @@ -1,4 +1,20 @@ ?xml version=1.0 encoding=UTF-8? +!-- +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. +-- beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:camel=http://camel.apache.org/schema/spring; xmlns:cxf=http://camel.apache.org/schema/cxf;
[2/6] git commit: CAMEL-7701
CAMEL-7701 - more liberal choice of right method in proxy-client cxfrs - remove Content-Type header propagation from Camel to CXFRS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d63a7916 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d63a7916 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d63a7916 Branch: refs/heads/camel-2.12.x Commit: d63a7916645ba56ee1282608a9f553ad4143a09c Parents: ff70262 Author: Benjamin BONNET benjamin.bon...@m4x.org Authored: Thu Aug 14 23:55:31 2014 +0200 Committer: Willem Jiang willem.ji...@gmail.com Committed: Mon Aug 18 21:21:50 2014 +0800 -- .../component/cxf/jaxrs/CxfRsProducer.java | 23 +-- .../cxf/jaxrs/DefaultCxfRsBinding.java | 1 - .../component/cxf/jaxrs/CxfRsRelayTest.java | 140 +++ .../component/cxf/jaxrs/UploadService.java | 35 + .../component/cxf/jaxrs/CxfRsSpringRelay.xml| 28 5 files changed, 218 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d63a7916/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java -- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java index d4bbca7..356e199 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducer.java @@ -278,20 +278,27 @@ public class CxfRsProducer extends DefaultProducer { } private Method findRightMethod(ListClass? resourceClasses, String methodName, Class?[] parameterTypes) throws NoSuchMethodException { -Method answer = null; for (Class? clazz : resourceClasses) { try { -answer = clazz.getMethod(methodName, parameterTypes); -} catch (NoSuchMethodException ex) { -// keep looking +Method[] m = clazz.getMethods(); +iterate_on_methods: for (Method method : m) { +if (!method.getName().equals(methodName)) +continue; +Class?[] params = method.getParameterTypes(); +if (params.length != parameterTypes.length) +continue; +for (int i = 0; i parameterTypes.length; i++) { +if (!params[i].isAssignableFrom(parameterTypes[i])) { +continue iterate_on_methods; +} +} +return method; +} } catch (SecurityException ex) { // keep looking } -if (answer != null) { -return answer; -} } -throw new NoSuchMethodException(Cannot find method with name: + methodName + having parameters: + arrayToString(parameterTypes)); +throw new NoSuchMethodException(Cannot find method with name: + methodName + having parameters assignable from: + arrayToString(parameterTypes)); } private Class?[] getParameterTypes(Object[] objects) { http://git-wip-us.apache.org/repos/asf/camel/blob/d63a7916/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java -- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java index d72ceab..664ebe3 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/DefaultCxfRsBinding.java @@ -58,7 +58,6 @@ public class DefaultCxfRsBinding implements CxfRsBinding, HeaderFilterStrategyAw camelToCxfHeaderMap.put(Exchange.HTTP_URI, org.apache.cxf.message.Message.REQUEST_URI); camelToCxfHeaderMap.put(Exchange.HTTP_METHOD, org.apache.cxf.message.Message.HTTP_REQUEST_METHOD); camelToCxfHeaderMap.put(Exchange.HTTP_PATH, org.apache.cxf.message.Message.PATH_INFO); -camelToCxfHeaderMap.put(Exchange.CONTENT_TYPE, org.apache.cxf.message.Message.CONTENT_TYPE); camelToCxfHeaderMap.put(Exchange.HTTP_CHARACTER_ENCODING, org.apache.cxf.message.Message.ENCODING); camelToCxfHeaderMap.put(Exchange.HTTP_QUERY, org.apache.cxf.message.Message.QUERY_STRING);
[2/2] git commit: CAMEL-7713 Set the Xerces SecurityManager for the DocumentBuilderFactory by default
CAMEL-7713 Set the Xerces SecurityManager for the DocumentBuilderFactory by default Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a6227486 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a6227486 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a6227486 Branch: refs/heads/camel-2.12.x Commit: a6227486c44620d450a582132a627166608436d7 Parents: 8c4e34f Author: Willem Jiang willem.ji...@gmail.com Authored: Mon Aug 18 20:54:55 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Mon Aug 18 21:33:42 2014 +0800 -- .../org/apache/camel/converter/jaxp/XmlConverter.java | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a6227486/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java -- diff --git a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java index 4580c41..2543de5 100644 --- a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java +++ b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java @@ -957,7 +957,19 @@ public class XmlConverter { factory.setFeature(http://xml.org/sax/features/external-general-entities;, false); } catch (ParserConfigurationException e) { LOG.warn(DocumentBuilderFactory doesn't support the feature {} with value {}, due to {}. - , new Object[]{http://xml.org/sax/features/external-general-entities;, true, e}); + , new Object[]{http://xml.org/sax/features/external-general-entities;, false, e}); +} +// setup the SecurityManager by default if it's apache xerces +try { +Class? smClass = ObjectHelper.loadClass(org.apache.xerces.util.SecurityManager); +if (smClass != null) { +Object sm = smClass.newInstance(); +// Here we just use the default setting of the SeurityManager + factory.setAttribute(http://apache.org/xml/properties/security-manager;, sm); +} +} catch (Exception e) { +LOG.warn(DocumentBuilderFactory doesn't support the attribute {} with value {}, due to {}. + , new Object[]{http://apache.org/xml/properties/security-manager;, true, e}); } // setup the feature from the system property setupFeatures(factory);
[1/2] git commit: CAMEL-7713 Set the Xerces SecurityManager for the DocumentBuilderFactory by default
Repository: camel Updated Branches: refs/heads/camel-2.12.x 8c4e34ff3 - a6227486c refs/heads/camel-2.13.x 2c88ba733 - 34242af15 CAMEL-7713 Set the Xerces SecurityManager for the DocumentBuilderFactory by default Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/34242af1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/34242af1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/34242af1 Branch: refs/heads/camel-2.13.x Commit: 34242af159d34ac436960019e1f39b5a15c4b6b4 Parents: 2c88ba7 Author: Willem Jiang willem.ji...@gmail.com Authored: Mon Aug 18 20:54:55 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Mon Aug 18 21:33:30 2014 +0800 -- .../org/apache/camel/converter/jaxp/XmlConverter.java | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/34242af1/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java -- diff --git a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java index 4580c41..2543de5 100644 --- a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java +++ b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java @@ -957,7 +957,19 @@ public class XmlConverter { factory.setFeature(http://xml.org/sax/features/external-general-entities;, false); } catch (ParserConfigurationException e) { LOG.warn(DocumentBuilderFactory doesn't support the feature {} with value {}, due to {}. - , new Object[]{http://xml.org/sax/features/external-general-entities;, true, e}); + , new Object[]{http://xml.org/sax/features/external-general-entities;, false, e}); +} +// setup the SecurityManager by default if it's apache xerces +try { +Class? smClass = ObjectHelper.loadClass(org.apache.xerces.util.SecurityManager); +if (smClass != null) { +Object sm = smClass.newInstance(); +// Here we just use the default setting of the SeurityManager + factory.setAttribute(http://apache.org/xml/properties/security-manager;, sm); +} +} catch (Exception e) { +LOG.warn(DocumentBuilderFactory doesn't support the attribute {} with value {}, due to {}. + , new Object[]{http://apache.org/xml/properties/security-manager;, true, e}); } // setup the feature from the system property setupFeatures(factory);
git commit: CAMEL-7706: Fixed camel-jgroups to disconnect shared JChannel correctly, added unit test to verify
Repository: camel Updated Branches: refs/heads/camel-2.13.x 34242af15 - a6d75c580 CAMEL-7706: Fixed camel-jgroups to disconnect shared JChannel correctly, added unit test to verify Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a6d75c58 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a6d75c58 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a6d75c58 Branch: refs/heads/camel-2.13.x Commit: a6d75c580073582bfbe432f3c700b17745358f6c Parents: 34242af Author: Dhiraj Bokde dhira...@yahoo.com Authored: Fri Aug 15 12:30:46 2014 -0700 Committer: Dhiraj Bokde dhira...@yahoo.com Committed: Mon Aug 18 07:35:41 2014 -0700 -- .../component/jgroups/JGroupsConsumer.java | 8 ++- .../component/jgroups/JGroupsEndpoint.java | 29 +++- .../component/jgroups/JGroupsProducer.java | 11 ++-- .../jgroups/JGroupsSharedChannelTest.java | 69 4 files changed, 110 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a6d75c58/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsConsumer.java -- diff --git a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsConsumer.java b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsConsumer.java index ee6f4ba..a2f6815 100644 --- a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsConsumer.java +++ b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsConsumer.java @@ -30,9 +30,12 @@ public class JGroupsConsumer extends DefaultConsumer { private final String clusterName; private final CamelJGroupsReceiver receiver; +private final JGroupsEndpoint endpoint; public JGroupsConsumer(JGroupsEndpoint endpoint, Processor processor, Channel channel, String clusterName) { super(endpoint, processor); + +this.endpoint = endpoint; this.channel = channel; this.clusterName = clusterName; @@ -44,13 +47,14 @@ public class JGroupsConsumer extends DefaultConsumer { super.doStart(); log.debug(Connecting receiver: {} to the cluster: {}., receiver, clusterName); channel.setReceiver(receiver); -channel.connect(clusterName); +endpoint.connect(); } @Override protected void doStop() throws Exception { log.debug(Closing connection to cluster: {} from receiver: {}., clusterName, receiver); -channel.disconnect(); +channel.setReceiver(null); +endpoint.disconnect(); super.doStop(); } } http://git-wip-us.apache.org/repos/asf/camel/blob/a6d75c58/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java -- diff --git a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java index 23af26c..606a8de 100644 --- a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java +++ b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsEndpoint.java @@ -16,6 +16,8 @@ */ package org.apache.camel.component.jgroups; +import java.util.concurrent.atomic.AtomicInteger; + import org.apache.camel.Component; import org.apache.camel.Consumer; import org.apache.camel.Exchange; @@ -26,6 +28,8 @@ import org.jgroups.Channel; import org.jgroups.JChannel; import org.jgroups.Message; import org.jgroups.View; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class JGroupsEndpoint extends DefaultEndpoint { @@ -37,7 +41,10 @@ public class JGroupsEndpoint extends DefaultEndpoint { public static final String HEADER_JGROUPS_CHANNEL_ADDRESS = JGROUPS_CHANNEL_ADDRESS; +private static final Logger LOG = LoggerFactory.getLogger(JGroupsEndpoint.class); + private Channel channel; +private AtomicInteger connectCount = new AtomicInteger(0); private Channel resolvedChannel; @@ -103,6 +110,7 @@ public class JGroupsEndpoint extends DefaultEndpoint { @Override protected void doStop() throws Exception { +LOG.trace(Closing JGroups Channel {}, getEndpointUri()); resolvedChannel.close(); super.doStop(); } @@ -117,6 +125,26 @@ public class JGroupsEndpoint extends DefaultEndpoint { return new JChannel(); } +/** + * Connect shared channel, called by producer and consumer. + * @throws Exception + */ +public void connect() throws Exception { +
[2/3] git commit: Fixed the log class typo of XmlConverter
Fixed the log class typo of XmlConverter Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c112e8f2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c112e8f2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c112e8f2 Branch: refs/heads/master Commit: c112e8f2321e3d1618f1b97f4d2ed7e7c5ea6cc2 Parents: b592f29 Author: Willem Jiang willem.ji...@gmail.com Authored: Tue Aug 19 10:50:00 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Tue Aug 19 10:50:31 2014 +0800 -- .../camel/converter/jaxp/XmlConverter.java | 75 ++-- 1 file changed, 37 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c112e8f2/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java -- diff --git a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java index 2543de5..37cf7f4 100644 --- a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java +++ b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java @@ -64,7 +64,6 @@ import org.apache.camel.BytesSource; import org.apache.camel.Converter; import org.apache.camel.Exchange; import org.apache.camel.StringSource; -import org.apache.camel.builder.xml.XPathBuilder; import org.apache.camel.util.IOHelper; import org.apache.camel.util.ObjectHelper; @@ -74,20 +73,20 @@ import org.slf4j.LoggerFactory; /** * A helper class to transform to and from various JAXB types such as {@link Source} and {@link Document} * - * @version + * @version */ @Converter public class XmlConverter { @Deprecated -//It will be removed in Camel 3.0, please use the Exchange.DEFAULT_CHARSET +//It will be removed in Camel 3.0, please use the Exchange.DEFAULT_CHARSET public static final String DEFAULT_CHARSET_PROPERTY = org.apache.camel.default.charset; - + public static final String OUTPUT_PROPERTIES_PREFIX = org.apache.camel.xmlconverter.output.; public static final String DOCUMENT_BUILDER_FACTORY_FEATURE = org.apache.camel.xmlconverter.documentBuilderFactory.feature; public static String defaultCharset = ObjectHelper.getSystemProperty(Exchange.DEFAULT_CHARSET_PROPERTY, UTF-8); -private static final Logger LOG = LoggerFactory.getLogger(XPathBuilder.class); - +private static final Logger LOG = LoggerFactory.getLogger(XmlConverter.class); + private DocumentBuilderFactory documentBuilderFactory; private TransformerFactory transformerFactory; @@ -166,8 +165,8 @@ public class XmlConverter { /** * Converts the given Node to a Source - * @throws TransformerException - * @throws ParserConfigurationException + * @throws TransformerException + * @throws ParserConfigurationException * @deprecated use toDOMSource instead */ @Deprecated @@ -177,15 +176,15 @@ public class XmlConverter { /** * Converts the given Node to a Source - * @throws TransformerException - * @throws ParserConfigurationException + * @throws TransformerException + * @throws ParserConfigurationException */ @Converter public DOMSource toDOMSource(Node node) throws ParserConfigurationException, TransformerException { Document document = toDOMDocument(node); return new DOMSource(document); } - + /** * Converts the given Document to a DOMSource */ @@ -224,17 +223,17 @@ public class XmlConverter { } else if (source instanceof BytesSource) { return new String(((BytesSource) source).getData()); } else { -StringWriter buffer = new StringWriter(); +StringWriter buffer = new StringWriter(); if (exchange != null) { // check the camelContext properties first Properties properties = ObjectHelper.getCamelPropertiesWithPrefix(OUTPUT_PROPERTIES_PREFIX, exchange.getContext()); if (properties.size() 0) { toResult(source, new StreamResult(buffer), properties); return buffer.toString(); -} +} } // using the old way to deal with it -toResult(source, new StreamResult(buffer)); +toResult(source, new StreamResult(buffer)); return buffer.toString(); } } @@ -264,7 +263,7 @@ public class XmlConverter { return buffer.toByteArray(); } } - + /** * Converts the given input Node into text * @@ -274,7 +273,7 @@
[1/3] git commit: Fixed the log class typo of XmlConverter
Repository: camel Updated Branches: refs/heads/camel-2.12.x a6227486c - b5629d844 refs/heads/camel-2.13.x a6d75c580 - 5a47eefb4 refs/heads/master b592f2967 - c112e8f23 Fixed the log class typo of XmlConverter Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b5629d84 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b5629d84 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b5629d84 Branch: refs/heads/camel-2.12.x Commit: b5629d8449856e78af0ddb071663088d514fda40 Parents: a622748 Author: Willem Jiang willem.ji...@gmail.com Authored: Tue Aug 19 10:50:00 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Tue Aug 19 10:50:00 2014 +0800 -- .../camel/converter/jaxp/XmlConverter.java | 75 ++-- 1 file changed, 37 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b5629d84/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java -- diff --git a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java index 2543de5..37cf7f4 100644 --- a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java +++ b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java @@ -64,7 +64,6 @@ import org.apache.camel.BytesSource; import org.apache.camel.Converter; import org.apache.camel.Exchange; import org.apache.camel.StringSource; -import org.apache.camel.builder.xml.XPathBuilder; import org.apache.camel.util.IOHelper; import org.apache.camel.util.ObjectHelper; @@ -74,20 +73,20 @@ import org.slf4j.LoggerFactory; /** * A helper class to transform to and from various JAXB types such as {@link Source} and {@link Document} * - * @version + * @version */ @Converter public class XmlConverter { @Deprecated -//It will be removed in Camel 3.0, please use the Exchange.DEFAULT_CHARSET +//It will be removed in Camel 3.0, please use the Exchange.DEFAULT_CHARSET public static final String DEFAULT_CHARSET_PROPERTY = org.apache.camel.default.charset; - + public static final String OUTPUT_PROPERTIES_PREFIX = org.apache.camel.xmlconverter.output.; public static final String DOCUMENT_BUILDER_FACTORY_FEATURE = org.apache.camel.xmlconverter.documentBuilderFactory.feature; public static String defaultCharset = ObjectHelper.getSystemProperty(Exchange.DEFAULT_CHARSET_PROPERTY, UTF-8); -private static final Logger LOG = LoggerFactory.getLogger(XPathBuilder.class); - +private static final Logger LOG = LoggerFactory.getLogger(XmlConverter.class); + private DocumentBuilderFactory documentBuilderFactory; private TransformerFactory transformerFactory; @@ -166,8 +165,8 @@ public class XmlConverter { /** * Converts the given Node to a Source - * @throws TransformerException - * @throws ParserConfigurationException + * @throws TransformerException + * @throws ParserConfigurationException * @deprecated use toDOMSource instead */ @Deprecated @@ -177,15 +176,15 @@ public class XmlConverter { /** * Converts the given Node to a Source - * @throws TransformerException - * @throws ParserConfigurationException + * @throws TransformerException + * @throws ParserConfigurationException */ @Converter public DOMSource toDOMSource(Node node) throws ParserConfigurationException, TransformerException { Document document = toDOMDocument(node); return new DOMSource(document); } - + /** * Converts the given Document to a DOMSource */ @@ -224,17 +223,17 @@ public class XmlConverter { } else if (source instanceof BytesSource) { return new String(((BytesSource) source).getData()); } else { -StringWriter buffer = new StringWriter(); +StringWriter buffer = new StringWriter(); if (exchange != null) { // check the camelContext properties first Properties properties = ObjectHelper.getCamelPropertiesWithPrefix(OUTPUT_PROPERTIES_PREFIX, exchange.getContext()); if (properties.size() 0) { toResult(source, new StreamResult(buffer), properties); return buffer.toString(); -} +} } // using the old way to deal with it -toResult(source, new StreamResult(buffer)); +toResult(source, new StreamResult(buffer)); return buffer.toString(); } } @@ -264,7 +263,7 @@
[3/3] git commit: Fixed the log class typo of XmlConverter
Fixed the log class typo of XmlConverter Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5a47eefb Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5a47eefb Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5a47eefb Branch: refs/heads/camel-2.13.x Commit: 5a47eefb4ab915c7acc7dab3e54cd0c9c885cb62 Parents: a6d75c5 Author: Willem Jiang willem.ji...@gmail.com Authored: Tue Aug 19 10:50:00 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Tue Aug 19 10:51:14 2014 +0800 -- .../camel/converter/jaxp/XmlConverter.java | 75 ++-- 1 file changed, 37 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/5a47eefb/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java -- diff --git a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java index 2543de5..37cf7f4 100644 --- a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java +++ b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java @@ -64,7 +64,6 @@ import org.apache.camel.BytesSource; import org.apache.camel.Converter; import org.apache.camel.Exchange; import org.apache.camel.StringSource; -import org.apache.camel.builder.xml.XPathBuilder; import org.apache.camel.util.IOHelper; import org.apache.camel.util.ObjectHelper; @@ -74,20 +73,20 @@ import org.slf4j.LoggerFactory; /** * A helper class to transform to and from various JAXB types such as {@link Source} and {@link Document} * - * @version + * @version */ @Converter public class XmlConverter { @Deprecated -//It will be removed in Camel 3.0, please use the Exchange.DEFAULT_CHARSET +//It will be removed in Camel 3.0, please use the Exchange.DEFAULT_CHARSET public static final String DEFAULT_CHARSET_PROPERTY = org.apache.camel.default.charset; - + public static final String OUTPUT_PROPERTIES_PREFIX = org.apache.camel.xmlconverter.output.; public static final String DOCUMENT_BUILDER_FACTORY_FEATURE = org.apache.camel.xmlconverter.documentBuilderFactory.feature; public static String defaultCharset = ObjectHelper.getSystemProperty(Exchange.DEFAULT_CHARSET_PROPERTY, UTF-8); -private static final Logger LOG = LoggerFactory.getLogger(XPathBuilder.class); - +private static final Logger LOG = LoggerFactory.getLogger(XmlConverter.class); + private DocumentBuilderFactory documentBuilderFactory; private TransformerFactory transformerFactory; @@ -166,8 +165,8 @@ public class XmlConverter { /** * Converts the given Node to a Source - * @throws TransformerException - * @throws ParserConfigurationException + * @throws TransformerException + * @throws ParserConfigurationException * @deprecated use toDOMSource instead */ @Deprecated @@ -177,15 +176,15 @@ public class XmlConverter { /** * Converts the given Node to a Source - * @throws TransformerException - * @throws ParserConfigurationException + * @throws TransformerException + * @throws ParserConfigurationException */ @Converter public DOMSource toDOMSource(Node node) throws ParserConfigurationException, TransformerException { Document document = toDOMDocument(node); return new DOMSource(document); } - + /** * Converts the given Document to a DOMSource */ @@ -224,17 +223,17 @@ public class XmlConverter { } else if (source instanceof BytesSource) { return new String(((BytesSource) source).getData()); } else { -StringWriter buffer = new StringWriter(); +StringWriter buffer = new StringWriter(); if (exchange != null) { // check the camelContext properties first Properties properties = ObjectHelper.getCamelPropertiesWithPrefix(OUTPUT_PROPERTIES_PREFIX, exchange.getContext()); if (properties.size() 0) { toResult(source, new StreamResult(buffer), properties); return buffer.toString(); -} +} } // using the old way to deal with it -toResult(source, new StreamResult(buffer)); +toResult(source, new StreamResult(buffer)); return buffer.toString(); } } @@ -264,7 +263,7 @@ public class XmlConverter { return buffer.toByteArray(); } } - + /** * Converts the given input Node into text * @@ -274,7 +273,7 @@