svn commit: r946042 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache camel-2160-release.html restlet.html
Author: buildbot Date: Thu Apr 2 08:20:38 2015 New Revision: 946042 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2160-release.html websites/production/camel/content/restlet.html Modified: websites/production/camel/content/book-component-appendix.html == --- websites/production/camel/content/book-component-appendix.html (original) +++ websites/production/camel/content/book-component-appendix.html Thu Apr 2 08:20:38 2015 @@ -1325,11 +1325,11 @@ template.send(quot;direct:alias-verify /div /div pThe strongcxf:/strong component provides integration with a shape=rect href=http://cxf.apache.org;Apache CXF/a for connecting to JAX-WS services hosted in CXF./ppstyle type=text/css/*![CDATA[*/ -div.rbtoc1427919462881 {padding: 0px;} -div.rbtoc1427919462881 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1427919462881 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1427962700734 {padding: 0px;} +div.rbtoc1427962700734 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1427962700734 li {margin-left: 0px;padding-left: 0px;} -/*]]*//style/pdiv class=toc-macro rbtoc1427919462881 +/*]]*//style/pdiv class=toc-macro rbtoc1427962700734 ul class=toc-indentationlia shape=rect href=#CXF-CXFComponentCXF Component/a ul class=toc-indentationlia shape=rect href=#CXF-URIformatURI format/a/lilia shape=rect href=#CXF-OptionsOptions/a ul class=toc-indentationlia shape=rect href=#CXF-ThedescriptionsofthedataformatsThe descriptions of the dataformats/a @@ -9904,7 +9904,13 @@ ref:someName[?options] /div/divpFormat of restletUrl:/pdiv class=code panel pdl style=border-width: 1px;div class=codeContent panelContent pdl script class=theme: Default; brush: java; gutter: false type=syntaxhighlighter![CDATA[protocol://hostname[:port][/resourcePattern] ]]/script -/div/divpRestlet promotes decoupling of protocol and application concerns. The reference implementation of a shape=rect class=external-link href=http://www.noelios.com/products/restlet-engine; rel=nofollowRestlet Engine/a supports a number of protocols. However, we have tested the HTTP protocol only. The default port is port 80. We do not automatically switch default port based on the protocol yet./ppYou can append query options to the URI in the following format, code?option=valueamp;option=valueamp;.../code/pp#160;/pdiv class=aui-message problem shadowed information-macro +/div/divpRestlet promotes decoupling of protocol and application concerns. The reference implementation of a shape=rect class=external-link href=http://www.noelios.com/products/restlet-engine; rel=nofollowRestlet Engine/a supports a number of protocols. However, we have tested the HTTP protocol only. The default port is port 80. We do not automatically switch default port based on the protocol yet./ppYou can append query options to the URI in the following format, code?option=valueamp;option=valueamp;.../code/pp#160;/pdiv class=aui-message hint shadowed information-macro +span class=aui-icon icon-hintIcon/span +div class=message-content +pIt seems Restlet is case sensitive in understanding headers. For example to use content-type, use Content-Type, and for location use Location and so on./p +/div +/div +div class=aui-message problem shadowed information-macro span class=aui-icon icon-problemIcon/span div class=message-content pWe have received a report about drop in performance in camel-restlet in Camel 2.14.0 and 2.14.1. We have reported this to the Restlet team in a shape=rect class=external-link href=https://github.com/restlet/restlet-framework-java/issues/996; rel=nofollowissue 996/a. To remedy the issue then from Camel 2.14.2 onwards you can set synchronous=true as option on the endpoint uris, Or set it on the RestletComponent as a global option so all endpoints inherit this option./p Modified: websites/production/camel/content/book-in-one-page.html == --- websites/production/camel/content/book-in-one-page.html (original) +++ websites/production/camel/content/book-in-one-page.html Thu Apr 2 08:20:38 2015 @@ -4126,11 +4126,11 @@ While not actual tutorials you might fin /div /div h2 id=BookInOnePage-PrefacePreface/h2pThis tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a a shape=rect class=external-link href=http://www.springramework.org;
camel git commit: Remove deprecated and not maintained archetype. For Scala we only support the Scala DSL.
Repository: camel Updated Branches: refs/heads/master 3f4a2f9e7 - 33e7087fb Remove deprecated and not maintained archetype. For Scala we only support the Scala DSL. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/33e7087f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/33e7087f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/33e7087f Branch: refs/heads/master Commit: 33e7087fbed393617a760ce2766fafe28d58a872 Parents: 3f4a2f9 Author: Claus Ibsen davscl...@apache.org Authored: Thu Apr 2 08:51:46 2015 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Apr 2 08:51:46 2015 +0200 -- .../camel-archetype-component-scala/pom.xml | 61 -- .../META-INF/maven/archetype-metadata.xml | 85 .../src/main/resources/META-INF/LICENSE.txt | 203 --- .../src/main/resources/META-INF/NOTICE.txt | 11 - .../resources/archetype-resources/ReadMe.txt| 23 --- .../main/resources/archetype-resources/pom.xml | 125 .../org/apache/camel/component/__scheme__ | 17 -- .../src/main/scala/__name__Component.scala | 36 .../src/main/scala/__name__Consumer.scala | 47 - .../src/main/scala/__name__Endpoint.scala | 37 .../src/main/scala/__name__Producer.scala | 32 --- .../src/test/resources/log4j.properties | 30 --- .../src/test/scala/__name__ComponentTest.scala | 45 tooling/archetypes/pom.xml | 1 - 14 files changed, 753 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/33e7087f/tooling/archetypes/camel-archetype-component-scala/pom.xml -- diff --git a/tooling/archetypes/camel-archetype-component-scala/pom.xml b/tooling/archetypes/camel-archetype-component-scala/pom.xml deleted file mode 100644 index 37e0d8e..000 --- a/tooling/archetypes/camel-archetype-component-scala/pom.xml +++ /dev/null @@ -1,61 +0,0 @@ -?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. - --- -project xmlns=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; -modelVersion4.0.0/modelVersion - -parent -groupIdorg.apache.camel/groupId -artifactIdarchetypes/artifactId -version2.16-SNAPSHOT/version -/parent - -groupIdorg.apache.camel.archetypes/groupId -artifactIdcamel-archetype-component-scala/artifactId -nameCamel :: Archetypes :: Scala Component/name -descriptionCreates a new Camel component with Scala./description -packagingmaven-archetype/packaging - - -build -extensions -extension -groupIdorg.apache.maven.archetype/groupId -artifactIdarchetype-packaging/artifactId -version${maven-archetype-packaging-version}/version -/extension -/extensions - -!-- include all resources but only filter archetype-metadata.xml -- -resources -resource -directorysrc/main/resources/directory -filteringfalse/filtering -/resource -resource -directorysrc/main/resources-filtered/directory -filteringtrue/filtering -includes -include**/archetype-metadata.xml/include -/includes -/resource -/resources -/build - -/project http://git-wip-us.apache.org/repos/asf/camel/blob/33e7087f/tooling/archetypes/camel-archetype-component-scala/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml -- diff --git a/tooling/archetypes/camel-archetype-component-scala/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
[2/4] camel git commit: CAMEL-7833 Added CamelOperatorTest
CAMEL-7833 Added CamelOperatorTest Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2d9b777a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2d9b777a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2d9b777a Branch: refs/heads/master Commit: 2d9b777a02cbe8359b738fadadf28da3eb4b96f6 Parents: 081e8a7 Author: Jyrki Ruuskanen yur...@kotikone.fi Authored: Wed Apr 1 18:34:47 2015 +0300 Committer: Willem Jiang willem.ji...@gmail.com Committed: Thu Apr 2 15:48:04 2015 +0800 -- .../java/org/apache/camel/rx/CamelOperator.java | 16 ++ .../org/apache/camel/rx/CamelOperatorTest.java | 57 2 files changed, 73 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/2d9b777a/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java -- diff --git a/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java b/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java index c218776..f965388 100644 --- a/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java +++ b/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.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.rx; import org.apache.camel.CamelContext; http://git-wip-us.apache.org/repos/asf/camel/blob/2d9b777a/components/camel-rx/src/test/java/org/apache/camel/rx/CamelOperatorTest.java -- diff --git a/components/camel-rx/src/test/java/org/apache/camel/rx/CamelOperatorTest.java b/components/camel-rx/src/test/java/org/apache/camel/rx/CamelOperatorTest.java new file mode 100644 index 000..8667e3b --- /dev/null +++ b/components/camel-rx/src/test/java/org/apache/camel/rx/CamelOperatorTest.java @@ -0,0 +1,57 @@ +/** + * 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.rx; + +import java.util.concurrent.TimeUnit; + +import org.apache.camel.Message; +import org.apache.camel.component.mock.MockEndpoint; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import rx.Observable; + +/** + */ +public class CamelOperatorTest extends RxTestSupport { +private static final Logger LOG = LoggerFactory.getLogger(CamelOperatorTest.class); + +@Test +public void testCamelOperator() throws Exception { +final MockEndpoint mockEndpoint1 = camelContext.getEndpoint(mock:results1, MockEndpoint.class); +final MockEndpoint mockEndpoint2 = camelContext.getEndpoint(mock:results2, MockEndpoint.class); +final MockEndpoint mockEndpoint3 = camelContext.getEndpoint(mock:results3, MockEndpoint.class); +mockEndpoint1.expectedMessageCount(2); +mockEndpoint2.expectedMessageCount(1); +mockEndpoint3.expectedMessageCount(1); + +ObservableMessage result = reactiveCamel.toObservable(direct:start) +.lift(new CamelOperator(camelContext, mock:results1)) +.lift(new CamelOperator(camelContext, log:foo)) +.debounce(1, TimeUnit.SECONDS) +.lift(new CamelOperator(mockEndpoint2)); +reactiveCamel.sendTo(result,
[4/4] camel git commit: Added a comment for the Main.getOrCreateCamelContext()
Added a comment for the Main.getOrCreateCamelContext() Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0d9928a2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0d9928a2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0d9928a2 Branch: refs/heads/master Commit: 0d9928a23e3b2c89638b3ec15dd0e3bb3dc35aa6 Parents: 2d9b777 Author: Willem Jiang willem.ji...@gmail.com Authored: Thu Apr 2 13:46:41 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Thu Apr 2 15:48:04 2015 +0800 -- camel-core/src/main/java/org/apache/camel/main/Main.java | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0d9928a2/camel-core/src/main/java/org/apache/camel/main/Main.java -- diff --git a/camel-core/src/main/java/org/apache/camel/main/Main.java b/camel-core/src/main/java/org/apache/camel/main/Main.java index 7a50785..1a7d74f 100644 --- a/camel-core/src/main/java/org/apache/camel/main/Main.java +++ b/camel-core/src/main/java/org/apache/camel/main/Main.java @@ -99,7 +99,11 @@ public class Main extends MainSupport { } /** + * * Gets or creates the {@link org.apache.camel.CamelContext} this main class is using. + * + * It just create a new CamelContextMap per call, please don't use it to access the camel context that will be ran by main. + * If you want to setup the CamelContext please use MainListener to get the new created camel context. */ public CamelContext getOrCreateCamelContext() { // force init
[1/4] camel git commit: CAMEL-7833 Added CamelOperator for lift()
Repository: camel Updated Branches: refs/heads/master 33e7087fb - d85f2f0c5 CAMEL-7833 Added CamelOperator for lift() Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/081e8a73 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/081e8a73 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/081e8a73 Branch: refs/heads/master Commit: 081e8a73195ce5776b3581b31ed15cbcadc68624 Parents: 33e7087 Author: Jyrki Ruuskanen yur...@kotikone.fi Authored: Wed Apr 1 17:54:26 2015 +0300 Committer: Willem Jiang willem.ji...@gmail.com Committed: Thu Apr 2 15:48:03 2015 +0800 -- .../java/org/apache/camel/rx/CamelOperator.java | 79 1 file changed, 79 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/081e8a73/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java -- diff --git a/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java b/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java new file mode 100644 index 000..c218776 --- /dev/null +++ b/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java @@ -0,0 +1,79 @@ +package org.apache.camel.rx; + +import org.apache.camel.CamelContext; +import org.apache.camel.Endpoint; +import org.apache.camel.Exchange; +import org.apache.camel.Message; +import org.apache.camel.Producer; +import org.apache.camel.util.ServiceHelper; +import rx.Observable; +import rx.Subscriber; + +public class CamelOperator implements Observable.OperatorMessage, Message { + +private Producer producer; + +public CamelOperator(CamelContext context, String uri) throws Exception { +this(context.getEndpoint(uri)); +} + +public CamelOperator(Endpoint endpoint) throws Exception { +this.producer = endpoint.createProducer(); +ServiceHelper.startService(producer); +} + +@Override +public Subscriber? super Message call(final Subscriber? super Message s) { +return new SubscriberMessage(s) { +@Override +public void onCompleted() { +try { +ServiceHelper.stopService(producer); +} catch (Exception e) { +throw new RuntimeCamelRxException(e); +} finally { +producer = null; +} +if (!s.isUnsubscribed()) { +s.onCompleted(); +} +} + +@Override +public void onError(Throwable e) { +Exchange exchange = producer.createExchange(); +exchange.setException(e); +process(exchange); +if (!s.isUnsubscribed()) { +s.onError(e); +} +} + +@Override +public void onNext(Message item) { +if (!s.isUnsubscribed()) { +s.onNext(process(item)); +} +} +}; +} + +private Exchange process(Exchange exchange) { +try { +producer.process(exchange); +if (exchange.hasOut()) { +exchange.setIn(exchange.getOut()); +exchange.setOut(null); +} +} catch (Exception e) { +throw new RuntimeCamelRxException(e); +} +return exchange; +} + +private Message process(Message message) { +Exchange exchange = producer.createExchange(); +exchange.setIn(message); +return process(exchange).getIn(); +} +}
[3/4] camel git commit: CAMEL-7833 Use ProducerTemplate to send message and pass the exception to the subscriber
CAMEL-7833 Use ProducerTemplate to send message and pass the exception to the subscriber Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d85f2f0c Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d85f2f0c Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d85f2f0c Branch: refs/heads/master Commit: d85f2f0c57021066ec0d674b9c6b4b8be2ac3344 Parents: 0d9928a Author: Willem Jiang willem.ji...@gmail.com Authored: Thu Apr 2 15:47:48 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Thu Apr 2 15:48:04 2015 +0800 -- .../java/org/apache/camel/rx/CamelOperator.java | 48 1 file changed, 29 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d85f2f0c/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java -- diff --git a/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java b/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java index f965388..2a6fa3a 100644 --- a/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java +++ b/components/camel-rx/src/main/java/org/apache/camel/rx/CamelOperator.java @@ -21,21 +21,26 @@ import org.apache.camel.Endpoint; import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.camel.Producer; +import org.apache.camel.ProducerTemplate; import org.apache.camel.util.ServiceHelper; import rx.Observable; import rx.Subscriber; public class CamelOperator implements Observable.OperatorMessage, Message { -private Producer producer; +private ProducerTemplate producerTemplate; +private Endpoint endpoint; public CamelOperator(CamelContext context, String uri) throws Exception { -this(context.getEndpoint(uri)); +producerTemplate = context.createProducerTemplate(); +endpoint = context.getEndpoint(uri); +ServiceHelper.startService(producerTemplate); } public CamelOperator(Endpoint endpoint) throws Exception { -this.producer = endpoint.createProducer(); -ServiceHelper.startService(producer); +this.producerTemplate = endpoint.getCamelContext().createProducerTemplate(); +this.endpoint = endpoint; +ServiceHelper.startService(producerTemplate); } @Override @@ -44,11 +49,11 @@ public class CamelOperator implements Observable.OperatorMessage, Message { @Override public void onCompleted() { try { -ServiceHelper.stopService(producer); +ServiceHelper.stopService(producerTemplate); } catch (Exception e) { throw new RuntimeCamelRxException(e); } finally { -producer = null; +producerTemplate = null; } if (!s.isUnsubscribed()) { s.onCompleted(); @@ -57,9 +62,8 @@ public class CamelOperator implements Observable.OperatorMessage, Message { @Override public void onError(Throwable e) { -Exchange exchange = producer.createExchange(); -exchange.setException(e); -process(exchange); +// producer cannot handler the exception +// so we just pass the exchange to the subscriber if (!s.isUnsubscribed()) { s.onError(e); } @@ -68,7 +72,17 @@ public class CamelOperator implements Observable.OperatorMessage, Message { @Override public void onNext(Message item) { if (!s.isUnsubscribed()) { -s.onNext(process(item)); +Exchange exchange = process(item); +if (exchange.getException() != null) { +s.onError(exchange.getException()); +} else { +if (exchange.hasOut()) { +s.onNext(exchange.getOut()); +} else { +s.onNext(exchange.getIn()); +} +} + } } }; @@ -76,20 +90,16 @@ public class CamelOperator implements Observable.OperatorMessage, Message { private Exchange process(Exchange exchange) { try { -producer.process(exchange); -if (exchange.hasOut()) { -exchange.setIn(exchange.getOut()); -exchange.setOut(null); -} +exchange = producerTemplate.send(endpoint, exchange); } catch (Exception e) { -throw new
[2/2] camel git commit: CAMEL-8585: camel-csv in lazyLoad mode should close the parser so it can release resources such as file handlers on windows.
CAMEL-8585: camel-csv in lazyLoad mode should close the parser so it can release resources such as file handlers on windows. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/92a39383 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/92a39383 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/92a39383 Branch: refs/heads/camel-2.15.x Commit: 92a393839dcbb9a58ccd8e630330e1bd6d0e9ccb Parents: 54c63fc Author: Claus Ibsen davscl...@apache.org Authored: Thu Apr 2 10:44:55 2015 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Apr 2 10:45:11 2015 +0200 -- .../csv/CsvUnmarshalOnCompletion.java | 41 +++ .../camel/dataformat/csv/CsvUnmarshaller.java | 22 -- .../csv/CsvUnmarshalStreamSpringTest.java | 30 ++ .../camel/dataformat/csv/CsvUnmarshalTest.java | 42 +++- .../CsvUnmarshalStreamSpringTest-context.xml| 7 +++- 5 files changed, 100 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/92a39383/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshalOnCompletion.java -- diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshalOnCompletion.java b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshalOnCompletion.java new file mode 100644 index 000..2bbb13b --- /dev/null +++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshalOnCompletion.java @@ -0,0 +1,41 @@ +/** + * 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.dataformat.csv; + +import java.io.Closeable; +import java.io.IOException; + +import org.apache.camel.Exchange; +import org.apache.camel.support.SynchronizationAdapter; + +public class CsvUnmarshalOnCompletion extends SynchronizationAdapter { + +private final Closeable closeable; + +public CsvUnmarshalOnCompletion(Closeable closeable) { +this.closeable = closeable; +} + +@Override +public void onDone(Exchange exchange) { +try { +closeable.close(); +} catch (IOException e) { +// ignore +} +} +} http://git-wip-us.apache.org/repos/asf/camel/blob/92a39383/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java -- diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java index d5fc315..da0ed54 100644 --- a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java +++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java @@ -16,6 +16,7 @@ */ package org.apache.camel.dataformat.csv; +import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -111,6 +112,7 @@ abstract class CsvUnmarshaller { */ @SuppressWarnings(unchecked) private static final class StreamCsvUnmarshaller extends CsvUnmarshaller { + private StreamCsvUnmarshaller(CSVFormat format, CsvDataFormat dataFormat) { super(format, dataFormat); } @@ -121,7 +123,10 @@ abstract class CsvUnmarshaller { try { reader = new InputStreamReader(inputStream, IOHelper.getCharsetName(exchange)); CSVParser parser = new CSVParser(reader, format); -return new CsvIterator(parser.iterator(), converter); +CsvIterator answer = new CsvIterator(parser, converter); +// add to UoW so we can close the iterator so it can release any resources +exchange.addOnCompletion(new CsvUnmarshalOnCompletion(answer)); +return answer; } catch (Exception e) {
[1/2] camel git commit: CAMEL-8585: camel-csv in lazyLoad mode should close the parser so it can release resources such as file handlers on windows.
Repository: camel Updated Branches: refs/heads/camel-2.15.x 54c63fc3b - 92a393839 refs/heads/master 1669aa0c2 - 6c39b692f CAMEL-8585: camel-csv in lazyLoad mode should close the parser so it can release resources such as file handlers on windows. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6c39b692 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6c39b692 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6c39b692 Branch: refs/heads/master Commit: 6c39b692fb27b4966d3d0da7cb507a8ceae0fc45 Parents: 1669aa0 Author: Claus Ibsen davscl...@apache.org Authored: Thu Apr 2 10:44:55 2015 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Apr 2 10:44:55 2015 +0200 -- .../csv/CsvUnmarshalOnCompletion.java | 41 +++ .../camel/dataformat/csv/CsvUnmarshaller.java | 22 -- .../csv/CsvUnmarshalStreamSpringTest.java | 30 ++ .../camel/dataformat/csv/CsvUnmarshalTest.java | 42 +++- .../CsvUnmarshalStreamSpringTest-context.xml| 7 +++- 5 files changed, 100 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/6c39b692/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshalOnCompletion.java -- diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshalOnCompletion.java b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshalOnCompletion.java new file mode 100644 index 000..2bbb13b --- /dev/null +++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshalOnCompletion.java @@ -0,0 +1,41 @@ +/** + * 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.dataformat.csv; + +import java.io.Closeable; +import java.io.IOException; + +import org.apache.camel.Exchange; +import org.apache.camel.support.SynchronizationAdapter; + +public class CsvUnmarshalOnCompletion extends SynchronizationAdapter { + +private final Closeable closeable; + +public CsvUnmarshalOnCompletion(Closeable closeable) { +this.closeable = closeable; +} + +@Override +public void onDone(Exchange exchange) { +try { +closeable.close(); +} catch (IOException e) { +// ignore +} +} +} http://git-wip-us.apache.org/repos/asf/camel/blob/6c39b692/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java -- diff --git a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java index d5fc315..da0ed54 100644 --- a/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java +++ b/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvUnmarshaller.java @@ -16,6 +16,7 @@ */ package org.apache.camel.dataformat.csv; +import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -111,6 +112,7 @@ abstract class CsvUnmarshaller { */ @SuppressWarnings(unchecked) private static final class StreamCsvUnmarshaller extends CsvUnmarshaller { + private StreamCsvUnmarshaller(CSVFormat format, CsvDataFormat dataFormat) { super(format, dataFormat); } @@ -121,7 +123,10 @@ abstract class CsvUnmarshaller { try { reader = new InputStreamReader(inputStream, IOHelper.getCharsetName(exchange)); CSVParser parser = new CSVParser(reader, format); -return new CsvIterator(parser.iterator(), converter); +CsvIterator answer = new CsvIterator(parser, converter); +// add to UoW so we can close the iterator so it can release any resources +
svn commit: r946040 - in /websites/production/camel/content: cache/main.pageCache camel-2160-release.html
Author: buildbot Date: Thu Apr 2 07:24:29 2015 New Revision: 946040 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2160-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2160-release.html == --- websites/production/camel/content/camel-2160-release.html (original) +++ websites/production/camel/content/camel-2160-release.html Thu Apr 2 07:24:29 2015 @@ -84,7 +84,7 @@ tbody tr td valign=top width=100% -div class=wiki-content maincontenth1 id=Camel2.16.0Release-Camel2.16.0release(currentlyinprogress)Camel 2.16.0#160;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.16.0Release-NewandNoteworthyNew and Noteworthy/h2pWelcome to the x.y.z release which approx XXX issues resolved (new features, improvements and bug fixes such as...)/ppNoteworthy improvements:/pulliThe route models (definition classes) preserve property placeholders, which allows round trip editing, and also prevents showing potential sensitive information/liliAdded onPrepareFailure option to#160;a shape=rect href=dead-letter-channel.htmlDead Letter Cha nnel/a to allow a custom processor to prepare the Exchange before sending to the dead letter queue./lilia shape=rect href=mongodb.htmlMongoDB/a tailable consumers now allow setting the codereadPreference/code option./liliUsing setFaultBody / setFaultHeader behaves similar to setBody / setHeader to preserve existing headers/attachments by setting on existing IN or OUT message./liliJava DSL using choice with end vs endChoice now validates you use them as intended. Any misconfiguration now throws an exception explaining the problem./lilia shape=rect href=pojo-producing.htmlPOJO Producing/a and#160;a shape=rect href=pojo-consuming.htmlPOJO Consuming/a lifecycle is now in sync with a shape=rect href=camelcontext.htmlCamelContext/a#160;which ensures it works as similar to Camel#160;a shape=rect href=routes.htmlRoutes/a does. Also the created producer/consumer is stopped when#160;a shape=rect href=camelcontext.htmlCame lContext/a#160;is stopping to cleanup properly./lilia shape=rect href=jms.htmlJMS/a#160;component now allows configuring concurrentConsumers/maxConcurrentConsumers separately between from(jms) vs to(jms) using request/reply over JMS/lilispana shape=rect class=external-link href=https://issues.apache.org/jira/browse/CAMEL-8506;Added SEARCH/a operation to Elasticsearch component/span/lilispanThe#160;a shape=rect href=properties.htmlProperties/a component (property placeholder) now supports an encoding option to allow reading the .properties files using a specific charset such as UTF-8. By default ISO-8859-1 is used (latin1)/span/lilispanAdded#160;codereceviveBufferSize/code option to the a shape=rect href=ftp.htmlFTP/a#160;component to make download faster. The size is by default 32kb buffer./span/lilispanThe#160;a shape=rect href=aggregator2.htmlAggregator2/a EIP now allows an external source using a#160;codeAggregateController/code to control the aggregator, such as for forcing completing a group or all groups, or query runtime information from the aggregator. A default controller is provided out of the box if none has been configured./span/lilispanThe#160;a shape=rect href=aggregator2.htmlAggregator2/a now enlists in JMX using a#160;codeManagedAggregateProcessorMBean/code which has more information, and also allows using the aggregate controller to control it./span/lilispanThe#160;a shape=rect href=aggregator2.htmlAggregator2/a now includes more runtime statistics which can be accessed from Java and JMX about number of incoming and completed exchanges, and per different completion triggers./span/lilispanThe#160;a shape=rect href=aggregator2.htmlAggregator2/a now supports pre-completion mode if the aggregation strategy implements#160;codePreCompletionAwareAggregationStrategy/code. This supports the use-case wh ere an incoming Exchange are used to determine if the current aggregated group is completed or not. If completed the group is emitted as-is, and the new incoming Exchange is used to start a new group from scratch./span/lilispanAdded options to#160;a shape=rect href=mail.htmlMail/a consumer so it can skip or handle a mail message that cannot be read from the mail server in the batch; and then move on to read the
[1/5] camel git commit: CAMEL-8591: Upgrade to restlet 2.3.1
Repository: camel Updated Branches: refs/heads/camel-2.15.x ec663813e - 54c63fc3b refs/heads/master d85f2f0c5 - 1669aa0c2 CAMEL-8591: Upgrade to restlet 2.3.1 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1669aa0c Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1669aa0c Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1669aa0c Branch: refs/heads/master Commit: 1669aa0c25578a95662e3e2c38258d32e6bd749d Parents: dd0f74c Author: Claus Ibsen davscl...@apache.org Authored: Thu Apr 2 10:10:57 2015 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Apr 2 10:11:45 2015 +0200 -- .../org/apache/camel/component/restlet/DefaultRestletBinding.java | 2 +- parent/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/1669aa0c/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java -- diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java index 35369bf..3d8df74 100644 --- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java +++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java @@ -47,12 +47,12 @@ import org.restlet.data.ChallengeResponse; import org.restlet.data.ChallengeScheme; import org.restlet.data.CharacterSet; import org.restlet.data.Form; +import org.restlet.data.Header; import org.restlet.data.MediaType; import org.restlet.data.Method; import org.restlet.data.Preference; import org.restlet.data.Status; import org.restlet.engine.application.DecodeRepresentation; -import org.restlet.engine.header.Header; import org.restlet.engine.header.HeaderConstants; import org.restlet.representation.FileRepresentation; import org.restlet.representation.InputRepresentation; http://git-wip-us.apache.org/repos/asf/camel/blob/1669aa0c/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index b701214..80b0174 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -394,7 +394,7 @@ rabbitmq-amqp-client-version3.3.4/rabbitmq-amqp-client-version reflections-bundle-version0.9.8_1/reflections-bundle-version regexp-bundle-version1.4_1/regexp-bundle-version -restlet-version2.2.3/restlet-version +restlet-version2.3.1/restlet-version rhino-bundle-version1.7R2_3/rhino-bundle-version rhino-version1.7R2/rhino-version rome-bundle-version1.0_3/rome-bundle-version
[2/5] camel git commit: CAMEL-8584 Ensure circuit stays open during halfOpenAfter period
CAMEL-8584 Ensure circuit stays open during halfOpenAfter period Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dd0f74c0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dd0f74c0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dd0f74c0 Branch: refs/heads/master Commit: dd0f74c002d57b5b2f4da446b67d4194301c6335 Parents: 323ab6b Author: jack.perrett jack.perr...@gamesys.co.uk Authored: Wed Apr 1 14:48:39 2015 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Apr 2 10:11:45 2015 +0200 -- .../processor/loadbalancer/CircuitBreakerLoadBalancer.java | 5 - 1 file changed, 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/dd0f74c0/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java b/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java index f760311..645b477 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java +++ b/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java @@ -200,11 +200,6 @@ public class CircuitBreakerLoadBalancer extends LoadBalancerSupport implements T private boolean rejectExchange(final Exchange exchange, final AsyncCallback callback) { exchange.setException(new RejectedExecutionException(CircuitBreaker Open: failures: + failures + , lastFailure: + lastFailure)); -/* - * If the circuit opens, we have to prevent the execution of any - * processor. The failures count can be set to 0. - */ -failures.set(0); callback.done(true); return true; }
[3/5] camel git commit: CAMEL-8584 Update half-open test to assert circuit stays open during halfOpenAfter period
CAMEL-8584 Update half-open test to assert circuit stays open during halfOpenAfter period Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/323ab6bd Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/323ab6bd Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/323ab6bd Branch: refs/heads/master Commit: 323ab6bd5c9c0ef1abab610270343d00f77ec6c6 Parents: d85f2f0 Author: jack.perrett jack.perr...@gamesys.co.uk Authored: Wed Apr 1 12:55:16 2015 +0100 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Apr 2 10:11:45 2015 +0200 -- .../processor/CircuitBreakerLoadBalancerTest.java | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/323ab6bd/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java b/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java index 2644240..3607ae8 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java @@ -102,17 +102,17 @@ public class CircuitBreakerLoadBalancerTest extends ContextTestSupport { assertTrue(exchangeThree.getException() instanceof RejectedExecutionException); } -public void testHalfOpenAfterMessageThreeSync() throws Exception { +public void testHalfOpenAfterTimeoutSync() throws Exception { String endpoint = direct:start; -halfOpenAfterMessageThree(endpoint); +halfOpenAfterTimeout(endpoint); } -public void testHalfOpenAfterMessageThreeAsync() throws Exception { +public void testHalfOpenAfterTimeoutAsync() throws Exception { String endpoint = direct:start-async; -halfOpenAfterMessageThree(endpoint); +halfOpenAfterTimeout(endpoint); } -private void halfOpenAfterMessageThree(String endpoint) throws InterruptedException, Exception { +private void halfOpenAfterTimeout(String endpoint) throws InterruptedException, Exception { expectsMessageCount(2, result); result.whenAnyExchangeReceived(new Processor() { @@ -125,6 +125,7 @@ public class CircuitBreakerLoadBalancerTest extends ContextTestSupport { Exchange exchangeOne = sendMessage(endpoint, message one); Exchange exchangeTwo = sendMessage(endpoint, message two); Exchange exchangeThree = sendMessage(endpoint, message three); +Exchange exchangeFour = sendMessage(endpoint, message four); assertMockEndpointsSatisfied(); Thread.sleep(1000); result.reset(); @@ -135,15 +136,16 @@ public class CircuitBreakerLoadBalancerTest extends ContextTestSupport { } }); expectsMessageCount(1, result); -Exchange exchangeFour = sendMessage(endpoint, message four); Exchange exchangeFive = sendMessage(endpoint, message five); +Exchange exchangeSix = sendMessage(endpoint, message six); assertMockEndpointsSatisfied(); assertTrue(exchangeOne.getException() instanceof MyCustomException); assertTrue(exchangeTwo.getException() instanceof MyCustomException); assertTrue(exchangeThree.getException() instanceof RejectedExecutionException); -assertTrue(exchangeFour.getException() instanceof MyCustomException); -assertTrue(exchangeFive.getException() instanceof RejectedExecutionException); +assertTrue(exchangeFour.getException() instanceof RejectedExecutionException); +assertTrue(exchangeFive.getException() instanceof MyCustomException); +assertTrue(exchangeSix.getException() instanceof RejectedExecutionException); } public void testHalfOpenToCloseTransitionSync() throws Exception {
[2/2] camel git commit: Fixed CS
Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c8d23d32 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c8d23d32 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c8d23d32 Branch: refs/heads/master Commit: c8d23d327793b522435f1ef712705ea213c6615b Parents: 48ac4ab Author: Claus Ibsen davscl...@apache.org Authored: Thu Apr 2 11:46:45 2015 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Apr 2 11:46:45 2015 +0200 -- .../java/org/apache/camel/component/aws/sns/SnsConstants.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c8d23d32/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConstants.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConstants.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConstants.java index 72c2046..9478ba7 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConstants.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConstants.java @@ -18,11 +18,10 @@ package org.apache.camel.component.aws.sns; /** * Constants used in Camel AWS SNS module - * */ public interface SnsConstants { String MESSAGE_ID = CamelAwsSnsMessageId; String SUBJECT = CamelAwsSnsSubject; -String MESSAGE_STRUCTURE =CamelAwsSnsMessageStructure; +String MESSAGE_STRUCTURE = CamelAwsSnsMessageStructure; } \ No newline at end of file
[1/2] camel git commit: New Feature - AWS SNS add messageStructure property configuration
Repository: camel Updated Branches: refs/heads/master 6c39b692f - c8d23d327 New Feature - AWS SNS add messageStructure property configuration Json message body support added as a new feature. on the URI configuration ..messageStructure=json or on the message header add (SnsConstans.MESSAGE_STRUCTURE,json) key-value Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/48ac4abb Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/48ac4abb Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/48ac4abb Branch: refs/heads/master Commit: 48ac4abb96a78aec8df2f4c7c2e4b703f2c29a46 Parents: 6c39b69 Author: Can YAMAN c...@yaman.me Authored: Thu Apr 2 10:14:58 2015 +0300 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Apr 2 11:46:02 2015 +0200 -- .../camel/component/aws/sns/SnsConfiguration.java| 13 - .../apache/camel/component/aws/sns/SnsConstants.java | 1 + .../apache/camel/component/aws/sns/SnsProducer.java | 15 +-- 3 files changed, 26 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/48ac4abb/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java index c6d8a118..ab48722 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConfiguration.java @@ -44,6 +44,8 @@ public class SnsConfiguration implements Cloneable { private String topicArn; @UriParam private String policy; +@UriParam +private String messageStructure; public void setAmazonSNSEndpoint(String awsSNSEndpoint) { this.amazonSNSEndpoint = awsSNSEndpoint; @@ -108,7 +110,15 @@ public class SnsConfiguration implements Cloneable { public void setPolicy(String policy) { this.policy = policy; } - + +public String getMessageStructure() { +return messageStructure; +} + +public void setMessageStructure(String messageStructure) { +this.messageStructure = messageStructure; +} + @Override public String toString() { return SnsConfiguration[topicName= + topicName @@ -118,6 +128,7 @@ public class SnsConfiguration implements Cloneable { + , subject= + subject + , topicArn= + topicArn + , policy= + policy ++ , messageStructure= + messageStructure + ]; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/48ac4abb/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConstants.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConstants.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConstants.java index bbbd856..72c2046 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConstants.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsConstants.java @@ -24,4 +24,5 @@ public interface SnsConstants { String MESSAGE_ID = CamelAwsSnsMessageId; String SUBJECT = CamelAwsSnsSubject; +String MESSAGE_STRUCTURE =CamelAwsSnsMessageStructure; } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/48ac4abb/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java index 5753b8a..b0dbdcc 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsProducer.java @@ -42,10 +42,12 @@ public class SnsProducer extends DefaultProducer { public void process(Exchange exchange) throws Exception { PublishRequest request = new PublishRequest(); + request.setTopicArn(getConfiguration().getTopicArn()); -request.setMessage(exchange.getIn().getBody(String.class)); request.setSubject(determineSubject(exchange)); - +request.setMessageStructure(determineMessageStructure(exchange)); +
camel git commit: Upgrade to Lucene 4.10.3
Repository: camel Updated Branches: refs/heads/master 556cf3d18 - 04bedcc97 Upgrade to Lucene 4.10.3 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/04bedcc9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/04bedcc9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/04bedcc9 Branch: refs/heads/master Commit: 04bedcc97589b26c10714e9e1641163e335f71c1 Parents: 556cf3d Author: Babak Vahdat bvah...@apache.org Authored: Fri Apr 3 03:41:24 2015 +0200 Committer: Babak Vahdat bvah...@apache.org Committed: Fri Apr 3 03:41:24 2015 +0200 -- .../org/apache/camel/component/lucene/LuceneConfiguration.java | 2 +- .../java/org/apache/camel/component/lucene/LuceneIndexer.java| 2 +- .../java/org/apache/camel/component/lucene/LuceneSearcher.java | 2 +- parent/pom.xml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/04bedcc9/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java -- diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java index 92accd1..6aff71d 100644 --- a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java +++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneConfiguration.java @@ -47,7 +47,7 @@ public class LuceneConfiguration { private Analyzer analyzer; @UriParam private int maxHits; -private Version luceneVersion = Version.LUCENE_4_10_2; +private Version luceneVersion = Version.LUCENE_4_10_3; public LuceneConfiguration() { } http://git-wip-us.apache.org/repos/asf/camel/blob/04bedcc9/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java -- diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java index a335398..49a6ee8 100644 --- a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java +++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneIndexer.java @@ -144,7 +144,7 @@ public class LuceneIndexer { private void openIndexWriter() throws IOException { IndexWriterConfig indexWriterConfig; // use create or append so we can reuse existing index if already exists -indexWriterConfig = new IndexWriterConfig(Version.LUCENE_4_10_2, getAnalyzer()).setOpenMode(OpenMode.CREATE_OR_APPEND); +indexWriterConfig = new IndexWriterConfig(Version.LUCENE_4_10_3, getAnalyzer()).setOpenMode(OpenMode.CREATE_OR_APPEND); indexWriter = new IndexWriter(niofsDirectory, indexWriterConfig); } http://git-wip-us.apache.org/repos/asf/camel/blob/04bedcc9/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java -- diff --git a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java index 9bc1a9e..6fda148 100644 --- a/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java +++ b/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneSearcher.java @@ -59,7 +59,7 @@ public class LuceneSearcher { } public Hits search(String searchPhrase, int maxNumberOfHits) throws Exception { -return search(searchPhrase, maxNumberOfHits, Version.LUCENE_4_10_2, false); +return search(searchPhrase, maxNumberOfHits, Version.LUCENE_4_10_3, false); } public Hits search(String searchPhrase, int maxNumberOfHits, Version luceneVersion, boolean returnLuceneDocs) throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/04bedcc9/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index f8e6231..5667741 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -311,8 +311,8 @@ log4j-version1.2.17/log4j-version lucene3-bundle-version3.6.0_1/lucene3-bundle-version lucene3-version3.6.0/lucene3-version -lucene-bundle-version4.10.2_1/lucene-bundle-version -lucene-version4.10.2/lucene-version +
camel git commit: Better make use of the DSL style wording directly instead of the plain Java code noise.
Repository: camel Updated Branches: refs/heads/master 2bd8de303 - c67392fe1 Better make use of the DSL style wording directly instead of the plain Java code noise. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c67392fe Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c67392fe Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c67392fe Branch: refs/heads/master Commit: c67392fe16d1885310d5659e50bdfca28479261f Parents: 2bd8de3 Author: Babak Vahdat bvah...@apache.org Authored: Fri Apr 3 03:08:44 2015 +0200 Committer: Babak Vahdat bvah...@apache.org Committed: Fri Apr 3 03:08:44 2015 +0200 -- .../component/jackson/JacksonMarshalTest.java | 22 +++- 1 file changed, 7 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c67392fe/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalTest.java -- diff --git a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalTest.java b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalTest.java index 330a494..d394e7f 100644 --- a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalTest.java +++ b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalTest.java @@ -21,6 +21,7 @@ import java.util.Map; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.model.dataformat.JsonLibrary; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; @@ -90,23 +91,14 @@ public class JacksonMarshalTest extends CamelTestSupport { @Override public void configure() throws Exception { +from(direct:in).marshal().json(JsonLibrary.Jackson); + from(direct:back).unmarshal().json(JsonLibrary.Jackson).to(mock:reverse); -JacksonDataFormat format = new JacksonDataFormat(); - -from(direct:in).marshal(format); -from(direct:back).unmarshal(format).to(mock:reverse); - -JacksonDataFormat prettyPrintDataFormat = new JacksonDataFormat(); -prettyPrintDataFormat.setPrettyPrint(true); - -from(direct:inPretty).marshal(prettyPrintDataFormat); - from(direct:backPretty).unmarshal(prettyPrintDataFormat).to(mock:reverse); - -JacksonDataFormat formatPojo = new JacksonDataFormat(TestPojo.class); - -from(direct:inPojo).marshal(formatPojo); - from(direct:backPojo).unmarshal(formatPojo).to(mock:reversePojo); +from(direct:inPretty).marshal().json(JsonLibrary.Jackson, true); + from(direct:backPretty).unmarshal().json(JsonLibrary.Jackson).to(mock:reverse); +from(direct:inPojo).marshal().json(JsonLibrary.Jackson); +from(direct:backPojo).unmarshal().json(JsonLibrary.Jackson, TestPojo.class).to(mock:reversePojo); } }; }
[3/4] camel git commit: CAMEL-8593 Added the missing log parameter in JmsEndpoint.configureListenerContainer()
CAMEL-8593 Added the missing log parameter in JmsEndpoint.configureListenerContainer() Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7663ac03 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7663ac03 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7663ac03 Branch: refs/heads/camel-2.14.x Commit: 7663ac030e190fc03f33131e5e52ac0a49bac6d3 Parents: 2b97595 Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Apr 3 09:47:21 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Apr 3 10:14:39 2015 +0800 -- .../main/java/org/apache/camel/component/jms/JmsEndpoint.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/7663ac03/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java -- diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java index af15397..7da1427 100644 --- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java +++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java @@ -168,10 +168,10 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy public void configureListenerContainer(AbstractMessageListenerContainer listenerContainer, JmsConsumer consumer) { if (destinationName != null) { listenerContainer.setDestinationName(destinationName); -log.debug(Using destinationName: {} on listenerContainer: , destinationName, listenerContainer); +log.debug(Using destinationName: {} on listenerContainer: {}, destinationName, listenerContainer); } else if (destination != null) { listenerContainer.setDestination(destination); -log.debug(Using destination: {} on listenerContainer: , destinationName, listenerContainer); +log.debug(Using destination: {} on listenerContainer: {}, destinationName, listenerContainer); } else { DestinationResolver resolver = getDestinationResolver(); if (resolver != null) { @@ -179,7 +179,7 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy } else { throw new IllegalArgumentException(Neither destination, destinationName or destinationResolver are specified on this endpoint!); } -log.debug(Using destinationResolver: {} on listenerContainer: , resolver, listenerContainer); +log.debug(Using destinationResolver: {} on listenerContainer: {}, resolver, listenerContainer); } listenerContainer.setPubSubDomain(pubSubDomain);
[1/4] camel git commit: CAMEL-8593 Added the missing log parameter in JmsEndpoint.configureListenerContainer()
Repository: camel Updated Branches: refs/heads/camel-2.14.x 2b975957f - 595d1c534 refs/heads/camel-2.15.x bc44fd751 - fc4aa78f4 CAMEL-8593 Added the missing log parameter in JmsEndpoint.configureListenerContainer() Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/910e1492 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/910e1492 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/910e1492 Branch: refs/heads/camel-2.15.x Commit: 910e149280bd2d2d8bafa4946dc02ee9a22d36e3 Parents: bc44fd7 Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Apr 3 09:47:21 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Apr 3 10:14:04 2015 +0800 -- .../main/java/org/apache/camel/component/jms/JmsEndpoint.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/910e1492/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java -- diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java index 21a2dab..8008293 100644 --- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java +++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java @@ -187,10 +187,10 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy public void configureListenerContainer(AbstractMessageListenerContainer listenerContainer, JmsConsumer consumer) { if (destinationName != null) { listenerContainer.setDestinationName(destinationName); -log.debug(Using destinationName: {} on listenerContainer: , destinationName, listenerContainer); +log.debug(Using destinationName: {} on listenerContainer: {}, destinationName, listenerContainer); } else if (destination != null) { listenerContainer.setDestination(destination); -log.debug(Using destination: {} on listenerContainer: , destinationName, listenerContainer); +log.debug(Using destination: {} on listenerContainer: {}, destinationName, listenerContainer); } else { DestinationResolver resolver = getDestinationResolver(); if (resolver != null) { @@ -198,7 +198,7 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy } else { throw new IllegalArgumentException(Neither destination, destinationName or destinationResolver are specified on this endpoint!); } -log.debug(Using destinationResolver: {} on listenerContainer: , resolver, listenerContainer); +log.debug(Using destinationResolver: {} on listenerContainer: {}, resolver, listenerContainer); } listenerContainer.setPubSubDomain(pubSubDomain);
camel git commit: Revert the previous commit as JacksonJsonDataFormatTest extending JacksonMarshalTest does already contain the intended DSL style wording.
Repository: camel Updated Branches: refs/heads/master c91c41d1a - 556cf3d18 Revert the previous commit as JacksonJsonDataFormatTest extending JacksonMarshalTest does already contain the intended DSL style wording. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/556cf3d1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/556cf3d1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/556cf3d1 Branch: refs/heads/master Commit: 556cf3d183ec34ad92e35e36aa128b463664e62f Parents: c91c41d Author: Babak Vahdat bvah...@apache.org Authored: Fri Apr 3 03:24:50 2015 +0200 Committer: Babak Vahdat bvah...@apache.org Committed: Fri Apr 3 03:24:50 2015 +0200 -- .../component/jackson/JacksonMarshalTest.java | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/556cf3d1/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalTest.java -- diff --git a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalTest.java b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalTest.java index d394e7f..31f40b0 100644 --- a/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalTest.java +++ b/components/camel-jackson/src/test/java/org/apache/camel/component/jackson/JacksonMarshalTest.java @@ -21,7 +21,6 @@ import java.util.Map; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; -import org.apache.camel.model.dataformat.JsonLibrary; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; @@ -91,14 +90,21 @@ public class JacksonMarshalTest extends CamelTestSupport { @Override public void configure() throws Exception { -from(direct:in).marshal().json(JsonLibrary.Jackson); - from(direct:back).unmarshal().json(JsonLibrary.Jackson).to(mock:reverse); +JacksonDataFormat format = new JacksonDataFormat(); -from(direct:inPretty).marshal().json(JsonLibrary.Jackson, true); - from(direct:backPretty).unmarshal().json(JsonLibrary.Jackson).to(mock:reverse); +from(direct:in).marshal(format); +from(direct:back).unmarshal(format).to(mock:reverse); -from(direct:inPojo).marshal().json(JsonLibrary.Jackson); -from(direct:backPojo).unmarshal().json(JsonLibrary.Jackson, TestPojo.class).to(mock:reversePojo); +JacksonDataFormat prettyPrintDataFormat = new JacksonDataFormat(); +prettyPrintDataFormat.setPrettyPrint(true); + +from(direct:inPretty).marshal(prettyPrintDataFormat); + from(direct:backPretty).unmarshal(prettyPrintDataFormat).to(mock:reverse); + +JacksonDataFormat formatPojo = new JacksonDataFormat(TestPojo.class); + +from(direct:inPojo).marshal(formatPojo); + from(direct:backPojo).unmarshal(formatPojo).to(mock:reversePojo); } }; }
[2/5] camel git commit: CAMEL-8572 Fixed CS
CAMEL-8572 Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/eb533c4d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/eb533c4d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/eb533c4d Branch: refs/heads/master Commit: eb533c4d90c8127e1b10290411f50184131bd98e Parents: 90d5906 Author: ancosen anco...@gmail.com Authored: Thu Apr 2 23:06:31 2015 +0200 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Apr 3 10:01:17 2015 +0800 -- .../component/aws/ddb/AbstractDdbCommand.java | 6 ++--- .../component/aws/ddb/BatchGetItemsCommand.java | 4 +-- .../component/aws/ddb/DdbConfiguration.java | 4 +-- .../camel/component/aws/ddb/DdbEndpoint.java| 24 - .../component/aws/ddb/DeleteItemCommand.java| 7 ++--- .../component/aws/ddb/DeleteTableCommand.java | 4 +-- .../component/aws/ddb/DescribeTableCommand.java | 6 ++--- .../camel/component/aws/ddb/GetItemCommand.java | 4 +-- .../camel/component/aws/ddb/PutItemCommand.java | 4 +-- .../camel/component/aws/ddb/QueryCommand.java | 4 +-- .../camel/component/aws/ddb/ScanCommand.java| 4 +-- .../component/aws/ddb/UpdateItemCommand.java| 4 +-- .../component/aws/ddb/UpdateTableCommand.java | 4 +-- .../component/aws/ddb/AmazonDDBClientMock.java | 9 +++ .../aws/ddb/BatchGetItemsCommandTest.java | 19 +++-- .../aws/ddb/DeleteItemCommandTest.java | 13 + .../aws/ddb/DeleteTableCommandTest.java | 13 - .../aws/ddb/DescribeTableCommandTest.java | 13 - .../component/aws/ddb/GetItemCommandTest.java | 11 .../component/aws/ddb/PutItemCommandTest.java | 9 +++ .../component/aws/ddb/QueryCommandTest.java | 28 +--- .../component/aws/ddb/ScanCommandTest.java | 21 +++ .../aws/ddb/UpdateItemCommandTest.java | 17 ++-- .../DdbComponentIntegrationTest.java| 4 +-- 24 files changed, 109 insertions(+), 127 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/eb533c4d/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/AbstractDdbCommand.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/AbstractDdbCommand.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/AbstractDdbCommand.java index 09c7075..1230eed 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/AbstractDdbCommand.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/AbstractDdbCommand.java @@ -19,13 +19,13 @@ package org.apache.camel.component.aws.ddb; import java.util.Collection; import java.util.Map; -import org.apache.camel.Exchange; -import org.apache.camel.Message; - import com.amazonaws.services.dynamodbv2.AmazonDynamoDB; import com.amazonaws.services.dynamodbv2.model.AttributeValue; import com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue; +import org.apache.camel.Exchange; +import org.apache.camel.Message; + public abstract class AbstractDdbCommand { protected DdbConfiguration configuration; protected Exchange exchange; http://git-wip-us.apache.org/repos/asf/camel/blob/eb533c4d/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/BatchGetItemsCommand.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/BatchGetItemsCommand.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/BatchGetItemsCommand.java index c1513d1..74b340a 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/BatchGetItemsCommand.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/BatchGetItemsCommand.java @@ -18,13 +18,13 @@ package org.apache.camel.component.aws.ddb; import java.util.Map; -import org.apache.camel.Exchange; - import com.amazonaws.services.dynamodbv2.AmazonDynamoDB; import com.amazonaws.services.dynamodbv2.model.BatchGetItemRequest; import com.amazonaws.services.dynamodbv2.model.BatchGetItemResult; import com.amazonaws.services.dynamodbv2.model.KeysAndAttributes; +import org.apache.camel.Exchange; + public class BatchGetItemsCommand extends AbstractDdbCommand { public BatchGetItemsCommand(AmazonDynamoDB ddbClient, DdbConfiguration configuration, Exchange exchange) { super(ddbClient, configuration, exchange); http://git-wip-us.apache.org/repos/asf/camel/blob/eb533c4d/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/DdbConfiguration.java
[4/5] camel git commit: CAMEL-8572 - Upgrade aws sdk java version and add support for DynamoDB v2
CAMEL-8572 - Upgrade aws sdk java version and add support for DynamoDB v2 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/90d5906c Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/90d5906c Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/90d5906c Branch: refs/heads/master Commit: 90d5906c777d2612601613d13a2c9e47021891e0 Parents: 6a0d76b Author: ancosen anco...@gmail.com Authored: Thu Apr 2 22:19:30 2015 +0200 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Apr 3 10:01:17 2015 +0800 -- .../component/aws/ddb/AbstractDdbCommand.java | 13 ++- .../component/aws/ddb/BatchGetItemsCommand.java | 10 +- .../component/aws/ddb/DdbConfiguration.java | 3 +- .../camel/component/aws/ddb/DdbConstants.java | 11 ++- .../camel/component/aws/ddb/DdbEndpoint.java| 30 +++--- .../component/aws/ddb/DeleteItemCommand.java| 9 +- .../component/aws/ddb/DeleteTableCommand.java | 8 +- .../component/aws/ddb/DescribeTableCommand.java | 8 +- .../camel/component/aws/ddb/GetItemCommand.java | 8 +- .../camel/component/aws/ddb/PutItemCommand.java | 8 +- .../camel/component/aws/ddb/QueryCommand.java | 35 +++ .../camel/component/aws/ddb/ScanCommand.java| 12 +-- .../component/aws/ddb/UpdateItemCommand.java| 10 +- .../component/aws/ddb/UpdateTableCommand.java | 8 +- .../component/aws/ddb/AmazonDDBClientMock.java | 98 +++- .../aws/ddb/BatchGetItemsCommandTest.java | 24 ++--- .../aws/ddb/DeleteItemCommandTest.java | 12 +-- .../aws/ddb/DeleteTableCommandTest.java | 16 ++-- .../aws/ddb/DescribeTableCommandTest.java | 15 ++- .../component/aws/ddb/GetItemCommandTest.java | 11 ++- .../component/aws/ddb/PutItemCommandTest.java | 8 +- .../component/aws/ddb/QueryCommandTest.java | 42 + .../component/aws/ddb/ScanCommandTest.java | 20 ++-- .../aws/ddb/UpdateItemCommandTest.java | 16 ++-- .../DdbComponentIntegrationTest.java| 4 +- 25 files changed, 235 insertions(+), 204 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/90d5906c/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/AbstractDdbCommand.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/AbstractDdbCommand.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/AbstractDdbCommand.java index fd0c801..09c7075 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/AbstractDdbCommand.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/AbstractDdbCommand.java @@ -19,14 +19,13 @@ package org.apache.camel.component.aws.ddb; import java.util.Collection; import java.util.Map; -import com.amazonaws.services.dynamodb.AmazonDynamoDB; -import com.amazonaws.services.dynamodb.model.AttributeValue; -import com.amazonaws.services.dynamodb.model.ExpectedAttributeValue; -import com.amazonaws.services.dynamodb.model.Key; - import org.apache.camel.Exchange; import org.apache.camel.Message; +import com.amazonaws.services.dynamodbv2.AmazonDynamoDB; +import com.amazonaws.services.dynamodbv2.model.AttributeValue; +import com.amazonaws.services.dynamodbv2.model.ExpectedAttributeValue; + public abstract class AbstractDdbCommand { protected DdbConfiguration configuration; protected Exchange exchange; @@ -81,8 +80,8 @@ public abstract class AbstractDdbCommand { msg.setHeader(headerKey, value); } -protected Key determineKey() { -return exchange.getIn().getHeader(DdbConstants.KEY, Key.class); +protected MapString, AttributeValue determineKey() { +return exchange.getIn().getHeader(DdbConstants.KEY, Map.class); } @SuppressWarnings(unchecked) http://git-wip-us.apache.org/repos/asf/camel/blob/90d5906c/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/BatchGetItemsCommand.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/BatchGetItemsCommand.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/BatchGetItemsCommand.java index fc9d04c..c1513d1 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/BatchGetItemsCommand.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/BatchGetItemsCommand.java @@ -18,13 +18,13 @@ package org.apache.camel.component.aws.ddb; import java.util.Map; -import com.amazonaws.services.dynamodb.AmazonDynamoDB; -import com.amazonaws.services.dynamodb.model.BatchGetItemRequest; -import
[5/5] camel git commit: CAMEL-8592 Fixed the NPE in AbstractListAggregationStrategy if empty list
CAMEL-8592 Fixed the NPE in AbstractListAggregationStrategy if empty list Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/57f72cd9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/57f72cd9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/57f72cd9 Branch: refs/heads/master Commit: 57f72cd95435f83962443b2f8dc2f5aa2018f225 Parents: 7b4c712 Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Apr 3 10:00:21 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Apr 3 10:01:18 2015 +0800 -- .../AbstractListAggregationStrategy.java| 2 +- ...omListAggregationStrategyEmptySplitTest.java | 81 2 files changed, 82 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/57f72cd9/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java index ad2ec8e..d4ff93f 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java +++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java @@ -62,7 +62,7 @@ public abstract class AbstractListAggregationStrategyV implements CompletionAw @SuppressWarnings(unchecked) public void onCompletion(Exchange exchange) { -if (isStoreAsBodyOnCompletion()) { +if (exchange != null isStoreAsBodyOnCompletion()) { ListV list = (ListV) exchange.removeProperty(Exchange.GROUPED_EXCHANGE); if (list != null) { exchange.getIn().setBody(list); http://git-wip-us.apache.org/repos/asf/camel/blob/57f72cd9/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java b/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java new file mode 100644 index 000..2bf45ef --- /dev/null +++ b/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java @@ -0,0 +1,81 @@ +/** + * 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.processor.aggregator; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.camel.ContextTestSupport; +import org.apache.camel.Exchange; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.processor.aggregate.AbstractListAggregationStrategy; + +/** + * + */ +public class CustomListAggregationStrategyEmptySplitTest extends +ContextTestSupport { + +@SuppressWarnings(unchecked) +public void testCustomAggregationStrategy() throws Exception { +getMockEndpoint(mock:line).expectedBodiesReceived(); + +MockEndpoint result = getMockEndpoint(mock:result); +result.expectedMessageCount(1); +result.message(0).body().isInstanceOf(List.class); + +ListString body = new ArrayListString(); + +template.sendBody(direct:start, body); + +assertMockEndpointsSatisfied(); + +// the list will be stored as the message body by default +ListInteger numbers = result.getExchanges().get(0).getIn() +.getBody(List.class); +assertNotNull(numbers); +assertEquals(0, numbers.size()); +} + +@Override +protected RouteBuilder createRouteBuilder() throws Exception { +return new RouteBuilder() { +@Override +public void configure() throws Exception { +
[3/5] camel git commit: CAMEL-8572 Updated version of AWS Java SDK from 1.8.9.1 to 1.9.17
CAMEL-8572 Updated version of AWS Java SDK from 1.8.9.1 to 1.9.17 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6a0d76bf Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6a0d76bf Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6a0d76bf Branch: refs/heads/master Commit: 6a0d76bf59659939e6475d9e967ed57cff25a75c Parents: 04bedcc Author: ancosen anco...@gmail.com Authored: Thu Apr 2 22:02:13 2015 +0200 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Apr 3 10:01:17 2015 +0800 -- parent/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/6a0d76bf/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 5667741..8956c67 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -64,8 +64,8 @@ avro-bundle-version1.7.7_1/avro-bundle-version avro-ipc-bundle-version1.7.7_1/avro-ipc-bundle-version awaitility.version1.6.3/awaitility.version -aws-java-sdk-bundle-version1.8.9.1_1/aws-java-sdk-bundle-version -aws-java-sdk-version1.8.9.1/aws-java-sdk-version +aws-java-sdk-bundle-version1.9.17.1/aws-java-sdk-bundle-version +aws-java-sdk-version1.9.17/aws-java-sdk-version axiom-version1.2.14/axiom-version backport-util-concurrent-version3.1/backport-util-concurrent-version bcel-bundle-version5.2_4/bcel-bundle-version
[1/5] camel git commit: CAMEL-8593 Added the missing log parameter in JmsEndpoint.configureListenerContainer()
Repository: camel Updated Branches: refs/heads/master 04bedcc97 - 57f72cd95 CAMEL-8593 Added the missing log parameter in JmsEndpoint.configureListenerContainer() Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7b4c712a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7b4c712a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7b4c712a Branch: refs/heads/master Commit: 7b4c712a9de43737932f46e921358538401b7b8a Parents: eb533c4 Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Apr 3 09:47:21 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Apr 3 10:01:17 2015 +0800 -- .../main/java/org/apache/camel/component/jms/JmsEndpoint.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/7b4c712a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java -- diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java index b91c368..76238df 100644 --- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java +++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java @@ -187,10 +187,10 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy public void configureListenerContainer(AbstractMessageListenerContainer listenerContainer, JmsConsumer consumer) { if (destinationName != null) { listenerContainer.setDestinationName(destinationName); -log.debug(Using destinationName: {} on listenerContainer: , destinationName, listenerContainer); +log.debug(Using destinationName: {} on listenerContainer: {}, destinationName, listenerContainer); } else if (destination != null) { listenerContainer.setDestination(destination); -log.debug(Using destination: {} on listenerContainer: , destinationName, listenerContainer); +log.debug(Using destination: {} on listenerContainer: {}, destinationName, listenerContainer); } else { DestinationResolver resolver = getDestinationResolver(); if (resolver != null) { @@ -198,7 +198,7 @@ public class JmsEndpoint extends DefaultEndpoint implements HeaderFilterStrategy } else { throw new IllegalArgumentException(Neither destination, destinationName or destinationResolver are specified on this endpoint!); } -log.debug(Using destinationResolver: {} on listenerContainer: , resolver, listenerContainer); +log.debug(Using destinationResolver: {} on listenerContainer: {}, resolver, listenerContainer); } listenerContainer.setPubSubDomain(pubSubDomain);
svn commit: r946143 - in /websites/production/camel/content: book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache json.html
Author: buildbot Date: Fri Apr 3 01:20:18 2015 New Revision: 946143 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-dataformat-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/json.html Modified: websites/production/camel/content/book-dataformat-appendix.html == --- websites/production/camel/content/book-dataformat-appendix.html (original) +++ websites/production/camel/content/book-dataformat-appendix.html Fri Apr 3 01:20:18 2015 @@ -945,12 +945,12 @@ df.disableFeature(DeserializationFeature df.disableFeature(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES);]]/script /div/divh3 id=BookDataFormatAppendix-FormattedJSONmarshallingFormatted JSON marshalling/h3pstrongAvailable as of Camel 2.16/strong/ppUsing the codeprettyPrint/code option#160;one can output a well formatted JSON while marshalling:/pdiv class=code panel pdl style=border-width: 1px;div class=codeContent panelContent pdl script class=theme: Default; brush: java; gutter: false type=syntaxhighlighter![CDATA[ lt;dataFormatsgt; - lt;json id=âjson1â prettyPrint=âtrueâ/gt; - lt;json id=âjson2â prettyPrint=âtrueâ library=âJacksonquot;/gt; - lt;json id=âjson3â prettyPrint=âtrueâ library=quot;Gsonquot;/gt; + lt;json id=quot;xstreamquot; prettyPrint=quot;truequot;/gt; + lt;json id=quot;jacksonquot; prettyPrint=quot;truequot; library=quot;Jacksonquot;/gt; + lt;json id=quot;gsonquot; prettyPrint=quot;truequot; library=quot;Gsonquot;/gt; lt;/dataFormatsgt;]]/script /div/divpspan style=line-height: 1.5625;And in Java DSL:/span/pdiv class=code panel pdl style=border-width: 1px;div class=codeContent panelContent pdl -script class=theme: Default; brush: java; gutter: false type=syntaxhighlighter![CDATA[from(âdirect:inPrettyquot;).marshal().json(true); +script class=theme: Default; brush: java; gutter: false type=syntaxhighlighter![CDATA[from(quot;direct:inPrettyquot;).marshal().json(true); Â from(quot;direct:inPrettyquot;).marshal().json(JsonLibrary.Jackson, true); Â @@ -976,7 +976,7 @@ from(quot;direct:inPrettyquot;).marsha lt;versiongt;2.10.0lt;/versiongt; lt;/dependencygt; ]]/script -/div/divp#160;/p +/div/div The Zip a shape=rect href=data-format.htmlData Format/a is a message compression and de-compression format. Messages marshalled using Zip compression can be unmarshalled using Zip decompression just prior to being consumed at the endpoint. The compression capability is quite useful when you deal with large XML and Text based payloads. It facilitates more optimal use of network bandwidth while incurring a small cost in order to compress and decompress payloads at the endpoint. div class=aui-message hint shadowed information-macro Modified: websites/production/camel/content/book-in-one-page.html == --- websites/production/camel/content/book-in-one-page.html (original) +++ websites/production/camel/content/book-in-one-page.html Fri Apr 3 01:20:18 2015 @@ -4126,11 +4126,11 @@ While not actual tutorials you might fin /div /div h2 id=BookInOnePage-PrefacePreface/h2pThis tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a a shape=rect class=external-link href=http://www.springramework.org; rel=nofollowSpring/a service. The route works in a synchronous fashion returning a response to the client./ppstyle type=text/css/*![CDATA[*/ -div.rbtoc1428020354111 {padding: 0px;} -div.rbtoc1428020354111 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1428020354111 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1428023894367 {padding: 0px;} +div.rbtoc1428023894367 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1428023894367 li {margin-left: 0px;padding-left: 0px;} -/*]]*//style/pdiv class=toc-macro rbtoc1428020354111 +/*]]*//style/pdiv class=toc-macro rbtoc1428023894367 ul class=toc-indentationlia shape=rect href=#Tutorial-JmsRemoting-TutorialonSpringRemotingwithJMSTutorial on Spring Remoting with JMS/a/lilia shape=rect href=#Tutorial-JmsRemoting-PrefacePreface/a/lilia shape=rect href=#Tutorial-JmsRemoting-PrerequisitesPrerequisites/a/lilia shape=rect href=#Tutorial-JmsRemoting-DistributionDistribution/a/lilia shape=rect href=#Tutorial-JmsRemoting-AboutAbout/a/lilia shape=rect href=#Tutorial-JmsRemoting-CreatetheCamelProjectCreate the Camel Project/a ul class=toc-indentationlia shape=rect href=#Tutorial-JmsRemoting-UpdatethePOMwithDependenciesUpdate the POM with Dependencies/a/li/ul /lilia shape=rect href=#Tutorial-JmsRemoting-WritingtheServerWriting the Server/a @@ -6316,11 +6316,11 @@ So
[2/2] camel git commit: CAMEL-7833 Added convenience method ReactiveCamel.to(...). Changed test to highlight the idea of creating routes with RX.
CAMEL-7833 Added convenience method ReactiveCamel.to(...). Changed test to highlight the idea of creating routes with RX. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3c3b0edd Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3c3b0edd Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3c3b0edd Branch: refs/heads/master Commit: 3c3b0edddfe555e1bfd247258c4f1aa4806d3b38 Parents: c67392f Author: Jyrki Ruuskanen yur...@kotikone.fi Authored: Thu Apr 2 22:38:55 2015 +0300 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Apr 3 09:20:31 2015 +0800 -- .../java/org/apache/camel/rx/ReactiveCamel.java| 14 ++ .../org/apache/camel/rx/CamelOperatorTest.java | 17 + 2 files changed, 27 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3c3b0edd/components/camel-rx/src/main/java/org/apache/camel/rx/ReactiveCamel.java -- diff --git a/components/camel-rx/src/main/java/org/apache/camel/rx/ReactiveCamel.java b/components/camel-rx/src/main/java/org/apache/camel/rx/ReactiveCamel.java index 368cb53..678c4e8 100644 --- a/components/camel-rx/src/main/java/org/apache/camel/rx/ReactiveCamel.java +++ b/components/camel-rx/src/main/java/org/apache/camel/rx/ReactiveCamel.java @@ -92,6 +92,20 @@ public class ReactiveCamel { } } +/** + * Convenience method for creating CamelOperator instances + */ +public CamelOperator to(String uri) throws Exception { +return new CamelOperator(camelContext, uri); +} + +/** + * Convenience method for creating CamelOperator instances + */ +public CamelOperator to(Endpoint endpoint) throws Exception { +return new CamelOperator(endpoint); +} + public CamelContext getCamelContext() { return camelContext; } http://git-wip-us.apache.org/repos/asf/camel/blob/3c3b0edd/components/camel-rx/src/test/java/org/apache/camel/rx/CamelOperatorTest.java -- diff --git a/components/camel-rx/src/test/java/org/apache/camel/rx/CamelOperatorTest.java b/components/camel-rx/src/test/java/org/apache/camel/rx/CamelOperatorTest.java index 8667e3b..f0bacc3 100644 --- a/components/camel-rx/src/test/java/org/apache/camel/rx/CamelOperatorTest.java +++ b/components/camel-rx/src/test/java/org/apache/camel/rx/CamelOperatorTest.java @@ -24,6 +24,8 @@ import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import rx.Observable; +import rx.Subscription; +import rx.observables.ConnectableObservable; /** */ @@ -39,12 +41,16 @@ public class CamelOperatorTest extends RxTestSupport { mockEndpoint2.expectedMessageCount(1); mockEndpoint3.expectedMessageCount(1); -ObservableMessage result = reactiveCamel.toObservable(direct:start) -.lift(new CamelOperator(camelContext, mock:results1)) +ConnectableObservableMessage route = reactiveCamel.toObservable(direct:start) +.lift(new CamelOperator(mockEndpoint1)) .lift(new CamelOperator(camelContext, log:foo)) .debounce(1, TimeUnit.SECONDS) -.lift(new CamelOperator(mockEndpoint2)); -reactiveCamel.sendTo(result, mock:results3); +.lift(reactiveCamel.to(mockEndpoint2)) +.lift(reactiveCamel.to(mock:results3)) +.publish(); + +// Start the route +Subscription routeSubscription = route.connect(); // Send two test messages producerTemplate.sendBody(direct:start, test/); @@ -53,5 +59,8 @@ public class CamelOperatorTest extends RxTestSupport { mockEndpoint1.assertIsSatisfied(); mockEndpoint2.assertIsSatisfied(); mockEndpoint3.assertIsSatisfied(); + +// Stop the route +routeSubscription.unsubscribe(); } }
[1/2] camel git commit: Fixed the CS error of camel-gson and camel-xstream
Repository: camel Updated Branches: refs/heads/master c67392fe1 - c91c41d1a Fixed the CS error of camel-gson and camel-xstream Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c91c41d1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c91c41d1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c91c41d1 Branch: refs/heads/master Commit: c91c41d1af2f05ae9827cc5960129e422860d480 Parents: 3c3b0ed Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Apr 3 09:20:00 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Apr 3 09:20:31 2015 +0800 -- .../component/gson/SpringGsonJsonDataFormatTest.java | 6 +++--- .../dataformat/xstream/MarshalDomainObjectJSONTest.java | 10 +- 2 files changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c91c41d1/components/camel-gson/src/test/java/org/apache/camel/component/gson/SpringGsonJsonDataFormatTest.java -- diff --git a/components/camel-gson/src/test/java/org/apache/camel/component/gson/SpringGsonJsonDataFormatTest.java b/components/camel-gson/src/test/java/org/apache/camel/component/gson/SpringGsonJsonDataFormatTest.java index cece6fd..751f99b 100644 --- a/components/camel-gson/src/test/java/org/apache/camel/component/gson/SpringGsonJsonDataFormatTest.java +++ b/components/camel-gson/src/test/java/org/apache/camel/component/gson/SpringGsonJsonDataFormatTest.java @@ -58,9 +58,9 @@ public class SpringGsonJsonDataFormatTest extends CamelSpringTestSupport { Object marshalled = template.requestBody(direct:inPretty, in); String marshalledAsString = context.getTypeConverter().convertTo(String.class, marshalled); -String expected = {\n + -\name\: \Camel\ + - \n}; +String expected = {\n + + \name\: \Camel\ + + \n}; assertEquals(expected, marshalledAsString); template.sendBody(direct:backPretty, marshalled); http://git-wip-us.apache.org/repos/asf/camel/blob/c91c41d1/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/MarshalDomainObjectJSONTest.java -- diff --git a/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/MarshalDomainObjectJSONTest.java b/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/MarshalDomainObjectJSONTest.java index 6c3cdac..55fbdf0 100644 --- a/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/MarshalDomainObjectJSONTest.java +++ b/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/MarshalDomainObjectJSONTest.java @@ -37,11 +37,11 @@ public class MarshalDomainObjectJSONTest extends MarshalDomainObjectTest { Object marshalled = template.requestBody(direct:inPretty, order); String marshalledAsString = context.getTypeConverter().convertTo(String.class, marshalled); // the line-separator used by JsonWriter is \n, even on windows -String expected = {\org.apache.camel.dataformat.xstream.PurchaseOrder\: {\n + -\name\: \pretty printed Camel\,\n+ -\price\: 7.91,\n + -\amount\: 1.0\n + - }}; +String expected = {\org.apache.camel.dataformat.xstream.PurchaseOrder\: {\n + + \name\: \pretty printed Camel\,\n + + \price\: 7.91,\n + + \amount\: 1.0\n + + }}; assertEquals(expected, marshalledAsString); template.sendBody(direct:backPretty, marshalled);
[2/4] camel git commit: CAMEL-8592 Fixed the NPE in AbstractListAggregationStrategy if empty list
CAMEL-8592 Fixed the NPE in AbstractListAggregationStrategy if empty list Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fc4aa78f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fc4aa78f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fc4aa78f Branch: refs/heads/camel-2.15.x Commit: fc4aa78f4d982c34f5c1656355507ac323989954 Parents: 910e149 Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Apr 3 10:00:21 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Apr 3 10:14:05 2015 +0800 -- .../AbstractListAggregationStrategy.java| 2 +- ...omListAggregationStrategyEmptySplitTest.java | 81 2 files changed, 82 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/fc4aa78f/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java index ad2ec8e..d4ff93f 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java +++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java @@ -62,7 +62,7 @@ public abstract class AbstractListAggregationStrategyV implements CompletionAw @SuppressWarnings(unchecked) public void onCompletion(Exchange exchange) { -if (isStoreAsBodyOnCompletion()) { +if (exchange != null isStoreAsBodyOnCompletion()) { ListV list = (ListV) exchange.removeProperty(Exchange.GROUPED_EXCHANGE); if (list != null) { exchange.getIn().setBody(list); http://git-wip-us.apache.org/repos/asf/camel/blob/fc4aa78f/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java b/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java new file mode 100644 index 000..2bf45ef --- /dev/null +++ b/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java @@ -0,0 +1,81 @@ +/** + * 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.processor.aggregator; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.camel.ContextTestSupport; +import org.apache.camel.Exchange; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.processor.aggregate.AbstractListAggregationStrategy; + +/** + * + */ +public class CustomListAggregationStrategyEmptySplitTest extends +ContextTestSupport { + +@SuppressWarnings(unchecked) +public void testCustomAggregationStrategy() throws Exception { +getMockEndpoint(mock:line).expectedBodiesReceived(); + +MockEndpoint result = getMockEndpoint(mock:result); +result.expectedMessageCount(1); +result.message(0).body().isInstanceOf(List.class); + +ListString body = new ArrayListString(); + +template.sendBody(direct:start, body); + +assertMockEndpointsSatisfied(); + +// the list will be stored as the message body by default +ListInteger numbers = result.getExchanges().get(0).getIn() +.getBody(List.class); +assertNotNull(numbers); +assertEquals(0, numbers.size()); +} + +@Override +protected RouteBuilder createRouteBuilder() throws Exception { +return new RouteBuilder() { +@Override +public void configure() throws Exception { +
[4/4] camel git commit: CAMEL-8592 Fixed the NPE in AbstractListAggregationStrategy if empty list
CAMEL-8592 Fixed the NPE in AbstractListAggregationStrategy if empty list Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/595d1c53 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/595d1c53 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/595d1c53 Branch: refs/heads/camel-2.14.x Commit: 595d1c534c4eece5884b00d281e80f2462ec0dc1 Parents: 7663ac0 Author: Willem Jiang willem.ji...@gmail.com Authored: Fri Apr 3 10:00:21 2015 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Fri Apr 3 10:14:40 2015 +0800 -- .../AbstractListAggregationStrategy.java| 2 +- ...omListAggregationStrategyEmptySplitTest.java | 81 2 files changed, 82 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/595d1c53/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java index ad2ec8e..d4ff93f 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java +++ b/camel-core/src/main/java/org/apache/camel/processor/aggregate/AbstractListAggregationStrategy.java @@ -62,7 +62,7 @@ public abstract class AbstractListAggregationStrategyV implements CompletionAw @SuppressWarnings(unchecked) public void onCompletion(Exchange exchange) { -if (isStoreAsBodyOnCompletion()) { +if (exchange != null isStoreAsBodyOnCompletion()) { ListV list = (ListV) exchange.removeProperty(Exchange.GROUPED_EXCHANGE); if (list != null) { exchange.getIn().setBody(list); http://git-wip-us.apache.org/repos/asf/camel/blob/595d1c53/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java b/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java new file mode 100644 index 000..2bf45ef --- /dev/null +++ b/camel-core/src/test/java/org/apache/camel/processor/aggregator/CustomListAggregationStrategyEmptySplitTest.java @@ -0,0 +1,81 @@ +/** + * 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.processor.aggregator; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.camel.ContextTestSupport; +import org.apache.camel.Exchange; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.processor.aggregate.AbstractListAggregationStrategy; + +/** + * + */ +public class CustomListAggregationStrategyEmptySplitTest extends +ContextTestSupport { + +@SuppressWarnings(unchecked) +public void testCustomAggregationStrategy() throws Exception { +getMockEndpoint(mock:line).expectedBodiesReceived(); + +MockEndpoint result = getMockEndpoint(mock:result); +result.expectedMessageCount(1); +result.message(0).body().isInstanceOf(List.class); + +ListString body = new ArrayListString(); + +template.sendBody(direct:start, body); + +assertMockEndpointsSatisfied(); + +// the list will be stored as the message body by default +ListInteger numbers = result.getExchanges().get(0).getIn() +.getBody(List.class); +assertNotNull(numbers); +assertEquals(0, numbers.size()); +} + +@Override +protected RouteBuilder createRouteBuilder() throws Exception { +return new RouteBuilder() { +@Override +public void configure() throws Exception { +
[3/3] camel git commit: Upgrade netty and vertx
Upgrade netty and vertx Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/246b12bc Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/246b12bc Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/246b12bc Branch: refs/heads/camel-2.15.x Commit: 246b12bc5c9cc1e3f922ab40226a2c6969009c8a Parents: 33ce2e8 Author: Claus Ibsen davscl...@apache.org Authored: Thu Apr 2 20:58:50 2015 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Apr 2 20:58:50 2015 +0200 -- parent/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/246b12bc/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 3fd42ea..5675645 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -355,7 +355,7 @@ mybatis-version3.2.8/mybatis-version neethi-bundle-version3.0.1/neethi-bundle-version netty3-version3.9.6.Final/netty3-version -netty-version4.0.26.Final/netty-version +netty-version4.0.27.Final/netty-version noggit-bundle-version0.5_1/noggit-bundle-version !-- should be in-sync with deltaspike -- openwebbeans-version1.2.0/openwebbeans-version @@ -477,7 +477,7 @@ velocity-bundle-version1.7_6/velocity-bundle-version velocity-tools-version2.0/velocity-tools-version velocity-version1.7/velocity-version -vertx-version2.1.4/vertx-version +vertx-version2.1.5/vertx-version vysper-version0.7/vysper-version weld2-version2.2.4.Final/weld2-version werken-xpath-bundle-version0.9.4_5/werken-xpath-bundle-version
[2/3] camel git commit: Upgrade vertx
Upgrade vertx Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2bd8de30 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2bd8de30 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2bd8de30 Branch: refs/heads/master Commit: 2bd8de303de858b1ec52f8a982b04eb95c532f91 Parents: 33b708b Author: Claus Ibsen davscl...@apache.org Authored: Thu Apr 2 20:57:34 2015 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Apr 2 20:57:34 2015 +0200 -- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/2bd8de30/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 03420ff..f8e6231 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -479,7 +479,7 @@ velocity-bundle-version1.7_6/velocity-bundle-version velocity-tools-version2.0/velocity-tools-version velocity-version1.7/velocity-version -vertx-version2.1.4/vertx-version +vertx-version2.1.5/vertx-version vysper-version0.7/vysper-version weld2-version2.2.4.Final/weld2-version werken-xpath-bundle-version0.9.4_5/werken-xpath-bundle-version
[1/3] camel git commit: Upgrade netty4
Repository: camel Updated Branches: refs/heads/camel-2.15.x 33ce2e80d - 246b12bc5 refs/heads/master 81e77504f - 2bd8de303 Upgrade netty4 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/33b708b4 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/33b708b4 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/33b708b4 Branch: refs/heads/master Commit: 33b708b451f13d41bde8d9e3005cb8c811933ad9 Parents: 81e7750 Author: Claus Ibsen davscl...@apache.org Authored: Thu Apr 2 20:56:35 2015 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Thu Apr 2 20:56:35 2015 +0200 -- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/33b708b4/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 9af5909..03420ff 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -356,7 +356,7 @@ mybatis-version3.2.8/mybatis-version neethi-bundle-version3.0.1/neethi-bundle-version netty3-version3.10.1.Final/netty3-version -netty-version4.0.26.Final/netty-version +netty-version4.0.27.Final/netty-version noggit-bundle-version0.5_1/noggit-bundle-version !-- should be in-sync with deltaspike -- openwebbeans-version1.2.0/openwebbeans-version
camel git commit: There's less to type if we reuse the LS constant instead of the System.lineSeparator() utility.
Repository: camel Updated Branches: refs/heads/master 1e923eca2 - a3f89218b There's less to type if we reuse the LS constant instead of the System.lineSeparator() utility. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a3f89218 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a3f89218 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a3f89218 Branch: refs/heads/master Commit: a3f89218b3dd4303f5d94e87de7ed5858bc2e6d4 Parents: 1e923ec Author: Babak Vahdat bvah...@apache.org Authored: Thu Apr 2 20:33:11 2015 +0200 Committer: Babak Vahdat bvah...@apache.org Committed: Thu Apr 2 20:33:11 2015 +0200 -- .../dataformat/csv/CsvMarshalAutogenColumnsSpringTest.java | 4 ++-- .../dataformat/csv/CsvMarshalPipeDelimiterSpringTest.java | 2 +- .../camel/dataformat/csv/CsvMarshalPipeDelimiterTest.java | 2 +- .../apache/camel/dataformat/csv/CsvUnmarshalStreamTest.java| 6 +++--- .../org/apache/camel/component/jackson/JacksonMarshalTest.java | 2 +- .../component/jackson/SpringJacksonJsonDataFormatTest.java | 2 +- .../component/velocity/VelocityBodyAsDomainObjectTest.java | 3 +-- 7 files changed, 10 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a3f89218/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest.java -- diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest.java b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest.java index efa639a..4b4b6a3 100644 --- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest.java +++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalAutogenColumnsSpringTest.java @@ -48,7 +48,7 @@ public class CsvMarshalAutogenColumnsSpringTest extends CamelSpringTestSupport { result.assertIsSatisfied(); String body = result.getReceivedExchanges().get(0).getIn().getBody(String.class); -String[] lines = body.split(System.lineSeparator()); +String[] lines = body.split(LS); assertEquals(2, lines.length); assertEquals(Camel in Action, lines[0].trim()); assertEquals(ActiveMQ in Action, lines[1].trim()); @@ -63,7 +63,7 @@ public class CsvMarshalAutogenColumnsSpringTest extends CamelSpringTestSupport { result2.assertIsSatisfied(); String body = result2.getReceivedExchanges().get(0).getIn().getBody(String.class); -String[] lines = body.split(System.lineSeparator()); +String[] lines = body.split(LS); assertEquals(2, lines.length); assertEquals(123|1, lines[0].trim()); assertEquals(124|2, lines[1].trim()); http://git-wip-us.apache.org/repos/asf/camel/blob/a3f89218/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest.java -- diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest.java b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest.java index fba0673..1442f82 100644 --- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest.java +++ b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterSpringTest.java @@ -44,7 +44,7 @@ public class CsvMarshalPipeDelimiterSpringTest extends CamelSpringTestSupport { assertMockEndpointsSatisfied(); String body = result.getReceivedExchanges().get(0).getIn().getBody(String.class); -String[] lines = body.split(System.lineSeparator()); +String[] lines = body.split(LS); assertEquals(2, lines.length); assertEquals(123|Camel in Action|1, lines[0].trim()); assertEquals(124|ActiveMQ in Action|2, lines[1].trim()); http://git-wip-us.apache.org/repos/asf/camel/blob/a3f89218/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterTest.java -- diff --git a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterTest.java b/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterTest.java index eafbfa9..f117f79 100644 --- a/components/camel-csv/src/test/java/org/apache/camel/dataformat/csv/CsvMarshalPipeDelimiterTest.java +++
camel git commit: Upgrade to Jettison 1.3.7
Repository: camel Updated Branches: refs/heads/master a3f89218b - 408e27fbe Upgrade to Jettison 1.3.7 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/408e27fb Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/408e27fb Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/408e27fb Branch: refs/heads/master Commit: 408e27fbeb5a5e8884128e6e21e3426ca3931538 Parents: a3f8921 Author: Babak Vahdat bvah...@apache.org Authored: Thu Apr 2 20:40:10 2015 +0200 Committer: Babak Vahdat bvah...@apache.org Committed: Thu Apr 2 20:40:10 2015 +0200 -- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/408e27fb/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 80b0174..9af5909 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -261,7 +261,7 @@ jetty9-version9.2.9.v20150224/jetty9-version jetty-version${jetty8-version}/jetty-version jetty-runner-groupIdorg.mortbay.jetty/jetty-runner-groupId -jettison-version1.3.6/jettison-version +jettison-version1.3.7/jettison-version jexcelapi-bundle-version2.4.2_4/jexcelapi-bundle-version jexcelapi-version2.4.2/jexcelapi-version jgroups-version3.4.1.Final/jgroups-version
camel git commit: CAMEL-7877: Polish Javadoc.
Repository: camel Updated Branches: refs/heads/master 408e27fbe - 81e77504f CAMEL-7877: Polish Javadoc. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/81e77504 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/81e77504 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/81e77504 Branch: refs/heads/master Commit: 81e77504fba9f54b14be9b08e8051ebb91b61ebe Parents: 408e27f Author: Babak Vahdat bvah...@apache.org Authored: Thu Apr 2 20:46:58 2015 +0200 Committer: Babak Vahdat bvah...@apache.org Committed: Thu Apr 2 20:46:58 2015 +0200 -- .../java/org/apache/camel/builder/DataFormatClause.java | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/81e77504/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java -- diff --git a/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java b/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java index 1a446c3..7887b14 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java +++ b/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java @@ -361,9 +361,9 @@ public class DataFormatClauseT extends ProcessorDefinition? { } /** - * Uses the JSON data format using the XStream json library with pretty-print option on or off + * Uses the JSON data format using the XStream json library turning pretty printing on or off * - * @param prettyPrint turn the pretty-print option on or off + * @param prettyPrint turn pretty printing on or off */ public T json(boolean prettyPrint) { JsonDataFormat json = new JsonDataFormat(); @@ -384,7 +384,7 @@ public class DataFormatClauseT extends ProcessorDefinition? { * Uses the JSON data format * * @param library the json library to use - * @param prettyPrint turn the pretty-print option on or off + * @param prettyPrint turn pretty printing on or off */ public T json(JsonLibrary library, boolean prettyPrint) { JsonDataFormat json = new JsonDataFormat(library); @@ -409,7 +409,7 @@ public class DataFormatClauseT extends ProcessorDefinition? { * * @param type the json type to use * @param unmarshalType unmarshal type for json jackson type - * @param prettyPrint turn the pretty-print option on or off + * @param prettyPrint turn pretty printing on or off */ public T json(JsonLibrary type, Class? unmarshalType, boolean prettyPrint) { JsonDataFormat json = new JsonDataFormat(type); @@ -436,7 +436,7 @@ public class DataFormatClauseT extends ProcessorDefinition? { * * @param unmarshalType unmarshal type for json jackson type * @param jsonView the view type for json jackson type - * @param prettyPrint turn the pretty-print option on or off + * @param prettyPrint turn pretty printing on or off */ public T json(Class? unmarshalType, Class? jsonView, boolean prettyPrint) { JsonDataFormat json = new JsonDataFormat(JsonLibrary.Jackson); @@ -467,7 +467,7 @@ public class DataFormatClauseT extends ProcessorDefinition? { * @param unmarshalType unmarshal type for json jackson type * @param jsonView the view type for json jackson type * @param include include such as ttALWAYS/tt, ttNON_NULL/tt, etc. - * @param prettyPrint turn the pretty-print option on or off + * @param prettyPrint turn pretty printing on or off */ public T json(Class? unmarshalType, Class? jsonView, String include, boolean prettyPrint) { JsonDataFormat json = new JsonDataFormat(JsonLibrary.Jackson);
camel git commit: CAMEL-7877: support the prettyPrint option by all the supported JSON libraries, that's XStream, Jackson and GSon.
Repository: camel Updated Branches: refs/heads/master c8d23d327 - 1e923eca2 CAMEL-7877: support the prettyPrint option by all the supported JSON libraries, that's XStream, Jackson and GSon. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1e923eca Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1e923eca Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1e923eca Branch: refs/heads/master Commit: 1e923eca2ce118be090231de7454b8793d1e5e54 Parents: c8d23d3 Author: Babak Vahdat bvah...@apache.org Authored: Thu Apr 2 20:03:33 2015 +0200 Committer: Babak Vahdat bvah...@apache.org Committed: Thu Apr 2 20:03:33 2015 +0200 -- .../apache/camel/builder/DataFormatClause.java | 69 .../camel/component/gson/GsonDataFormat.java| 44 +++-- .../gson/SpringGsonJsonDataFormatTest.java | 22 +++ .../gson/SpringGsonJsonDataFormatTest.xml | 12 .../jackson/JacksonJsonDataFormatTest.java | 8 +-- .../component/jackson/JacksonMarshalTest.java | 4 +- .../SpringJacksonJsonDataFormatTest.java| 2 +- .../jackson/SpringJacksonJsonDataFormatTest.xml | 2 +- .../dataformat/xstream/JsonDataFormat.java | 21 ++ .../dataformat/xstream/XStreamDataFormat.java | 2 +- .../xstream/MarshalDomainObjectJSONTest.java| 34 +- .../XStreamDataFormatDriverConfigTest.java | 2 +- .../SpringMarshalDomainObjectJSONTest.xml | 12 13 files changed, 215 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/1e923eca/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java -- diff --git a/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java b/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java index c0857a9..1a446c3 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java +++ b/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java @@ -361,6 +361,17 @@ public class DataFormatClauseT extends ProcessorDefinition? { } /** + * Uses the JSON data format using the XStream json library with pretty-print option on or off + * + * @param prettyPrint turn the pretty-print option on or off + */ +public T json(boolean prettyPrint) { +JsonDataFormat json = new JsonDataFormat(); +json.setPrettyPrint(prettyPrint); +return dataFormat(json); +} + +/** * Uses the JSON data format * * @param library the json library to use @@ -372,6 +383,18 @@ public class DataFormatClauseT extends ProcessorDefinition? { /** * Uses the JSON data format * + * @param library the json library to use + * @param prettyPrint turn the pretty-print option on or off + */ +public T json(JsonLibrary library, boolean prettyPrint) { +JsonDataFormat json = new JsonDataFormat(library); +json.setPrettyPrint(prettyPrint); +return dataFormat(json); +} + +/** + * Uses the JSON data format + * * @param type the json type to use * @param unmarshalType unmarshal type for json jackson type */ @@ -382,6 +405,20 @@ public class DataFormatClauseT extends ProcessorDefinition? { } /** + * Uses the JSON data format + * + * @param type the json type to use + * @param unmarshalType unmarshal type for json jackson type + * @param prettyPrint turn the pretty-print option on or off + */ +public T json(JsonLibrary type, Class? unmarshalType, boolean prettyPrint) { +JsonDataFormat json = new JsonDataFormat(type); +json.setUnmarshalType(unmarshalType); +json.setPrettyPrint(prettyPrint); +return dataFormat(json); +} + +/** * Uses the Jackson JSON data format * * @param unmarshalType unmarshal type for json jackson type @@ -399,6 +436,21 @@ public class DataFormatClauseT extends ProcessorDefinition? { * * @param unmarshalType unmarshal type for json jackson type * @param jsonView the view type for json jackson type + * @param prettyPrint turn the pretty-print option on or off + */ +public T json(Class? unmarshalType, Class? jsonView, boolean prettyPrint) { +JsonDataFormat json = new JsonDataFormat(JsonLibrary.Jackson); +json.setUnmarshalType(unmarshalType); +json.setJsonView(jsonView); +json.setPrettyPrint(prettyPrint); +return dataFormat(json); +} + +/** + * Uses the Jackson JSON data format + * + * @param unmarshalType unmarshal type for json jackson type + * @param jsonView the view type for json