[CONF] Apache Camel Crypto
Crypto Page edited by Jakub Korab Comment: Added link to list of algorithms available in Java 7 Changes (1) ... {snippet:id=algorithm|lang=java|url="" A list of the available alrorithms in Java 7 is available via [IBMs Security Information for Java 7|http://pic.dhe.ibm.com/infocenter/java7sdk/v7r0/index.jsp?topic=%2Fcom.ibm.java.security.component.doc%2Fsecurity-component%2FJceDocs%2Fapi_standardnames.html] guide. h3. Specifying an Initialization Vector ... Full Content Crypto Available as of Camel 2.3 PGP Available as of Camel 2.9 The Crypto Data Format integrates the Java Cryptographic Extension into Camel, allowing simple and flexible encryption and decryption of messages using Camel's familiar marshall and unmarshal formatting mechanism. It assumes marshalling to mean encryption to cyphertext and unmarshalling to mean decryption back to the original plaintext. Options Name Type Default Description algorithm String DES/CBC/PKCS5Padding The JCE algorithm name indicating the cryptographic algorithm that will be used. algorithmParamterSpec AlgorithmParameterSpec null A JCE AlgorithmParameterSpec used to initialize the Cipher. bufferSize Integer 2048 the size of the buffer used in the signature process. cryptoProvider String null The name of the JCE Security Provider that should be used. initializationVector byte[] null A byte array containing the Initialization Vector that will be used to initialize the Cipher. inline boolean false Flag indicating that the configured IV should be inlined into the encrypted data stream. macAlgorithm String null The JCE algorithm name indicating the Message Authentication algorithm. shouldAppendHMAC boolean null Flag indicating that a Message Authentication Code should be calculated and appended to the encrypted data. Basic Usage At its most basic all that is required to encrypt/decrypt an exchange is a shared secret key. If one or more instances of the Crypto data format are configured with this key the format can be used to encrypt the payload in one route (or part of one) and decrypted in another. For example, using the Java DSL as follows: In Spring the dataformat is configured first and then used in routes camelContext id="camel" xmlns="http://camel.apache.org/schema/spring" dataFormats crypto id="basic" algorithm="DES" keyRef="desKey" / /dataFormats ... route from uri="direct:basic-encryption" / marshal ref="basic" / to uri="mock:encrypted" / unmarshal ref="basic" / to uri="mock:unencrypted" / /route /camelContext Specifying the Encryption Algorithm Changing the algorithm is a matter of supplying the JCE algorithm name. If you change the algorithm you will need to use a compatible key. A list of the available alrorithms in Java 7 is available via IBM's Security Information for Java 7 guide. Specifying an Initialization Vector Some crypto algorithms, particularly block algorithms, require configuration with an initial block of data known as an Initialization Vector. In the JCE this is passed as an AlgorithmParameterSpec when the Cipher is initialized. To use such a vector with the CryptoDataFormat you can configure it with a byte[] containing the required data e.g. or with spring, suppling a reference to a byte[] The same vector is required in both the encryption and decryption phases. As it is not necessary to keep the IV a secret, the DataFormat allows for it to be inlined into the encrypted data and subsequently read out in the decryption phase to initialize the Cipher. To inline the IV set the /oinline flag. or with spring. For more information of the use of Initialization Vectors, consult http://en.wikipedia.org/wiki/Initialization_vector http://www.herongyang.com/Cryptography/ http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation Hashed Message Authentication Codes (HMAC) To avoid attacks against the encrypted data while it is in transit the CryptoDataFormat can also calculate a Message Authentication Code for the encrypted exchange contents based on a configurable MAC algorithm. The calculated HMAC is appended to the stream after encryption. It is separated from the stream in the decryption phase. The MAC is recalculated and verified against the transmitted version to insure nothing was tampered with in transit.For more information on Message Authentication Codes see http://en.wikipedia.org/wiki/HMAC or with spring. By default the HMAC is calculated using the HmacSHA1 mac algorithm though this can be easily changed by supplying a different algorithm name. See here
git commit: CAMEL-6751 Upgaded to Jetty 8.1.x and Sevelt API 3.0
Updated Branches: refs/heads/master 961413cca - d9dd9ecc5 CAMEL-6751 Upgaded to Jetty 8.1.x and Sevelt API 3.0 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d9dd9ecc Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d9dd9ecc Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d9dd9ecc Branch: refs/heads/master Commit: d9dd9ecc5c28ebcf5ed53ef06ec073896a81bf34 Parents: 961413c Author: Willem Jiang ningji...@apache.org Authored: Mon Sep 16 15:53:51 2013 +0800 Committer: Willem Jiang ningji...@apache.org Committed: Mon Sep 16 15:53:51 2013 +0800 -- components/camel-http/pom.xml| 2 +- components/camel-http4/pom.xml | 2 +- components/camel-jetty/pom.xml | 23 ++- components/camel-servlet/pom.xml | 8 +--- parent/pom.xml | 12 +--- 5 files changed, 26 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d9dd9ecc/components/camel-http/pom.xml -- diff --git a/components/camel-http/pom.xml b/components/camel-http/pom.xml index 6071b90..2e9641f 100644 --- a/components/camel-http/pom.xml +++ b/components/camel-http/pom.xml @@ -45,7 +45,7 @@ /dependency dependency groupIdorg.apache.geronimo.specs/groupId - artifactIdgeronimo-servlet_2.5_spec/artifactId + artifactIdgeronimo-servlet_3.0_spec/artifactId /dependency dependency http://git-wip-us.apache.org/repos/asf/camel/blob/d9dd9ecc/components/camel-http4/pom.xml -- diff --git a/components/camel-http4/pom.xml b/components/camel-http4/pom.xml index adeaa19..93bb090 100644 --- a/components/camel-http4/pom.xml +++ b/components/camel-http4/pom.xml @@ -49,7 +49,7 @@ /dependency dependency groupIdorg.apache.geronimo.specs/groupId -artifactIdgeronimo-servlet_2.5_spec/artifactId +artifactIdgeronimo-servlet_3.0_spec/artifactId /dependency dependency groupIdorg.apache.httpcomponents/groupId http://git-wip-us.apache.org/repos/asf/camel/blob/d9dd9ecc/components/camel-jetty/pom.xml -- diff --git a/components/camel-jetty/pom.xml b/components/camel-jetty/pom.xml index 6450631..1777224 100644 --- a/components/camel-jetty/pom.xml +++ b/components/camel-jetty/pom.xml @@ -46,25 +46,30 @@ /dependency dependency groupIdorg.apache.geronimo.specs/groupId -artifactIdgeronimo-servlet_2.5_spec/artifactId +artifactIdgeronimo-servlet_3.0_spec/artifactId /dependency dependency groupIdorg.eclipse.jetty/groupId artifactIdjetty-server/artifactId +exclusions + exclusion + groupIdjavax.servlet/groupId + artifactIdservlet-api/artifactId + /exclusion + exclusion + groupIdorg.eclipse.jetty.orbit/groupId + artifactIdjavax.servlet/artifactId + /exclusion +/exclusions /dependency dependency groupIdorg.eclipse.jetty/groupId -artifactIdjetty-security/artifactId +artifactIdjetty-servlet/artifactId +version${jetty-version}/version /dependency dependency groupIdorg.eclipse.jetty/groupId -artifactIdjetty-servlet/artifactId -exclusions - exclusion - groupIdjavax.servlet/groupId -artifactIdservlet-api/artifactId - /exclusion -/exclusions +artifactIdjetty-security/artifactId /dependency dependency groupIdorg.eclipse.jetty/groupId http://git-wip-us.apache.org/repos/asf/camel/blob/d9dd9ecc/components/camel-servlet/pom.xml -- diff --git a/components/camel-servlet/pom.xml b/components/camel-servlet/pom.xml index 98885ae..aaceb82 100644 --- a/components/camel-servlet/pom.xml +++ b/components/camel-servlet/pom.xml @@ -44,12 +44,6 @@ dependency groupIdorg.apache.camel/groupId artifactIdcamel-http/artifactId - exclusions -exclusion - groupIdorg.apache.geronimo.specs/groupId - artifactIdgeronimo-servlet_2.5_spec/artifactId -/exclusion - /exclusions /dependency dependency groupIdorg.osgi/groupId @@ -59,7 +53,7 @@ /dependency dependency groupIdorg.apache.geronimo.specs/groupId - artifactIdgeronimo-servlet_2.5_spec/artifactId +
svn commit: r878589 - in /websites/production/camel/content: book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache crypto.html
Author: buildbot Date: Mon Sep 16 08:20:25 2013 New Revision: 878589 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/crypto.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 Mon Sep 16 08:20:25 2013 @@ -3623,6 +3623,8 @@ from(direct:hmac-algorithm) ]]/script /div/div +pA list of the available alrorithms in Java 7 is available via a shape=rect class=external-link href=http://pic.dhe.ibm.com/infocenter/java7sdk/v7r0/index.jsp?topic=%2Fcom.ibm.java.security.component.doc%2Fsecurity-component%2FJceDocs%2Fapi_standardnames.html; rel=nofollowIBM's Security Information for Java 7/a guide./p + h3a shape=rect name=BookDataFormatAppendix-SpecifyinganInitializationVector/aSpecifying an Initialization Vector/h3 pSome crypto algorithms, particularly block algorithms, require configuration with an initial block of data known as an Initialization Vector. In the JCE this is passed as an AlgorithmParameterSpec when the Cipher is initialized. To use such a vector with the CryptoDataFormat you can configure it with a byte[] containing the required data e.g./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 Mon Sep 16 08:20:25 2013 @@ -14722,6 +14722,8 @@ from(direct:hmac-algorithm) ]]/script /div/div +pA list of the available alrorithms in Java 7 is available via a shape=rect class=external-link href=http://pic.dhe.ibm.com/infocenter/java7sdk/v7r0/index.jsp?topic=%2Fcom.ibm.java.security.component.doc%2Fsecurity-component%2FJceDocs%2Fapi_standardnames.html; rel=nofollowIBM's Security Information for Java 7/a guide./p + h3a shape=rect name=BookInOnePage-SpecifyinganInitializationVector/aSpecifying an Initialization Vector/h3 pSome crypto algorithms, particularly block algorithms, require configuration with an initial block of data known as an Initialization Vector. In the JCE this is passed as an AlgorithmParameterSpec when the Cipher is initialized. To use such a vector with the CryptoDataFormat you can configure it with a byte[] containing the required data e.g./p Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/crypto.html == --- websites/production/camel/content/crypto.html (original) +++ websites/production/camel/content/crypto.html Mon Sep 16 08:20:25 2013 @@ -154,6 +154,8 @@ from(direct:hmac-algorithm) ]]/script /div/div +pA list of the available alrorithms in Java 7 is available via a shape=rect class=external-link href=http://pic.dhe.ibm.com/infocenter/java7sdk/v7r0/index.jsp?topic=%2Fcom.ibm.java.security.component.doc%2Fsecurity-component%2FJceDocs%2Fapi_standardnames.html; rel=nofollowIBM's Security Information for Java 7/a guide./p + h3a shape=rect name=Crypto-SpecifyinganInitializationVector/aSpecifying an Initialization Vector/h3 pSome crypto algorithms, particularly block algorithms, require configuration with an initial block of data known as an Initialization Vector. In the JCE this is passed as an AlgorithmParameterSpec when the Cipher is initialized. To use such a vector with the CryptoDataFormat you can configure it with a byte[] containing the required data e.g./p
[09/10] git commit: Skip test on some platforms
Skip test on some platforms Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/06cf696d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/06cf696d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/06cf696d Branch: refs/heads/camel-2.12.x Commit: 06cf696df5776107ef7a5cba88bca5ecbdf10b20 Parents: 10dd32e Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 11:25:29 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 11:29:18 2013 +0200 -- .../apache/camel/component/xmpp/XmppRobustConnectionTest.java | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/06cf696d/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java -- diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java index dc51088..25d4e07 100644 --- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java +++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java @@ -29,6 +29,11 @@ public class XmppRobustConnectionTest extends CamelTestSupport { @Test public void testXmppChatWithRobustConnection() throws Exception { +// does not work well on aix or solaris +if (isPlatform(aix) || isPlatform(sunos)) { +return; +} + MockEndpoint consumerEndpoint = context.getEndpoint(mock:out, MockEndpoint.class); MockEndpoint errorEndpoint = context.getEndpoint(mock:error, MockEndpoint.class);
[02/10] git commit: Skip test on some platforms
Skip test on some platforms Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dc7ae0d8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dc7ae0d8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dc7ae0d8 Branch: refs/heads/master Commit: dc7ae0d8305c1ba6fbc9e2e6f2697b77e9b16aeb Parents: 7ee691a Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 11:25:29 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 11:29:07 2013 +0200 -- .../apache/camel/component/xmpp/XmppRobustConnectionTest.java | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/dc7ae0d8/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java -- diff --git a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java index dc51088..25d4e07 100644 --- a/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java +++ b/components/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRobustConnectionTest.java @@ -29,6 +29,11 @@ public class XmppRobustConnectionTest extends CamelTestSupport { @Test public void testXmppChatWithRobustConnection() throws Exception { +// does not work well on aix or solaris +if (isPlatform(aix) || isPlatform(sunos)) { +return; +} + MockEndpoint consumerEndpoint = context.getEndpoint(mock:out, MockEndpoint.class); MockEndpoint errorEndpoint = context.getEndpoint(mock:error, MockEndpoint.class);
[05/10] git commit: Skip test which fails on CI servers.
Skip test which fails on CI servers. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bdb3faff Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bdb3faff Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bdb3faff Branch: refs/heads/master Commit: bdb3faff23b8e4af9a56ca40736b5f4b805450ab Parents: dc7ae0d Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 11:28:09 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 11:29:07 2013 +0200 -- .../apache/camel/impl/StopRouteAbortAfterTimeoutTest.java| 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/bdb3faff/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java b/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java index 03483c1..211e229 100644 --- a/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java +++ b/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java @@ -25,6 +25,10 @@ import org.apache.camel.component.mock.MockEndpoint; public class StopRouteAbortAfterTimeoutTest extends ContextTestSupport { public void testStopRouteWithAbortAfterTimeoutTrue() throws Exception { +// doesnt test to well on all Windows +if (isPlatform(windows)) { +return; +} MockEndpoint mockEP = getMockEndpoint(mock:result); mockEP.setExpectedMessageCount(10); @@ -50,6 +54,10 @@ public class StopRouteAbortAfterTimeoutTest extends ContextTestSupport { } public void testStopRouteWithAbortAfterTimeoutFalse() throws Exception { +// doesnt test to well on all Windows +if (isPlatform(windows)) { +return; +} MockEndpoint mockEP = getMockEndpoint(mock:result);
[06/10] git commit: Fixed tests
Fixed tests Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b3b45825 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b3b45825 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b3b45825 Branch: refs/heads/camel-2.12.x Commit: b3b4582539331211677a12f1b9f834ec4f86d9c4 Parents: f6f28b5 Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 11:09:58 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 11:29:17 2013 +0200 -- .../apache/camel/component/jsch/ScpSimpleProduceTest.java | 10 +- .../netty/http/NettyHttpProducerKeepAliveTest.java| 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b3b45825/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java -- diff --git a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java index 6677080..88e9f4d 100644 --- a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java +++ b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java @@ -35,7 +35,7 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport { String uri = getScpUri() + ?username=adminpassword=adminknownHostsFile= + getKnownHostsFile(); template.sendBodyAndHeader(uri, Hello World, Exchange.FILE_NAME, hello.txt); -Thread.sleep(800); +Thread.sleep(1000); File file = new File(getScpPath() + /hello.txt); assertFileExists(file.getAbsolutePath()); @@ -48,7 +48,7 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport { String uri = getScpUri() + ?username=adminpassword=adminknownHostsFile= + getKnownHostsFile(); template.sendBodyAndHeader(uri, Bye World, Exchange.FILE_NAME, mysub/bye.txt); -Thread.sleep(800); +Thread.sleep(1000); File file = new File(getScpPath() + /mysub/bye.txt); assertFileExists(file.getAbsolutePath()); @@ -61,7 +61,7 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport { String uri = getScpUri() + ?username=adminpassword=adminknownHostsFile= + getKnownHostsFile(); template.sendBodyAndHeader(uri, Farewell World, Exchange.FILE_NAME, mysub/mysubsub/farewell.txt); -Thread.sleep(800); +Thread.sleep(1000); File file = new File(getScpPath() + /mysub/mysubsub/farewell.txt); assertFileExists(file.getAbsolutePath()); @@ -74,7 +74,7 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport { String uri = getScpUri() + ?username=adminpassword=adminchmod=640knownHostsFile= + getKnownHostsFile(); template.sendBodyAndHeader(uri, Bonjour Monde, Exchange.FILE_NAME, monde.txt); -Thread.sleep(800); +Thread.sleep(1000); File file = new File(getScpPath() + /monde.txt); assertFileExists(file.getAbsolutePath()); @@ -89,7 +89,7 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport { String uri = getScpUri() + ?username=adminprivateKeyFile=src/test/resources/camel-key.privprivateKeyFilePassphrase=passwordknownHostsFile= + getKnownHostsFile(); template.sendBodyAndHeader(uri, Hallo Welt, Exchange.FILE_NAME, welt.txt); -Thread.sleep(800); +Thread.sleep(1000); File file = new File(getScpPath() + /welt.txt); assertFileExists(file.getAbsolutePath()); http://git-wip-us.apache.org/repos/asf/camel/blob/b3b45825/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerKeepAliveTest.java -- diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerKeepAliveTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerKeepAliveTest.java index ad018f0..9d1dd95 100644 --- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerKeepAliveTest.java +++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerKeepAliveTest.java @@ -17,6 +17,7 @@ package org.apache.camel.component.netty.http; import org.apache.camel.builder.RouteBuilder; +import org.junit.Ignore; import org.junit.Test; public class NettyHttpProducerKeepAliveTest extends BaseNettyTest { @@ -35,6 +36,7 @@ public class NettyHttpProducerKeepAliveTest extends BaseNettyTest { }
[01/10] git commit: Fixed tests
Updated Branches: refs/heads/camel-2.12.x f6f28b502 - 07549 refs/heads/master d9dd9ecc5 - bdb3faff2 Fixed tests Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6aee9d52 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6aee9d52 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6aee9d52 Branch: refs/heads/master Commit: 6aee9d52457d29751ff5193f5fa6bff2bba6a226 Parents: d9dd9ec Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 11:09:58 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 11:29:06 2013 +0200 -- .../apache/camel/component/jsch/ScpSimpleProduceTest.java | 10 +- .../netty/http/NettyHttpProducerKeepAliveTest.java| 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/6aee9d52/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java -- diff --git a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java index 6677080..88e9f4d 100644 --- a/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java +++ b/components/camel-jsch/src/test/java/org/apache/camel/component/jsch/ScpSimpleProduceTest.java @@ -35,7 +35,7 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport { String uri = getScpUri() + ?username=adminpassword=adminknownHostsFile= + getKnownHostsFile(); template.sendBodyAndHeader(uri, Hello World, Exchange.FILE_NAME, hello.txt); -Thread.sleep(800); +Thread.sleep(1000); File file = new File(getScpPath() + /hello.txt); assertFileExists(file.getAbsolutePath()); @@ -48,7 +48,7 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport { String uri = getScpUri() + ?username=adminpassword=adminknownHostsFile= + getKnownHostsFile(); template.sendBodyAndHeader(uri, Bye World, Exchange.FILE_NAME, mysub/bye.txt); -Thread.sleep(800); +Thread.sleep(1000); File file = new File(getScpPath() + /mysub/bye.txt); assertFileExists(file.getAbsolutePath()); @@ -61,7 +61,7 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport { String uri = getScpUri() + ?username=adminpassword=adminknownHostsFile= + getKnownHostsFile(); template.sendBodyAndHeader(uri, Farewell World, Exchange.FILE_NAME, mysub/mysubsub/farewell.txt); -Thread.sleep(800); +Thread.sleep(1000); File file = new File(getScpPath() + /mysub/mysubsub/farewell.txt); assertFileExists(file.getAbsolutePath()); @@ -74,7 +74,7 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport { String uri = getScpUri() + ?username=adminpassword=adminchmod=640knownHostsFile= + getKnownHostsFile(); template.sendBodyAndHeader(uri, Bonjour Monde, Exchange.FILE_NAME, monde.txt); -Thread.sleep(800); +Thread.sleep(1000); File file = new File(getScpPath() + /monde.txt); assertFileExists(file.getAbsolutePath()); @@ -89,7 +89,7 @@ public class ScpSimpleProduceTest extends ScpServerTestSupport { String uri = getScpUri() + ?username=adminprivateKeyFile=src/test/resources/camel-key.privprivateKeyFilePassphrase=passwordknownHostsFile= + getKnownHostsFile(); template.sendBodyAndHeader(uri, Hallo Welt, Exchange.FILE_NAME, welt.txt); -Thread.sleep(800); +Thread.sleep(1000); File file = new File(getScpPath() + /welt.txt); assertFileExists(file.getAbsolutePath()); http://git-wip-us.apache.org/repos/asf/camel/blob/6aee9d52/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerKeepAliveTest.java -- diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerKeepAliveTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerKeepAliveTest.java index ad018f0..9d1dd95 100644 --- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerKeepAliveTest.java +++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpProducerKeepAliveTest.java @@ -17,6 +17,7 @@ package org.apache.camel.component.netty.http; import org.apache.camel.builder.RouteBuilder; +import org.junit.Ignore; import org.junit.Test; public class NettyHttpProducerKeepAliveTest extends
[10/10] git commit: Skip test which fails on CI servers.
Skip test which fails on CI servers. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0754 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0754 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0754 Branch: refs/heads/camel-2.12.x Commit: 0754974286336f19144060811cc7b9ee7454 Parents: 06cf696 Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 11:28:09 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 11:29:18 2013 +0200 -- .../apache/camel/impl/StopRouteAbortAfterTimeoutTest.java| 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0754/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java b/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java index 03483c1..211e229 100644 --- a/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java +++ b/camel-core/src/test/java/org/apache/camel/impl/StopRouteAbortAfterTimeoutTest.java @@ -25,6 +25,10 @@ import org.apache.camel.component.mock.MockEndpoint; public class StopRouteAbortAfterTimeoutTest extends ContextTestSupport { public void testStopRouteWithAbortAfterTimeoutTrue() throws Exception { +// doesnt test to well on all Windows +if (isPlatform(windows)) { +return; +} MockEndpoint mockEP = getMockEndpoint(mock:result); mockEP.setExpectedMessageCount(10); @@ -50,6 +54,10 @@ public class StopRouteAbortAfterTimeoutTest extends ContextTestSupport { } public void testStopRouteWithAbortAfterTimeoutFalse() throws Exception { +// doesnt test to well on all Windows +if (isPlatform(windows)) { +return; +} MockEndpoint mockEP = getMockEndpoint(mock:result);
[2/2] git commit: Skip test if cannot run on platform due security provider not supporting ECDSA.
Skip test if cannot run on platform due security provider not supporting ECDSA. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4db3d9e1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4db3d9e1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4db3d9e1 Branch: refs/heads/camel-2.12.x Commit: 4db3d9e12dd74c4ecef68ddcbfc5b29dc713bc3b Parents: 0754222 Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 11:39:41 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 11:39:57 2013 +0200 -- .../component/crypto/ECDSASignatureTest.java| 40 ++-- 1 file changed, 28 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/4db3d9e1/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java -- diff --git a/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java b/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java index 4f8760f..b24988c 100644 --- a/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java +++ b/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java @@ -40,12 +40,15 @@ public class ECDSASignatureTest extends CamelTestSupport { private String payload = Dear Alice, Rest assured it's me, signed Bob; private boolean ibmJDK; +private PrivateKey privateKey; +private X509Certificate x509; +private boolean canRun = true; public ECDSASignatureTest() throws Exception { // BouncyCastle is required for ECDSA support for JDK 1.6 if (isJava16() Security.getProvider(BC) == null) { -Constructor? cons = null; +Constructor? cons; Class? c = Class.forName(org.bouncycastle.jce.provider.BouncyCastleProvider); cons = c.getConstructor(new Class[] {}); @@ -57,28 +60,40 @@ public class ECDSASignatureTest extends CamelTestSupport { if (isJavaVendor(IBM)) { ibmJDK = true; } + +// see if we can load the keystore et all +try { +KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); +InputStream in = ECDSASignatureTest.class.getResourceAsStream(/org/apache/camel/component/crypto/ecdsa.jks); +keyStore.load(in, security.toCharArray()); +privateKey = (PrivateKey) keyStore.getKey(ECDSA, security.toCharArray()); +x509 = (X509Certificate)keyStore.getCertificate(ECDSA); +} catch (Throwable e) { +log.warn(Cannot setup keystore for running this test due + e.getMessage() + . This test is skipped., e); +canRun = false; +} } @Override protected RouteBuilder[] createRouteBuilders() throws Exception { -if (ibmJDK) { +if (ibmJDK || !canRun) { return new RouteBuilder[] {}; } return new RouteBuilder[]{new RouteBuilder() { public void configure() throws Exception { // START SNIPPET: ecdsa-sha1 -KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); -InputStream in = ECDSASignatureTest.class.getResourceAsStream(/org/apache/camel/component/crypto/ecdsa.jks); -keyStore.load(in, security.toCharArray()); -PrivateKey privateKey = -(PrivateKey)keyStore.getKey(ECDSA, security.toCharArray()); -X509Certificate x509 = (X509Certificate)keyStore.getCertificate(ECDSA); // we can set the keys explicitly on the endpoint instances. - context.getEndpoint(crypto:sign://ecdsa-sha1?algorithm=SHA1withECDSA, DigitalSignatureEndpoint.class).setPrivateKey(privateKey); - context.getEndpoint(crypto:verify://ecdsa-sha1?algorithm=SHA1withECDSA, DigitalSignatureEndpoint.class).setPublicKey(x509.getPublicKey()); - from(direct:ecdsa-sha1).to(crypto:sign://ecdsa-sha1?algorithm=SHA1withECDSA, crypto:verify://ecdsa-sha1?algorithm=SHA1withECDSA, mock:result); + context.getEndpoint(crypto:sign://ecdsa-sha1?algorithm=SHA1withECDSA, DigitalSignatureEndpoint.class) +.setPrivateKey(privateKey); + context.getEndpoint(crypto:verify://ecdsa-sha1?algorithm=SHA1withECDSA, DigitalSignatureEndpoint.class) +.setPublicKey(x509.getPublicKey()); + +from(direct:ecdsa-sha1) +.to(crypto:sign://ecdsa-sha1?algorithm=SHA1withECDSA) +
[1/2] git commit: Skip test if cannot run on platform due security provider not supporting ECDSA.
Updated Branches: refs/heads/camel-2.12.x 07549 - 4db3d9e12 refs/heads/master bdb3faff2 - 89c61cacc Skip test if cannot run on platform due security provider not supporting ECDSA. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/89c61cac Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/89c61cac Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/89c61cac Branch: refs/heads/master Commit: 89c61caccc6f2138c1b20e4ff3d92daa8acee613 Parents: bdb3faf Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 11:39:41 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 11:39:41 2013 +0200 -- .../component/crypto/ECDSASignatureTest.java| 40 ++-- 1 file changed, 28 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/89c61cac/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java -- diff --git a/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java b/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java index 4f8760f..b24988c 100644 --- a/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java +++ b/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/ECDSASignatureTest.java @@ -40,12 +40,15 @@ public class ECDSASignatureTest extends CamelTestSupport { private String payload = Dear Alice, Rest assured it's me, signed Bob; private boolean ibmJDK; +private PrivateKey privateKey; +private X509Certificate x509; +private boolean canRun = true; public ECDSASignatureTest() throws Exception { // BouncyCastle is required for ECDSA support for JDK 1.6 if (isJava16() Security.getProvider(BC) == null) { -Constructor? cons = null; +Constructor? cons; Class? c = Class.forName(org.bouncycastle.jce.provider.BouncyCastleProvider); cons = c.getConstructor(new Class[] {}); @@ -57,28 +60,40 @@ public class ECDSASignatureTest extends CamelTestSupport { if (isJavaVendor(IBM)) { ibmJDK = true; } + +// see if we can load the keystore et all +try { +KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); +InputStream in = ECDSASignatureTest.class.getResourceAsStream(/org/apache/camel/component/crypto/ecdsa.jks); +keyStore.load(in, security.toCharArray()); +privateKey = (PrivateKey) keyStore.getKey(ECDSA, security.toCharArray()); +x509 = (X509Certificate)keyStore.getCertificate(ECDSA); +} catch (Throwable e) { +log.warn(Cannot setup keystore for running this test due + e.getMessage() + . This test is skipped., e); +canRun = false; +} } @Override protected RouteBuilder[] createRouteBuilders() throws Exception { -if (ibmJDK) { +if (ibmJDK || !canRun) { return new RouteBuilder[] {}; } return new RouteBuilder[]{new RouteBuilder() { public void configure() throws Exception { // START SNIPPET: ecdsa-sha1 -KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); -InputStream in = ECDSASignatureTest.class.getResourceAsStream(/org/apache/camel/component/crypto/ecdsa.jks); -keyStore.load(in, security.toCharArray()); -PrivateKey privateKey = -(PrivateKey)keyStore.getKey(ECDSA, security.toCharArray()); -X509Certificate x509 = (X509Certificate)keyStore.getCertificate(ECDSA); // we can set the keys explicitly on the endpoint instances. - context.getEndpoint(crypto:sign://ecdsa-sha1?algorithm=SHA1withECDSA, DigitalSignatureEndpoint.class).setPrivateKey(privateKey); - context.getEndpoint(crypto:verify://ecdsa-sha1?algorithm=SHA1withECDSA, DigitalSignatureEndpoint.class).setPublicKey(x509.getPublicKey()); - from(direct:ecdsa-sha1).to(crypto:sign://ecdsa-sha1?algorithm=SHA1withECDSA, crypto:verify://ecdsa-sha1?algorithm=SHA1withECDSA, mock:result); + context.getEndpoint(crypto:sign://ecdsa-sha1?algorithm=SHA1withECDSA, DigitalSignatureEndpoint.class) +.setPrivateKey(privateKey); + context.getEndpoint(crypto:verify://ecdsa-sha1?algorithm=SHA1withECDSA, DigitalSignatureEndpoint.class) +.setPublicKey(x509.getPublicKey()); + +
[5/5] 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/0acff1b0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0acff1b0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0acff1b0 Branch: refs/heads/camel-2.11.x Commit: 0acff1b0a2ab0ed2bad66b1e13c58885e8252b14 Parents: aebe527 Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 12:41:44 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 12:42:21 2013 +0200 -- .../src/main/java/org/apache/camel/component/bean/BeanInfo.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0acff1b0/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java b/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java index f288ace..583d6ad 100644 --- a/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java +++ b/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java @@ -613,7 +613,7 @@ public class BeanInfo { private MethodInfo getSingleCovariantMethod(CollectionMethodInfo candidates) { // if all the candidates are actually covariant, it doesn't matter which one we call MethodInfo firstCandidate = candidates.iterator().next(); -for (MethodInfo candidate: candidates) { +for (MethodInfo candidate : candidates) { if (!firstCandidate.isCovariantWith(candidate)) { return null; }
[2/5] 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/302133ed Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/302133ed Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/302133ed Branch: refs/heads/master Commit: 302133ed3b488ff07b03644d1c010032581d75f3 Parents: 0dbb9ea Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 12:41:44 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 12:41:44 2013 +0200 -- .../src/main/java/org/apache/camel/component/bean/BeanInfo.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/302133ed/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java b/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java index 98d0c8b..19d7ad3 100644 --- a/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java +++ b/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java @@ -627,7 +627,7 @@ public class BeanInfo { private MethodInfo getSingleCovariantMethod(CollectionMethodInfo candidates) { // if all the candidates are actually covariant, it doesn't matter which one we call MethodInfo firstCandidate = candidates.iterator().next(); -for (MethodInfo candidate: candidates) { +for (MethodInfo candidate : candidates) { if (!firstCandidate.isCovariantWith(candidate)) { return null; }
[3/5] git commit: CAMEL-6729: camel-jt400 filter unsupported scheduled poll consumer options when creating a PollingConsumer as it does not support these options, due special in jt400 component.
CAMEL-6729: camel-jt400 filter unsupported scheduled poll consumer options when creating a PollingConsumer as it does not support these options, due special in jt400 component. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8ad3d365 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8ad3d365 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8ad3d365 Branch: refs/heads/camel-2.12.x Commit: 8ad3d365652597deefd50cf7e5862de40aa0ecbc Parents: 4db3d9e Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 12:40:53 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 12:42:00 2013 +0200 -- .../camel/impl/ScheduledPollEndpoint.java | 2 +- .../component/jt400/Jt400DataQueueEndpoint.java | 24 ++- .../jt400/Jt400CustomPollStrategyTest.java | 71 3 files changed, 95 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/8ad3d365/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java index 9106ef3..cc63ddc 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java @@ -55,7 +55,7 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint { configureScheduledPollConsumerProperties(options, getConsumerProperties()); } -private void configureScheduledPollConsumerProperties(MapString, Object options, MapString, Object consumerProperties) { +protected void configureScheduledPollConsumerProperties(MapString, Object options, MapString, Object consumerProperties) { // special for scheduled poll consumers as we want to allow end users to configure its options // from the URI parameters without the consumer. prefix MapString, Object schedulerProperties = IntrospectionSupport.extractProperties(options, scheduler.); http://git-wip-us.apache.org/repos/asf/camel/blob/8ad3d365/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueEndpoint.java -- diff --git a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueEndpoint.java b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueEndpoint.java index 3692864..b9b5797 100644 --- a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueEndpoint.java +++ b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueEndpoint.java @@ -18,6 +18,8 @@ package org.apache.camel.component.jt400; import java.beans.PropertyVetoException; import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.Map; import com.ibm.as400.access.AS400; import com.ibm.as400.access.AS400ConnectionPool; @@ -27,7 +29,9 @@ import com.ibm.as400.access.KeyedDataQueue; import org.apache.camel.CamelException; import org.apache.camel.PollingConsumer; import org.apache.camel.Producer; +import org.apache.camel.ResolveEndpointFailedException; import org.apache.camel.impl.DefaultPollingEndpoint; +import org.apache.camel.util.EndpointHelper; import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.URISupport; @@ -143,7 +147,25 @@ public class Jt400DataQueueEndpoint extends DefaultPollingEndpoint { @Override public PollingConsumer createPollingConsumer() throws Exception { Jt400DataQueueConsumer answer = new Jt400DataQueueConsumer(this); -configureConsumer(answer); + +MapString, Object copy = new HashMapString, Object(getConsumerProperties()); +MapString, Object throwaway = new HashMapString, Object(); + +// filter out unwanted options which is intended for the scheduled poll consumer +// as these options are not supported on Jt400DataQueueConsumer +configureScheduledPollConsumerProperties(copy, throwaway); + +// set reference properties first as they use # syntax that fools the regular properties setter +EndpointHelper.setReferenceProperties(getCamelContext(), this, copy); +EndpointHelper.setProperties(getCamelContext(), this, copy); + +if (!isLenientProperties() copy.size() 0) { +throw new ResolveEndpointFailedException(this.getEndpointUri(), There are + copy.size() ++ parameters that couldn't be set on the endpoint consumer. ++ Check the uri if the parameters
[1/5] git commit: CAMEL-6729: camel-jt400 filter unsupported scheduled poll consumer options when creating a PollingConsumer as it does not support these options, due special in jt400 component.
Updated Branches: refs/heads/camel-2.11.x aebe52774 - 0acff1b0a refs/heads/camel-2.12.x 4db3d9e12 - a971b79da refs/heads/master 89c61cacc - 302133ed3 CAMEL-6729: camel-jt400 filter unsupported scheduled poll consumer options when creating a PollingConsumer as it does not support these options, due special in jt400 component. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0dbb9ea2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0dbb9ea2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0dbb9ea2 Branch: refs/heads/master Commit: 0dbb9ea266f640c3859703f90fe5b5b98e27e579 Parents: 89c61ca Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 12:40:53 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 12:40:53 2013 +0200 -- .../camel/impl/ScheduledPollEndpoint.java | 2 +- .../component/jt400/Jt400DataQueueEndpoint.java | 24 ++- .../jt400/Jt400CustomPollStrategyTest.java | 71 3 files changed, 95 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0dbb9ea2/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java index 9106ef3..cc63ddc 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/impl/ScheduledPollEndpoint.java @@ -55,7 +55,7 @@ public abstract class ScheduledPollEndpoint extends DefaultEndpoint { configureScheduledPollConsumerProperties(options, getConsumerProperties()); } -private void configureScheduledPollConsumerProperties(MapString, Object options, MapString, Object consumerProperties) { +protected void configureScheduledPollConsumerProperties(MapString, Object options, MapString, Object consumerProperties) { // special for scheduled poll consumers as we want to allow end users to configure its options // from the URI parameters without the consumer. prefix MapString, Object schedulerProperties = IntrospectionSupport.extractProperties(options, scheduler.); http://git-wip-us.apache.org/repos/asf/camel/blob/0dbb9ea2/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueEndpoint.java -- diff --git a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueEndpoint.java b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueEndpoint.java index 3692864..b9b5797 100644 --- a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueEndpoint.java +++ b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueEndpoint.java @@ -18,6 +18,8 @@ package org.apache.camel.component.jt400; import java.beans.PropertyVetoException; import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.Map; import com.ibm.as400.access.AS400; import com.ibm.as400.access.AS400ConnectionPool; @@ -27,7 +29,9 @@ import com.ibm.as400.access.KeyedDataQueue; import org.apache.camel.CamelException; import org.apache.camel.PollingConsumer; import org.apache.camel.Producer; +import org.apache.camel.ResolveEndpointFailedException; import org.apache.camel.impl.DefaultPollingEndpoint; +import org.apache.camel.util.EndpointHelper; import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.URISupport; @@ -143,7 +147,25 @@ public class Jt400DataQueueEndpoint extends DefaultPollingEndpoint { @Override public PollingConsumer createPollingConsumer() throws Exception { Jt400DataQueueConsumer answer = new Jt400DataQueueConsumer(this); -configureConsumer(answer); + +MapString, Object copy = new HashMapString, Object(getConsumerProperties()); +MapString, Object throwaway = new HashMapString, Object(); + +// filter out unwanted options which is intended for the scheduled poll consumer +// as these options are not supported on Jt400DataQueueConsumer +configureScheduledPollConsumerProperties(copy, throwaway); + +// set reference properties first as they use # syntax that fools the regular properties setter +EndpointHelper.setReferenceProperties(getCamelContext(), this, copy); +EndpointHelper.setProperties(getCamelContext(), this, copy); + +if (!isLenientProperties() copy.size() 0) { +throw new ResolveEndpointFailedException(this.getEndpointUri(), There are +
[4/5] 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/a971b79d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a971b79d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a971b79d Branch: refs/heads/camel-2.12.x Commit: a971b79dac4f0f0e9d091d6dc8758c4eb784a884 Parents: 8ad3d36 Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 12:41:44 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 12:42:06 2013 +0200 -- .../src/main/java/org/apache/camel/component/bean/BeanInfo.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a971b79d/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java b/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java index 98d0c8b..19d7ad3 100644 --- a/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java +++ b/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java @@ -627,7 +627,7 @@ public class BeanInfo { private MethodInfo getSingleCovariantMethod(CollectionMethodInfo candidates) { // if all the candidates are actually covariant, it doesn't matter which one we call MethodInfo firstCandidate = candidates.iterator().next(); -for (MethodInfo candidate: candidates) { +for (MethodInfo candidate : candidates) { if (!firstCandidate.isCovariantWith(candidate)) { return null; }
svn commit: r878624 - in /websites/production/camel/content: cache/main.pageCache component-list-grouped.html
Author: buildbot Date: Mon Sep 16 14:19:41 2013 New Revision: 878624 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/component-list-grouped.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/component-list-grouped.html == --- websites/production/camel/content/component-list-grouped.html (original) +++ websites/production/camel/content/component-list-grouped.html Mon Sep 16 14:19:41 2013 @@ -77,11 +77,14 @@ td valign=top width=100% div class=wiki-content maincontenth2a shape=rect name=ComponentListGrouped-AninformalgroupingofCamelcomponents./aAn informal grouping of Camel components./h2 +h3a shape=rect name=ComponentListGrouped-AutomatingTasks/aAutomating Tasks/h3 +pa shape=rect href=timer.html title=Timertimer/a, quartz, quartz2/p + h3a shape=rect name=ComponentListGrouped-Amazon/aAmazon/h3 paws-cw, aws-ddb, aws-sdb, aws-ses, aws-sns, aws-sqs, aws-s3/p h3a shape=rect name=ComponentListGrouped-Basics/aBasics /h3 -pbean, class, a shape=rect href=dataformat-component.html title=DataFormat Componentdataformat/a, direct, direct-vm, language, properties, ref, vm/p +pbean, class, a shape=rect href=dataformat-component.html title=DataFormat Componentdataformat/a, language, properties, ref, /p h3a shape=rect name=ComponentListGrouped-Chat/aChat/h3 pirc, xmpp/p @@ -90,7 +93,7 @@ pjgroups, zookeeper /p h3a shape=rect name=ComponentListGrouped-Commands/aCommands /h3 -pdns, exec, a shape=rect href=file2.html title=File2file/a, flatpack, hdfs, scp, log, lpr, a shape=rect href=stream.html title=Streamstream/a, ssh/p +pdns, exec, flatpack, hdfs, scp, log, lpr, a shape=rect href=stream.html title=Streamstream/a, ssh/p h3a shape=rect name=ComponentListGrouped-ContentRepositories/aContent Repositories/h3 pcmis, jcr/p @@ -104,8 +107,8 @@ h3a shape=rect name=ComponentListGrouped-Feeds/aFeeds/h3 pAtom, RSS/p -h3a shape=rect name=ComponentListGrouped-FTP/aFTP/h3 -pftp, ftps, sftp /p +h3a shape=rect name=ComponentListGrouped-FileI%2FO/aFile I/O/h3 +pa shape=rect href=file2.html title=File2file/a, ftp, ftps, sftp /p h3a shape=rect name=ComponentListGrouped-Google/aGoogle/h3 pguath, ghttps, glogin, gmail, gtask, guava-eventbus/p @@ -113,6 +116,9 @@ h3a shape=rect name=ComponentListGrouped-http/ahttp/h3 pahc, cometd, http, http4, jetty, servlet/p +h3a shape=rect name=ComponentListGrouped-InMemoryManagement/aIn-Memory Management/h3 +pdirect, direct-vm, disruptor, disruptor-vm, seda, vm/p + h3a shape=rect name=ComponentListGrouped-JMS/aJMS/h3 pactivemq, activemq.journal, jms, rabbitmq, sjms, stomp, zeromq/p @@ -128,7 +134,7 @@ h3a shape=rect name=ComponentListGrouped-Messaging/aMessaging/h3 pamqp, javaspace, jt400, kestrel, mqtt, sip, sips, smpp, smpps, snmp, quickfix/p -h3a shape=rect name=ComponentListGrouped-MINA/aMINA/h3 +h3a shape=rect name=ComponentListGrouped-Networking/aNetworking/h3 pmina, mina2/p h3a shape=rect name=ComponentListGrouped-Netty/aNetty /h3 @@ -146,9 +152,6 @@ h3a shape=rect name=ComponentListGrouped-SearchEngines/aSearch Engines /h3 pElasticSearch, Lucene, Solr/p -h3a shape=rect name=ComponentListGrouped-SEDA/aSEDA/h3 -pseda, disruptor, disruptor-vm/p - h3a shape=rect name=ComponentListGrouped-SocialMedia/aSocial Media /h3 pfacebook, twitter, yammer/p @@ -158,12 +161,9 @@ h3a shape=rect name=ComponentListGrouped-Templates/aTemplates/h3 pfreemarker, mustache, mvel, scalate, string-template, velocity/p -h3a shape=rect name=ComponentListGrouped-Testing/aTesting/h3 +h3a shape=rect name=ComponentListGrouped-Testing/aTesting /h3 pdataset, a shape=rect href=mock.html title=Mockmock/a, stub, test/p -h3a shape=rect name=ComponentListGrouped-Timers/aTimers/h3 -pa shape=rect href=timer.html title=Timertimer/a, quartz, quartz2/p - h3a shape=rect name=ComponentListGrouped-XML/aXML/h3 pbean-validator, fop, msv, rnc, rng, stax, squery, xslt, validation/p
svn commit: r878640 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache cxf-bean-component.html
Author: buildbot Date: Mon Sep 16 15:20:48 2013 New Revision: 878640 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/cxf-bean-component.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 Mon Sep 16 15:20:48 2013 @@ -2754,7 +2754,7 @@ cxfbean:serviceBeanRef h3a shape=rect name=BookComponentAppendix-Options/aOptions/h3 div class=confluenceTableSmalldiv class=table-wrap -table class=confluenceTabletbodytrth colspan=1 rowspan=1 class=confluenceTh Name /thth colspan=1 rowspan=1 class=confluenceTh Description /thth colspan=1 rowspan=1 class=confluenceTh Example /thth colspan=1 rowspan=1 class=confluenceTh Required? /thth colspan=1 rowspan=1 class=confluenceTh Default Value /th/trtrtd colspan=1 rowspan=1 class=confluenceTd ttcxfBeanBinding/tt /tdtd colspan=1 rowspan=1 class=confluenceTd CXF bean binding specified by the tt#/tt notation. The referenced object must be an instance of ttorg.apache.camel.component.cxf.cxfbean.CxfBeanBinding/tt. /tdtd colspan=1 rowspan=1 class=confluenceTd ttcxfBinding=#bindingName/tt /tdtd colspan=1 rowspan=1 class=confluenceTd No /tdtd colspan=1 rowspan=1 class=confluenceTd ttDefaultCxfBeanBinding/tt /td/trtrtd colspan=1 rowspan=1 class=confluenceTd ttbus/tt /tdtd colspan=1 rowspan=1 class=confluenceTd CXF bus reference specified by the tt#/tt notation. The referenced object must be an instance of ttorg.apache.cxf.Bus/tt. /tdtd colspan=1 rowspan=1 class=confluenceTd ttbus=#busName/tt /tdtd colspan=1 rowspan=1 class=confluenceTd No /tdtd colspan=1 rowspan=1 class=confluenceTd Default bus created by CXF Bus Factory /td/trtrtd colspan=1 rowspan=1 class=confluenceTd ttheaderFilterStrategy/tt /tdtd colspan=1 rowspan=1 class=confluenceTd Header filter strategy specified by the tt#/tt notation. The referenced object must be an instance of ttorg.apache.camel.spi.HeaderFilterStrategy/tt. /tdtd colspan=1 rowspan=1 class=confluenceTd ttheaderFilterStrategy=#strategyName/tt /tdtd colspan=1 rowspan=1 class=confluenceTd No /tdtd colspan=1 rowspan=1 class=confluenceTd ttCxfHeaderFilterStrategy/tt /td/trtrtd colspan=1 rowspan=1 class= confluenceTd ttsetDefaultBus/tt /tdtd colspan=1 rowspan=1 class=confluenceTd Will set the default bus when CXF endpoint create a bus by itself. /tdtd colspan=1 rowspan=1 class=confluenceTd tttrue/tt, ttfalse/tt /tdtd colspan=1 rowspan=1 class=confluenceTd No /tdtd colspan=1 rowspan=1 class=confluenceTd ttfalse/tt /td/trtrtd colspan=1 rowspan=1 class=confluenceTd ttpopulateFromClass/ttbr clear=none class=atl-forced-newline /tdtd colspan=1 rowspan=1 class=confluenceTd Since 2.3, the wsdlLocation annotated in the POJO is ignored (by default) unless this option is set to#160; ttfalse./tt Prior to 2.3, the wsdlLocation annotated in the POJO is always honored and it is not possible to ignore.br clear=none class=atl-forced-newline /tdtd colspan=1 rowspan=1 class=confluenceTd tttrue/tt, ttfalse/tt /tdtd colspan=1 rowspan=1 class=confluenceTd No /tdtd colspan= 1 rowspan=1 class=confluenceTd tttrue/tt /td/trtrtd colspan=1 rowspan=1 class=confluenceTd ttproviders/tt /tdtd colspan=1 rowspan=1 class=confluenceTd Since 2.5, setting the providers for the CXFRS endpoint. /tdtd colspan=1 rowspan=1 class=confluenceTdttproviders=#providerRef1,#providerRef2/tt/tdtd colspan=1 rowspan=1 class=confluenceTd No /tdtd colspan=1 rowspan=1 class=confluenceTd ttnull/tt/td/tr/tbody/table +table class=confluenceTabletbodytrth colspan=1 rowspan=1 class=confluenceTh Name /thth colspan=1 rowspan=1 class=confluenceTh Description /thth colspan=1 rowspan=1 class=confluenceTh Example /thth colspan=1 rowspan=1 class=confluenceTh Required? /thth colspan=1 rowspan=1 class=confluenceTh Default Value /th/trtrtd colspan=1 rowspan=1 class=confluenceTd ttbus/tt /tdtd colspan=1 rowspan=1 class=confluenceTd CXF bus reference specified by the tt#/tt notation. The referenced object must be an instance of ttorg.apache.cxf.Bus/tt. /tdtd colspan=1 rowspan=1 class=confluenceTd ttbus=#busName/tt /tdtd colspan=1 rowspan=1 class=confluenceTd No /tdtd colspan=1 rowspan=1 class=confluenceTd Default bus created by CXF Bus Factory /td/trtrtd colspan=1 rowspan=1 class=confluenceTd ttcxfBeanBinding/tt /tdtd colspan=1 rowspan=1 class=confluenceTd CX F bean binding specified by the tt#/tt notation. The referenced object must be an instance of ttorg.apache.camel.component.cxf.cxfbean.CxfBeanBinding/tt. /tdtd colspan=1 rowspan=1 class=confluenceTd ttcxfBinding=#bindingName/tt /tdtd
[CONF] Apache Camel Crypto
Crypto Page edited by Jakub Korab Comment: Replaced link with algorithms to point to the Cryptography API spec. Changes (2) ... {snippet:id=algorithm|lang=java|url="" A list of the available alrorithms in Java 7 is available via [IBMs Security Information for Java 7|http://pic.dhe.ibm.com/infocenter/java7sdk/v7r0/index.jsp?topic=%2Fcom.ibm.java.security.component.doc%2Fsecurity-component%2FJceDocs%2Fapi_standardnames.html] guide. A list of the available algorithms in Java 7 is available via the [Java Cryptography Architecture Standard Algorithm Name Documentation|http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html]. h3. Specifying an Initialization Vector ... Full Content Crypto Available as of Camel 2.3 PGP Available as of Camel 2.9 The Crypto Data Format integrates the Java Cryptographic Extension into Camel, allowing simple and flexible encryption and decryption of messages using Camel's familiar marshall and unmarshal formatting mechanism. It assumes marshalling to mean encryption to cyphertext and unmarshalling to mean decryption back to the original plaintext. Options Name Type Default Description algorithm String DES/CBC/PKCS5Padding The JCE algorithm name indicating the cryptographic algorithm that will be used. algorithmParamterSpec AlgorithmParameterSpec null A JCE AlgorithmParameterSpec used to initialize the Cipher. bufferSize Integer 2048 the size of the buffer used in the signature process. cryptoProvider String null The name of the JCE Security Provider that should be used. initializationVector byte[] null A byte array containing the Initialization Vector that will be used to initialize the Cipher. inline boolean false Flag indicating that the configured IV should be inlined into the encrypted data stream. macAlgorithm String null The JCE algorithm name indicating the Message Authentication algorithm. shouldAppendHMAC boolean null Flag indicating that a Message Authentication Code should be calculated and appended to the encrypted data. Basic Usage At its most basic all that is required to encrypt/decrypt an exchange is a shared secret key. If one or more instances of the Crypto data format are configured with this key the format can be used to encrypt the payload in one route (or part of one) and decrypted in another. For example, using the Java DSL as follows: In Spring the dataformat is configured first and then used in routes camelContext id="camel" xmlns="http://camel.apache.org/schema/spring" dataFormats crypto id="basic" algorithm="DES" keyRef="desKey" / /dataFormats ... route from uri="direct:basic-encryption" / marshal ref="basic" / to uri="mock:encrypted" / unmarshal ref="basic" / to uri="mock:unencrypted" / /route /camelContext Specifying the Encryption Algorithm Changing the algorithm is a matter of supplying the JCE algorithm name. If you change the algorithm you will need to use a compatible key. A list of the available algorithms in Java 7 is available via the [Java Cryptography Architecture Standard Algorithm Name Documentation|http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html]. Specifying an Initialization Vector Some crypto algorithms, particularly block algorithms, require configuration with an initial block of data known as an Initialization Vector. In the JCE this is passed as an AlgorithmParameterSpec when the Cipher is initialized. To use such a vector with the CryptoDataFormat you can configure it with a byte[] containing the required data e.g. or with spring, suppling a reference to a byte[] The same vector is required in both the encryption and decryption phases. As it is not necessary to keep the IV a secret, the DataFormat allows for it to be inlined into the encrypted data and subsequently read out in the decryption phase to initialize the Cipher. To inline the IV set the /oinline flag. or with spring. For more information of the use of Initialization Vectors, consult http://en.wikipedia.org/wiki/Initialization_vector http://www.herongyang.com/Cryptography/ http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation Hashed Message Authentication Codes (HMAC) To avoid attacks against the encrypted data while it is in transit the CryptoDataFormat can also calculate a Message Authentication Code for the encrypted exchange contents based on a configurable MAC algorithm. The calculated HMAC is appended to the stream after encryption. It is separated from the stream in the decryption phase. The MAC is recalculated
[CONF] Apache Camel Camel 2.13.0 Release
Camel 2.13.0 Release Page edited by Claus Ibsen Changes (1) ... * Fixed {{requestTimeout}} on [Netty] not triggering when we have received message. * Fixed [Parameter Binding Annotations] on boolean types to evaluate as [Predicate] instead of [_expression_] * Fixed using [File|File2] consumer with {{delete=truereadLock=fileLock}} not being able to delete the file on Windows. h3. New [Enterprise Integration Patterns] ... Full Content Camel 2.13.0 release (currently in progress) New and Noteworthy Welcome to the 2.13.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...) When using multiple OSGi Blueprint cm:property-placeholder's then Camel now favors using non-default placeholders, or the last property-placeholder defined in the Blueprint XML file. This allows for example to define default properties in one placeholder, and override these values in other placeholders. FTP consumer allow to download a single named file without using the FTP LIST command. This allows to download a known file from a FTP server even when the user account does not have permission to do FTP LIST command. FTP consumer allow to ignore file not found or insufficient file permission errors. Data Format using marshal now leverages Stream caching out of the box if enabled, which allows to marshal big streams and spool to disk, instead of being pure in-memory based. Improved using Bean when the bean is looked up in the Registry, when using concurrent processing in the route. Added cache option to beanRef and bean in the DSL. This avoids looking up the Bean from the Registry on each usage; this can safely be done for singleton beans. Configuring Data Formats in XML attributes now supports reference lookup using the # syntax, eg jaxb xmlStreamWriterWrapper="#myWriterWrapper" .. Fixed Issues Fixed an ArrayIndexOutOfBoundsException with Message History when using SEDA Fixed requestTimeout on Netty not triggering when we have received message. Fixed Parameter Binding Annotations on boolean types to evaluate as Predicate instead of _expression_ Fixed using File consumer with delete=truereadLock=fileLock not being able to delete the file on Windows. New Enterprise Integration Patterns New Components New DSL New Annotations New Data Formats New Languages New Examples New Tutorials API changes Known Issues Dependency Upgrades X to Y Internal changes TODO Changes that may affect end users TODO Important changes to consider when upgrading If using groupedExchanges option on Aggregate EIP then the Exchanges is now stored on the message body as well. The old way of storing as a property is considered deprecated. See more details at Aggregate. Getting the Distributions Binary Distributions Description Download Link PGP Signature file of download Windows Distribution apache-camel-2.13.0.zip apache-camel-2.13.0.zip.asc Unix/Linux/Cygwin Distribution apache-camel-2.13.0.tar.gz apache-camel-2.13.0.tar.gz.asc The above URLs use redirectionThe above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox Source Distributions Description Download Link PGP Signature file of download Source for Windows apache-camel-2.13.0-src.zip apache-camel-2.13.0-src.zip.asc Source for Unix/Linux/Cygwin apache-camel-2.13.0-src.tar.gz apache-camel-2.13.0-src.tar.gz.asc Getting the Binaries using Maven 2 To use this release in your maven project, the proper dependency configuration that you should use in your Maven POM is: dependency groupIdorg.apache.camel/groupId artifactIdcamel-core/artifactId version2.13.0/version /dependency SVN Tag Checkout svn co http://svn.apache.org/repos/asf/camel/tags/camel-2.13.0 Changelog For a more detailed view of new features and bug fixes, see the: TODO: fix me release notes for 2.13.0 Stop watching space | Change email notification preferences View Online | View Changes | Add Comment
[1/2] git commit: CAMEL-6750: Fixed readLock=fileLockdelete=true for file consumer not being able to delete file on Windows.
Updated Branches: refs/heads/camel-2.12.x a971b79da - 6a5fbc126 refs/heads/master 302133ed3 - 4737cc841 CAMEL-6750: Fixed readLock=fileLockdelete=true for file consumer not being able to delete file on Windows. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4737cc84 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4737cc84 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4737cc84 Branch: refs/heads/master Commit: 4737cc84150397a841210ac5b511c09b33835adc Parents: 302133e Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 17:00:35 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 17:01:20 2013 +0200 -- .../file/strategy/GenericFileDeleteProcessStrategy.java | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/4737cc84/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileDeleteProcessStrategy.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileDeleteProcessStrategy.java b/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileDeleteProcessStrategy.java index b2ccb8e..524363f 100644 --- a/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileDeleteProcessStrategy.java +++ b/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileDeleteProcessStrategy.java @@ -50,6 +50,14 @@ public class GenericFileDeleteProcessStrategyT extends GenericFileProcessStrat @Override public void commit(GenericFileOperationsT operations, GenericFileEndpointT endpoint, Exchange exchange, GenericFileT file) throws Exception { + +// special for file lock strategy as we must release that lock first before we can delete the file +boolean releaseEager = exclusiveReadLockStrategy instanceof FileLockExclusiveReadLockStrategy; + +if (releaseEager) { +exclusiveReadLockStrategy.releaseExclusiveReadLock(operations, file, exchange); +} + try { deleteLocalWorkFile(exchange); operations.releaseRetreivedFileResources(exchange); @@ -82,7 +90,7 @@ public class GenericFileDeleteProcessStrategyT extends GenericFileProcessStrat } } finally { // must release lock last -if (exclusiveReadLockStrategy != null) { +if (!releaseEager exclusiveReadLockStrategy != null) { exclusiveReadLockStrategy.releaseExclusiveReadLock(operations, file, exchange); } }
svn commit: r878661 - in /websites/production/camel/content: book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache camel-2130-release.html crypto.html
Author: buildbot Date: Mon Sep 16 16:21:09 2013 New Revision: 878661 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/camel-2130-release.html websites/production/camel/content/crypto.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 Mon Sep 16 16:21:09 2013 @@ -3623,7 +3623,7 @@ from(direct:hmac-algorithm) ]]/script /div/div -pA list of the available alrorithms in Java 7 is available via a shape=rect class=external-link href=http://pic.dhe.ibm.com/infocenter/java7sdk/v7r0/index.jsp?topic=%2Fcom.ibm.java.security.component.doc%2Fsecurity-component%2FJceDocs%2Fapi_standardnames.html; rel=nofollowIBM's Security Information for Java 7/a guide./p +pA list of the available algorithms in Java 7 is available via the a shape=rect class=external-link href=http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html; rel=nofollowJava Cryptography Architecture Standard Algorithm Name Documentation/a./p h3a shape=rect name=BookDataFormatAppendix-SpecifyinganInitializationVector/aSpecifying an Initialization Vector/h3 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 Mon Sep 16 16:21:09 2013 @@ -14722,7 +14722,7 @@ from(direct:hmac-algorithm) ]]/script /div/div -pA list of the available alrorithms in Java 7 is available via a shape=rect class=external-link href=http://pic.dhe.ibm.com/infocenter/java7sdk/v7r0/index.jsp?topic=%2Fcom.ibm.java.security.component.doc%2Fsecurity-component%2FJceDocs%2Fapi_standardnames.html; rel=nofollowIBM's Security Information for Java 7/a guide./p +pA list of the available algorithms in Java 7 is available via the a shape=rect class=external-link href=http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html; rel=nofollowJava Cryptography Architecture Standard Algorithm Name Documentation/a./p h3a shape=rect name=BookInOnePage-SpecifyinganInitializationVector/aSpecifying an Initialization Vector/h3 Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2130-release.html == --- websites/production/camel/content/camel-2130-release.html (original) +++ websites/production/camel/content/camel-2130-release.html Mon Sep 16 16:21:09 2013 @@ -99,7 +99,7 @@ h3a shape=rect name=Camel2.13.0Release-FixedIssues/aFixed Issues/h3 -ulliFixed an ttArrayIndexOutOfBoundsException/tt with a shape=rect href=message-history.html title=Message HistoryMessage History/a when using a shape=rect href=seda.html title=SEDASEDA/a/liliFixed ttrequestTimeout/tt on a shape=rect href=netty.html title=NettyNetty/a not triggering when we have received message./liliFixed a shape=rect href=parameter-binding-annotations.html title=Parameter Binding AnnotationsParameter Binding Annotations/a on boolean types to evaluate as a shape=rect href=predicate.html title=PredicatePredicate/a instead of a shape=rect href=expression.html title=ExpressionExpression/a/li/ul +ulliFixed an ttArrayIndexOutOfBoundsException/tt with a shape=rect href=message-history.html title=Message HistoryMessage History/a when using a shape=rect href=seda.html title=SEDASEDA/a/liliFixed ttrequestTimeout/tt on a shape=rect href=netty.html title=NettyNetty/a not triggering when we have received message./liliFixed a shape=rect href=parameter-binding-annotations.html title=Parameter Binding AnnotationsParameter Binding Annotations/a on boolean types to evaluate as a shape=rect href=predicate.html title=PredicatePredicate/a instead of a shape=rect href=expression.html title=ExpressionExpression/a/liliFixed using a shape=rect href=file2.html title=File2File/a consumer with ttdelete=trueamp;readLock=fileLock/tt not being able to delete the file on Windows./li/ul h3a shape=rect name=Camel2.13.0Release-NewEnterpriseIntegrationPatterns/aNew a shape=rect href=enterprise-integration-patterns.html title=Enterprise Integration PatternsEnterprise Integration Patterns/a/h3 Modified: websites/production/camel/content/crypto.html ==
[2/2] git commit: CAMEL-6750: Fixed readLock=fileLockdelete=true for file consumer not being able to delete file on Windows.
CAMEL-6750: Fixed readLock=fileLockdelete=true for file consumer not being able to delete file on Windows. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6a5fbc12 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6a5fbc12 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6a5fbc12 Branch: refs/heads/camel-2.12.x Commit: 6a5fbc126f4f2c2387407b0a2ed2ab7881dfc75b Parents: a971b79 Author: Claus Ibsen davscl...@apache.org Authored: Mon Sep 16 17:00:35 2013 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Mon Sep 16 17:35:47 2013 +0200 -- .../file/strategy/GenericFileDeleteProcessStrategy.java | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/6a5fbc12/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileDeleteProcessStrategy.java -- diff --git a/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileDeleteProcessStrategy.java b/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileDeleteProcessStrategy.java index b2ccb8e..524363f 100644 --- a/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileDeleteProcessStrategy.java +++ b/camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileDeleteProcessStrategy.java @@ -50,6 +50,14 @@ public class GenericFileDeleteProcessStrategyT extends GenericFileProcessStrat @Override public void commit(GenericFileOperationsT operations, GenericFileEndpointT endpoint, Exchange exchange, GenericFileT file) throws Exception { + +// special for file lock strategy as we must release that lock first before we can delete the file +boolean releaseEager = exclusiveReadLockStrategy instanceof FileLockExclusiveReadLockStrategy; + +if (releaseEager) { +exclusiveReadLockStrategy.releaseExclusiveReadLock(operations, file, exchange); +} + try { deleteLocalWorkFile(exchange); operations.releaseRetreivedFileResources(exchange); @@ -82,7 +90,7 @@ public class GenericFileDeleteProcessStrategyT extends GenericFileProcessStrat } } finally { // must release lock last -if (exclusiveReadLockStrategy != null) { +if (!releaseEager exclusiveReadLockStrategy != null) { exclusiveReadLockStrategy.releaseExclusiveReadLock(operations, file, exchange); } }
[1/2] git commit: adjust the apache-rat-plugin configuration
Updated Branches: refs/heads/camel-2.9.x d34d6d43b - 19b0e0149 adjust the apache-rat-plugin configuration Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8869a739 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8869a739 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8869a739 Branch: refs/heads/camel-2.9.x Commit: 8869a7391e6d2319e8ba87639989a0f5d23f3c34 Parents: d34d6d4 Author: cmueller cmuel...@apache.org Authored: Sun Sep 15 17:21:43 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Sun Sep 15 17:21:43 2013 +0200 -- pom.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/8869a739/pom.xml -- diff --git a/pom.xml b/pom.xml index cc65b2d..428d3d9 100755 --- a/pom.xml +++ b/pom.xml @@ -535,6 +535,7 @@ exclude**/.settings/**/*/exclude exclude**/*.iml/exclude exclude.idea/**/*/exclude +exclude**/examples/*/src/**/data/**/*.xml/exclude /excludes /configuration /plugin
[2/2] git commit: update the maven-release-plugin configuration to use our GIT repo
update the maven-release-plugin configuration to use our GIT repo Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/19b0e014 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/19b0e014 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/19b0e014 Branch: refs/heads/camel-2.9.x Commit: 19b0e0149d8950eb38f94598826178b5385ef5b9 Parents: 8869a73 Author: cmueller cmuel...@apache.org Authored: Mon Sep 16 19:39:05 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Mon Sep 16 19:39:05 2013 +0200 -- pom.xml | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/19b0e014/pom.xml -- diff --git a/pom.xml b/pom.xml index 428d3d9..042ad26 100755 --- a/pom.xml +++ b/pom.xml @@ -120,11 +120,11 @@ /modules scm - connectionscm:svn:https://svn.apache.org/repos/asf/camel/branches/camel-2.9.x/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/camel/branches/camel-2.9.x/developerConnection -urlhttp://svn.apache.org/viewvc/camel/branches/camel-2.9.x//url + connectionscm:git:http://git-wip-us.apache.org/repos/asf/camel.git/connection + developerConnectionscm:git:https://git-wip-us.apache.org/repos/asf/camel.git/developerConnection +urlhttps://fisheye6.atlassian.com/browse/~br=camel-2.9.x/camel-git/url /scm - + build defaultGoalinstall/defaultGoal @@ -204,9 +204,12 @@ plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-release-plugin/artifactId - version2.2.1/version + !-- see http://jira.codehaus.org/browse/MRELEASE-812 -- + version2.4.1/version configuration -tagBasehttps://svn.apache.org/repos/asf/camel/tags/tagBase +localCheckouttrue/localCheckout +pushChangestrue/pushChanges + tagNameFormat@{project.artifactId}-@{project.version}/tagNameFormat useReleaseProfilefalse/useReleaseProfile preparationGoalsclean install/preparationGoals goalsdeploy/goals @@ -214,7 +217,7 @@ autoVersionSubmodulestrue/autoVersionSubmodules /configuration /plugin - + plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-shade-plugin/artifactId
[CONF] Apache Camel CDI
CDI Page edited by Christian Mueller Changes (1) ... h3. Dependency Injecting Camel with CDI Basically, two things should be done to use Apache Camel in a CDI environment. First, we just need to create a [BootStrap|https://github.com/cmoulliard/cdi-camel/blob/master/src/main/java/com/fusesource/cdi/camel/simple/BootStrap.java] class which will be use by the Java EE 6 container or Java SE to start the Camel Context. The [CdiCamelContext|https://svn.apache.org/repos/asf/camel/trunk/components/camel-cdi/src/main/java/org/apache/camel/component/cdi/CdiCamelContext.java] [CdiCamelContext|https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-cdi/src/main/java/org/apache/camel/cdi/CdiCamelContext.java;h=0d863bc8f5aa521b15955c26a512cdec09e366e9;hb=HEAD] when instantiated will add a CDI [Bean Registry|http://docs.oracle.com/javaee/6/api/javax/enterprise/inject/spi/BeanManager.html]. That will allow Camel to perform lookup of beans injected and registered in CDI container. Next, we must add CDI annotated beans (@inject, @named, ...) to use them from the Apache Camel routes. h3. Bootstrapping Camel with CDI container ... Full Content Camel CDI As of 2.10 we now have support Contexts and Dependency Injection - JSR299 and Dependency Injection for Java - JSR330 as a dependency injection framework. This offers new opportunities to develop and deploy Apache Camel projects in Java EE 6 containers but also in standalone Java SE or CDI container The current project is under active development and does not provide all the features that we have with injection frameworks like Spring or Blueprint Dependency Injecting Camel with CDI Basically, two things should be done to use Apache Camel in a CDI environment. First, we just need to create a BootStrap class which will be use by the Java EE 6 container or Java SE to start the Camel Context. The CdiCamelContext when instantiated will add a CDI Bean Registry. That will allow Camel to perform lookup of beans injected and registered in CDI container. Next, we must add CDI annotated beans (@inject, @named, ...) to use them from the Apache Camel routes. Bootstrapping Camel with CDI container The following example shows how we can bootstrap an Apache Camel Context in a Boot Strap class. This class contains important annotations like the javax.ejb.Singleton. This annotation will tell the container to create a Singleton instance of the BootStrapClass class. This mechanism is similar to Bean instance creation that we have with Spring framework. By combining this annotation with javax.ejb.Startup, the container will start the camel context at the startup of the CDI container. @Singleton @Startup public class BootStrap { ... When the @PreConstruct annotation is called, then we inject a CdiCamelContext objet, register a SimpleCamelRoute using @Inject annotation and starts the Camel Route. @PostConstruct public void init() throws Exception { logger.info(" Create CamelContext and register Camel Route."); // Define Timer URI simpleRoute.setTimerUri("timer://simple?fixedRate=trueperiod=10s"); // Add Camel Route camelCtx.addRoutes(simpleRoute); // Start Camel Context camelCtx.start(); When you look to the following Camel Route code, you can see that we do a lookup to find a bean "helloWorld" which has been injected. This is possible because the CdiCamelContext registers a Camel Registry containing a reference to a CDI BeanManager. @Override public void configure() throws Exception { from(timerUri) .setBody() .simple("Bean Injected") // Lookup for bean injected by CDI container // The HellowWorld class is annotated using @Named .beanRef("helloWorld", "sayHello") .log(" Response : ${body}"); } Here is the code of the HelloWorld Bean @Named public class HelloWorld { public String sayHello(@Body String message) { return " Hello " + message + " user."; } } This project is started using the GlassFish maven plugin but alternatively, you can deploy the war file produced in any Java EE 6 servers : Glassfish, JBoss AS 7, OpenEJB, Apache TomEE or Apache KarafEE or using a Java SE. See Also Simple Camel CDI BootStrap project JSR299 and JSR330 reference documentations Apache DeltaSpike project - CDI extensions and JavaSE BootStrap CDI revealed by Antonio Goncalves - part 1, part 2, part 3 and OpenEJB team - see examples Apache implementation of the specs JSR299, 330 - OpenWebbeans and Apache OpenEJB which provide the container to deploy CDI projects
git commit: CAMEL-6758: Null Pointer exception when removing SjmsComponent
Updated Branches: refs/heads/camel-2.12.x 6a5fbc126 - bf683c9c4 CAMEL-6758: Null Pointer exception when removing SjmsComponent Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bf683c9c Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bf683c9c Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bf683c9c Branch: refs/heads/camel-2.12.x Commit: bf683c9c45dbc6d6b8818a0497082b9fef22a032 Parents: 6a5fbc1 Author: cmueller cmuel...@apache.org Authored: Mon Sep 16 22:06:31 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Mon Sep 16 22:06:31 2013 +0200 -- .../main/java/org/apache/camel/component/sjms/SjmsComponent.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/bf683c9c/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java -- diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java index 869d5f4..8489d77 100644 --- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java +++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java @@ -140,7 +140,9 @@ public class SjmsComponent extends UriEndpointComponent implements HeaderFilterS @Override protected void doStop() throws Exception { -timedTaskManager.cancelTasks(); +if (timedTaskManager != null) { +timedTaskManager.cancelTasks(); +} if (getConnectionResource() != null) { if (getConnectionResource() instanceof ConnectionFactoryResource) {
[CONF] Apache Camel CDI
CDI Page edited by Christian Mueller Changes (1) ... * Simple [Camel CDI BootStrap project|https://github.com/cmoulliard/cdi-camel-example/] * [JSR299|http://docs.jboss.org/weld/reference/1.1.5.Final/en-US/html_single/] and [JSR330|http://openwebbeans.apache.org/owb/jsr330.html] reference documentations * [Apache DeltaSpike project|http://incubator.apache.org/deltaspike/] project|http://deltaspike.apache.org] - CDI extensions and JavaSE BootStrap * CDI revealed by Antonio Goncalves - [part 1|https://agoncal.wordpress.com/2011/04/07/injection-with-cdi-part-i/], [part 2|https://agoncal.wordpress.com/2011/05/03/injection-with-cdi-part-ii/], [part 3|https://agoncal.wordpress.com/2011/09/25/injection-with-cdi-part-iii/] and OpenEJB team - see [examples|http://openejb.apache.org/examples-trunk/index.html] * Apache implementation of the specs JSR299, 330 - [OpenWebbeans|http://openwebbeans.apache.org/owb/index.html] and Apache [OpenEJB|http://openejb.apache.org/] which provide the container to deploy CDI projects ... Full Content Camel CDI As of 2.10 we now have support Contexts and Dependency Injection - JSR299 and Dependency Injection for Java - JSR330 as a dependency injection framework. This offers new opportunities to develop and deploy Apache Camel projects in Java EE 6 containers but also in standalone Java SE or CDI container The current project is under active development and does not provide all the features that we have with injection frameworks like Spring or Blueprint Dependency Injecting Camel with CDI Basically, two things should be done to use Apache Camel in a CDI environment. First, we just need to create a BootStrap class which will be use by the Java EE 6 container or Java SE to start the Camel Context. The CdiCamelContext when instantiated will add a CDI Bean Registry. That will allow Camel to perform lookup of beans injected and registered in CDI container. Next, we must add CDI annotated beans (@inject, @named, ...) to use them from the Apache Camel routes. Bootstrapping Camel with CDI container The following example shows how we can bootstrap an Apache Camel Context in a Boot Strap class. This class contains important annotations like the javax.ejb.Singleton. This annotation will tell the container to create a Singleton instance of the BootStrapClass class. This mechanism is similar to Bean instance creation that we have with Spring framework. By combining this annotation with javax.ejb.Startup, the container will start the camel context at the startup of the CDI container. @Singleton @Startup public class BootStrap { ... When the @PreConstruct annotation is called, then we inject a CdiCamelContext objet, register a SimpleCamelRoute using @Inject annotation and starts the Camel Route. @PostConstruct public void init() throws Exception { logger.info(" Create CamelContext and register Camel Route."); // Define Timer URI simpleRoute.setTimerUri("timer://simple?fixedRate=trueperiod=10s"); // Add Camel Route camelCtx.addRoutes(simpleRoute); // Start Camel Context camelCtx.start(); When you look to the following Camel Route code, you can see that we do a lookup to find a bean "helloWorld" which has been injected. This is possible because the CdiCamelContext registers a Camel Registry containing a reference to a CDI BeanManager. @Override public void configure() throws Exception { from(timerUri) .setBody() .simple("Bean Injected") // Lookup for bean injected by CDI container // The HellowWorld class is annotated using @Named .beanRef("helloWorld", "sayHello") .log(" Response : ${body}"); } Here is the code of the HelloWorld Bean @Named public class HelloWorld { public String sayHello(@Body String message) { return " Hello " + message + " user."; } } This project is started using the GlassFish maven plugin but alternatively, you can deploy the war file produced in any Java EE 6 servers : Glassfish, JBoss AS 7, OpenEJB, Apache TomEE or Apache KarafEE or using a Java SE. See Also Simple Camel CDI BootStrap project JSR299 and JSR330 reference documentations Apache DeltaSpike project - CDI extensions and JavaSE BootStrap CDI revealed by Antonio Goncalves - part 1, part 2, part 3 and OpenEJB team - see examples Apache implementation of the specs JSR299, 330 - OpenWebbeans and Apache OpenEJB which provide the container to deploy CDI projects Apache Karaf featured with OpenEJB and CDI - Apache KarafEE Stop watching space
git commit: CAMEL-6758: Null Pointer exception when removing SjmsComponent
Updated Branches: refs/heads/master 4737cc841 - ed0ca3d31 CAMEL-6758: Null Pointer exception when removing SjmsComponent Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ed0ca3d3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ed0ca3d3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ed0ca3d3 Branch: refs/heads/master Commit: ed0ca3d31a26e5ade7b9cdd39817cc6a59e1958b Parents: 4737cc8 Author: cmueller cmuel...@apache.org Authored: Mon Sep 16 22:06:31 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Mon Sep 16 22:07:57 2013 +0200 -- .../main/java/org/apache/camel/component/sjms/SjmsComponent.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/ed0ca3d3/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java -- diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java index 869d5f4..8489d77 100644 --- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java +++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java @@ -140,7 +140,9 @@ public class SjmsComponent extends UriEndpointComponent implements HeaderFilterS @Override protected void doStop() throws Exception { -timedTaskManager.cancelTasks(); +if (timedTaskManager != null) { +timedTaskManager.cancelTasks(); +} if (getConnectionResource() != null) { if (getConnectionResource() instanceof ConnectionFactoryResource) {
git commit: CAMEL-6758: Null Pointer exception when removing SjmsComponent
Updated Branches: refs/heads/camel-2.11.x 0acff1b0a - 31960541c CAMEL-6758: Null Pointer exception when removing SjmsComponent Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/31960541 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/31960541 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/31960541 Branch: refs/heads/camel-2.11.x Commit: 31960541c0d66ce262dc20b5a19cd46bd3c098b6 Parents: 0acff1b Author: cmueller cmuel...@apache.org Authored: Mon Sep 16 22:06:31 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Mon Sep 16 22:09:08 2013 +0200 -- .../main/java/org/apache/camel/component/sjms/SjmsComponent.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/31960541/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java -- diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java index f0d5957..d5edb94 100644 --- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java +++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java @@ -136,7 +136,9 @@ public class SjmsComponent extends DefaultComponent implements HeaderFilterStrat @Override protected void doStop() throws Exception { -timedTaskManager.cancelTasks(); +if (timedTaskManager != null) { +timedTaskManager.cancelTasks(); +} if (getConnectionResource() != null) { if (getConnectionResource() instanceof ConnectionFactoryResource) {
[CONF] Apache Camel CDI
CDI Page edited by Christian Mueller Changes (1) ... * [Apache DeltaSpike project|http://deltaspike.apache.org] - CDI extensions and JavaSE BootStrap * CDI revealed by Antonio Goncalves - [part 1|https://agoncal.wordpress.com/2011/04/07/injection-with-cdi-part-i/], [part 2|https://agoncal.wordpress.com/2011/05/03/injection-with-cdi-part-ii/], [part 3|https://agoncal.wordpress.com/2011/09/25/injection-with-cdi-part-iii/] and OpenEJB team - see [examples|http://openejb.apache.org/examples-trunk/index.html] * Apache implementation of the specs JSR299, 330 - [OpenWebbeans|http://openwebbeans.apache.org/owb/index.html] and Apache [OpenEJB|http://openejb.apache.org/] which provide the container to deploy CDI projects * Apache Karaf featured with OpenEJB and CDI - [Apache KarafEE|https://svn.apache.org/repos/asf/openejb/trunk/openejb/osgi/] Full Content Camel CDI As of 2.10 we now have support Contexts and Dependency Injection - JSR299 and Dependency Injection for Java - JSR330 as a dependency injection framework. This offers new opportunities to develop and deploy Apache Camel projects in Java EE 6 containers but also in standalone Java SE or CDI container The current project is under active development and does not provide all the features that we have with injection frameworks like Spring or Blueprint Dependency Injecting Camel with CDI Basically, two things should be done to use Apache Camel in a CDI environment. First, we just need to create a BootStrap class which will be use by the Java EE 6 container or Java SE to start the Camel Context. The CdiCamelContext when instantiated will add a CDI Bean Registry. That will allow Camel to perform lookup of beans injected and registered in CDI container. Next, we must add CDI annotated beans (@inject, @named, ...) to use them from the Apache Camel routes. Bootstrapping Camel with CDI container The following example shows how we can bootstrap an Apache Camel Context in a Boot Strap class. This class contains important annotations like the javax.ejb.Singleton. This annotation will tell the container to create a Singleton instance of the BootStrapClass class. This mechanism is similar to Bean instance creation that we have with Spring framework. By combining this annotation with javax.ejb.Startup, the container will start the camel context at the startup of the CDI container. @Singleton @Startup public class BootStrap { ... When the @PreConstruct annotation is called, then we inject a CdiCamelContext objet, register a SimpleCamelRoute using @Inject annotation and starts the Camel Route. @PostConstruct public void init() throws Exception { logger.info(" Create CamelContext and register Camel Route."); // Define Timer URI simpleRoute.setTimerUri("timer://simple?fixedRate=trueperiod=10s"); // Add Camel Route camelCtx.addRoutes(simpleRoute); // Start Camel Context camelCtx.start(); When you look to the following Camel Route code, you can see that we do a lookup to find a bean "helloWorld" which has been injected. This is possible because the CdiCamelContext registers a Camel Registry containing a reference to a CDI BeanManager. @Override public void configure() throws Exception { from(timerUri) .setBody() .simple("Bean Injected") // Lookup for bean injected by CDI container // The HellowWorld class is annotated using @Named .beanRef("helloWorld", "sayHello") .log(" Response : ${body}"); } Here is the code of the HelloWorld Bean @Named public class HelloWorld { public String sayHello(@Body String message) { return " Hello " + message + " user."; } } This project is started using the GlassFish maven plugin but alternatively, you can deploy the war file produced in any Java EE 6 servers : Glassfish, JBoss AS 7, OpenEJB, Apache TomEE or Apache KarafEE or using a Java SE. See Also Simple Camel CDI BootStrap project JSR299 and JSR330 reference documentations Apache DeltaSpike project - CDI extensions and JavaSE BootStrap CDI revealed by Antonio Goncalves - part 1, part 2, part 3 and OpenEJB team - see examples Apache implementation of the specs JSR299, 330 - OpenWebbeans and Apache OpenEJB which provide the container to deploy CDI projects Apache Karaf featured with OpenEJB and CDI - Apache KarafEE Stop watching space | Change email notification preferences View Online | View Changes | Add Comment
svn commit: r878718 - in /websites/production/camel/content: cache/main.pageCache cdi.html
Author: buildbot Date: Mon Sep 16 20:19:00 2013 New Revision: 878718 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/cdi.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/cdi.html == --- websites/production/camel/content/cdi.html (original) +++ websites/production/camel/content/cdi.html Mon Sep 16 20:19:00 2013 @@ -86,13 +86,13 @@ td valign=top width=100% div class=wiki-content maincontenth2a shape=rect name=CDI-CamelCDI/aCamel CDI/h2 -pAs of 2.10 we now have support a shape=rect class=external-link href=http://jcp.org/en/jsr/detail?id=299; rel=nofollowContexts and Dependency Injection - JSR299/a and a shape=rect class=external-link href=http://jcp.org/en/jsr/detail?id=330; rel=nofollowDependency Injection for Java - JSR330/a as a dependency injection framework. This offers new opportunities to develop and deploy Apache Camel projects in a shape=rect class=external-link href=http://en.wikipedia.org/wiki/Java_Platform,_Enterprise_Edition; rel=nofollowJava EE 6 containers/a but also in standalone Java SE or a shape=rect class=external-link href=http://openwebbeans.apache.org/owb/index.html;CDI container/a /p +pAs of 2.10 we now have support a shape=rect class=external-link href=http://jcp.org/en/jsr/detail?id=299; rel=nofollowContexts and Dependency Injection - JSR299/a and a shape=rect class=external-link href=http://jcp.org/en/jsr/detail?id=330; rel=nofollowDependency Injection for Java - JSR330/a as a dependency injection framework. This offers new opportunities to develop and deploy Apache Camel projects in a shape=rect class=external-link href=http://en.wikipedia.org/wiki/Java_Platform,_Enterprise_Edition; rel=nofollowJava EE 6 containers/a but also in standalone Java SE or a shape=rect class=external-link href=http://openwebbeans.apache.org;CDI container/a /p pThe current project is under active development and does not provide all the features that we have with injection frameworks like Spring or Blueprint /p h3a shape=rect name=CDI-DependencyInjectingCamelwithCDI/aDependency Injecting Camel with CDI/h3 -pBasically, two things should be done to use Apache Camel in a CDI environment. First, we just need to create a a shape=rect class=external-link href=https://github.com/cmoulliard/cdi-camel/blob/master/src/main/java/com/fusesource/cdi/camel/simple/BootStrap.java; rel=nofollowBootStrap/a class which will be use by the Java EE 6 container or Java SE to start the Camel Context. The a shape=rect class=external-link href=https://svn.apache.org/repos/asf/camel/trunk/components/camel-cdi/src/main/java/org/apache/camel/component/cdi/CdiCamelContext.java;CdiCamelContext/a when instantiated will add a CDI a shape=rect class=external-link href=http://docs.oracle.com/javaee/6/api/javax/enterprise/inject/spi/BeanManager.html; rel=nofollowBean Registry/a. That will allow Camel to perform lookup of beans injected and registered in CDI container. Next, we must add CDI annotated beans (@inject, @named, ...) to use them from the Apache Camel routes./p +pBasically, two things should be done to use Apache Camel in a CDI environment. First, we just need to create a a shape=rect class=external-link href=https://github.com/cmoulliard/cdi-camel/blob/master/src/main/java/com/fusesource/cdi/camel/simple/BootStrap.java; rel=nofollowBootStrap/a class which will be use by the Java EE 6 container or Java SE to start the Camel Context. The a shape=rect class=external-link href=https://git-wip-us.apache.org/repos/asf?p=camel.git;a=blob;f=components/camel-cdi/src/main/java/org/apache/camel/cdi/CdiCamelContext.java;h=0d863bc8f5aa521b15955c26a512cdec09e366e9;hb=HEAD;CdiCamelContext/a when instantiated will add a CDI a shape=rect class=external-link href=http://docs.oracle.com/javaee/6/api/javax/enterprise/inject/spi/BeanManager.html; rel=nofollowBean Registry/a. That will allow Camel to perform lookup of beans injected and registered in CDI container. Next, we must add CDI annotated beans (@inject, @named, ...) to use them from the Apache Camel routes./p h3a shape=rect name=CDI-BootstrappingCamelwithCDIcontainer/aBootstrapping Camel with CDI container/h3 @@ -165,7 +165,7 @@ public class HelloWorld { h3a shape=rect name=CDI-SeeAlso/aSee Also/h3 -ulliSimple a shape=rect class=external-link href=https://github.com/cmoulliard/cdi-camel-example/; rel=nofollowCamel CDI BootStrap project/a/lilia shape=rect class=external-link href=http://docs.jboss.org/weld/reference/1.1.5.Final/en-US/html_single/; rel=nofollowJSR299/a and a shape=rect class=external-link
[CONF] Apache Camel CDI
CDI Page edited by Christian Mueller Changes (1) h2. Camel CDI As of 2.10 we now have support [Contexts and Dependency Injection - JSR299|http://jcp.org/en/jsr/detail?id=299] and [Dependency Injection for Java - JSR330|http://jcp.org/en/jsr/detail?id=330] as a dependency injection framework. This offers new opportunities to develop and deploy Apache Camel projects in [Java EE 6 containers|http://en.wikipedia.org/wiki/Java_Platform,_Enterprise_Edition] but also in standalone Java SE or [CDI container|http://openwebbeans.apache.org/owb/index.html] The current project is under active development and does not provide all the features that we have with injection frameworks like Spring or Blueprint ... Full Content Camel CDI As of 2.10 we now have support Contexts and Dependency Injection - JSR299 and Dependency Injection for Java - JSR330 as a dependency injection framework. This offers new opportunities to develop and deploy Apache Camel projects in Java EE 6 containers but also in standalone Java SE or CDI container The current project is under active development and does not provide all the features that we have with injection frameworks like Spring or Blueprint Dependency Injecting Camel with CDI Basically, two things should be done to use Apache Camel in a CDI environment. First, we just need to create a BootStrap class which will be use by the Java EE 6 container or Java SE to start the Camel Context. The CdiCamelContext when instantiated will add a CDI Bean Registry. That will allow Camel to perform lookup of beans injected and registered in CDI container. Next, we must add CDI annotated beans (@inject, @named, ...) to use them from the Apache Camel routes. Bootstrapping Camel with CDI container The following example shows how we can bootstrap an Apache Camel Context in a Boot Strap class. This class contains important annotations like the javax.ejb.Singleton. This annotation will tell the container to create a Singleton instance of the BootStrapClass class. This mechanism is similar to Bean instance creation that we have with Spring framework. By combining this annotation with javax.ejb.Startup, the container will start the camel context at the startup of the CDI container. @Singleton @Startup public class BootStrap { ... When the @PreConstruct annotation is called, then we inject a CdiCamelContext objet, register a SimpleCamelRoute using @Inject annotation and starts the Camel Route. @PostConstruct public void init() throws Exception { logger.info(" Create CamelContext and register Camel Route."); // Define Timer URI simpleRoute.setTimerUri("timer://simple?fixedRate=trueperiod=10s"); // Add Camel Route camelCtx.addRoutes(simpleRoute); // Start Camel Context camelCtx.start(); When you look to the following Camel Route code, you can see that we do a lookup to find a bean "helloWorld" which has been injected. This is possible because the CdiCamelContext registers a Camel Registry containing a reference to a CDI BeanManager. @Override public void configure() throws Exception { from(timerUri) .setBody() .simple("Bean Injected") // Lookup for bean injected by CDI container // The HellowWorld class is annotated using @Named .beanRef("helloWorld", "sayHello") .log(" Response : ${body}"); } Here is the code of the HelloWorld Bean @Named public class HelloWorld { public String sayHello(@Body String message) { return " Hello " + message + " user."; } } This project is started using the GlassFish maven plugin but alternatively, you can deploy the war file produced in any Java EE 6 servers : Glassfish, JBoss AS 7, OpenEJB, Apache TomEE or Apache KarafEE or using a Java SE. See Also Simple Camel CDI BootStrap project JSR299 and JSR330 reference documentations Apache DeltaSpike project - CDI extensions and JavaSE BootStrap CDI revealed by Antonio Goncalves - part 1, part 2, part 3 and OpenEJB team - see examples Apache implementation of the specs JSR299, 330 - OpenWebbeans and Apache OpenEJB which provide the container to deploy CDI projects Apache Karaf featured with OpenEJB and CDI - Apache KarafEE Stop watching space | Change email notification preferences View Online | View Changes | Add Comment
[CONF] Apache Camel RabbitMQ
RabbitMQ Page comment added by Dan Revel URI example should be rabbitmq://hostname:port/exchangeName?options Stop watching space | Change email notification preferences View Online | Reply To This
[CONF] Apache Camel Camel 2.13.0 Release
Camel 2.13.0 Release Page edited by willem jiang Changes (2) ... h2. Dependency Upgrades * X to Y * Jetty 7.6.9 to 8.1.12 * Servlet API 2.5 to 3.0 h2. Internal changes ... Full Content Camel 2.13.0 release (currently in progress) New and Noteworthy Welcome to the 2.13.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...) When using multiple OSGi Blueprint cm:property-placeholder's then Camel now favors using non-default placeholders, or the last property-placeholder defined in the Blueprint XML file. This allows for example to define default properties in one placeholder, and override these values in other placeholders. FTP consumer allow to download a single named file without using the FTP LIST command. This allows to download a known file from a FTP server even when the user account does not have permission to do FTP LIST command. FTP consumer allow to ignore file not found or insufficient file permission errors. Data Format using marshal now leverages Stream caching out of the box if enabled, which allows to marshal big streams and spool to disk, instead of being pure in-memory based. Improved using Bean when the bean is looked up in the Registry, when using concurrent processing in the route. Added cache option to beanRef and bean in the DSL. This avoids looking up the Bean from the Registry on each usage; this can safely be done for singleton beans. Configuring Data Formats in XML attributes now supports reference lookup using the # syntax, eg jaxb xmlStreamWriterWrapper="#myWriterWrapper" .. Fixed Issues Fixed an ArrayIndexOutOfBoundsException with Message History when using SEDA Fixed requestTimeout on Netty not triggering when we have received message. Fixed Parameter Binding Annotations on boolean types to evaluate as Predicate instead of _expression_ Fixed using File consumer with delete=truereadLock=fileLock not being able to delete the file on Windows. New Enterprise Integration Patterns New Components New DSL New Annotations New Data Formats New Languages New Examples New Tutorials API changes Known Issues Dependency Upgrades Jetty 7.6.9 to 8.1.12 Servlet API 2.5 to 3.0 Internal changes TODO Changes that may affect end users TODO Important changes to consider when upgrading If using groupedExchanges option on Aggregate EIP then the Exchanges is now stored on the message body as well. The old way of storing as a property is considered deprecated. See more details at Aggregate. Getting the Distributions Binary Distributions Description Download Link PGP Signature file of download Windows Distribution apache-camel-2.13.0.zip apache-camel-2.13.0.zip.asc Unix/Linux/Cygwin Distribution apache-camel-2.13.0.tar.gz apache-camel-2.13.0.tar.gz.asc The above URLs use redirectionThe above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox Source Distributions Description Download Link PGP Signature file of download Source for Windows apache-camel-2.13.0-src.zip apache-camel-2.13.0-src.zip.asc Source for Unix/Linux/Cygwin apache-camel-2.13.0-src.tar.gz apache-camel-2.13.0-src.tar.gz.asc Getting the Binaries using Maven 2 To use this release in your maven project, the proper dependency configuration that you should use in your Maven POM is: dependency groupIdorg.apache.camel/groupId artifactIdcamel-core/artifactId version2.13.0/version /dependency SVN Tag Checkout svn co http://svn.apache.org/repos/asf/camel/tags/camel-2.13.0 Changelog For a more detailed view of new features and bug fixes, see the: TODO: fix me release notes for 2.13.0 Stop watching space | Change email notification preferences View Online | View Changes | Add Comment
[2/2] git commit: CAMEL-6761 - Upgrade to restlet 2.1
CAMEL-6761 - Upgrade to restlet 2.1 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/df9d866d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/df9d866d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/df9d866d Branch: refs/heads/camel-2.12.x Commit: df9d866da2f56a5c02e237b8d85e7d29af7b32cc Parents: bf683c9 Author: Jonathan Anstey jans...@gmail.com Authored: Mon Sep 16 22:15:36 2013 -0400 Committer: Jonathan Anstey jans...@gmail.com Committed: Mon Sep 16 22:16:20 2013 -0400 -- components/camel-restlet/pom.xml | 14 +++--- .../component/restlet/DefaultRestletBinding.java | 2 +- .../restlet/RestletHeaderFilterStrategy.java | 2 +- .../camel/component/restlet/RestletResponseTest.java | 2 +- parent/pom.xml| 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/df9d866d/components/camel-restlet/pom.xml -- diff --git a/components/camel-restlet/pom.xml b/components/camel-restlet/pom.xml index 1a16eb6..a9653e1 100644 --- a/components/camel-restlet/pom.xml +++ b/components/camel-restlet/pom.xml @@ -57,6 +57,13 @@ version${restlet-version}/version /dependency +dependency + groupIdorg.restlet.jse/groupId + artifactIdorg.restlet.ext.httpclient/artifactId + version${restlet-version}/version + scopetest/scope +/dependency + !-- test dependencies -- dependency groupIdorg.apache.camel/groupId @@ -69,13 +76,6 @@ artifactIdcamel-jetty/artifactId scopetest/scope /dependency - -dependency - groupIdorg.apache.httpcomponents/groupId - artifactIdhttpclient/artifactId - version${httpclient4-version}/version - scopetest/scope -/dependency dependency groupIdorg.slf4j/groupId http://git-wip-us.apache.org/repos/asf/camel/blob/df9d866d/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 f00de32..3a7a9ae 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 @@ -49,7 +49,7 @@ import org.restlet.data.MediaType; import org.restlet.data.Method; import org.restlet.data.Preference; import org.restlet.data.Status; -import org.restlet.engine.http.header.HeaderConstants; +import org.restlet.engine.header.HeaderConstants; import org.restlet.representation.FileRepresentation; import org.restlet.representation.InputRepresentation; import org.slf4j.Logger; http://git-wip-us.apache.org/repos/asf/camel/blob/df9d866d/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java -- diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java index a269169..b873230 100644 --- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java +++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java @@ -18,7 +18,7 @@ package org.apache.camel.component.restlet; import org.apache.camel.Exchange; import org.apache.camel.impl.DefaultHeaderFilterStrategy; -import org.restlet.engine.http.header.HeaderConstants; +import org.restlet.engine.header.HeaderConstants; /** * Default header filtering strategy for Restlet http://git-wip-us.apache.org/repos/asf/camel/blob/df9d866d/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java -- diff --git a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java index 049cc20..5469aa2 100644 --- a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java +++ b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java @@ -29,7 +29,7 @@ import
[1/2] git commit: CAMEL-6761 - Upgrade to restlet 2.1
Updated Branches: refs/heads/camel-2.12.x bf683c9c4 - df9d866da refs/heads/master ed0ca3d31 - 99b40bd77 CAMEL-6761 - Upgrade to restlet 2.1 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/99b40bd7 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/99b40bd7 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/99b40bd7 Branch: refs/heads/master Commit: 99b40bd7705a1dfa54a00c6239c6fd2d8ab8ff0e Parents: ed0ca3d Author: Jonathan Anstey jans...@gmail.com Authored: Mon Sep 16 22:15:36 2013 -0400 Committer: Jonathan Anstey jans...@gmail.com Committed: Mon Sep 16 22:15:45 2013 -0400 -- components/camel-restlet/pom.xml | 14 +++--- .../component/restlet/DefaultRestletBinding.java | 2 +- .../restlet/RestletHeaderFilterStrategy.java | 2 +- .../camel/component/restlet/RestletResponseTest.java | 2 +- parent/pom.xml| 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/99b40bd7/components/camel-restlet/pom.xml -- diff --git a/components/camel-restlet/pom.xml b/components/camel-restlet/pom.xml index 13e814e..5e797a2 100644 --- a/components/camel-restlet/pom.xml +++ b/components/camel-restlet/pom.xml @@ -57,6 +57,13 @@ version${restlet-version}/version /dependency +dependency + groupIdorg.restlet.jse/groupId + artifactIdorg.restlet.ext.httpclient/artifactId + version${restlet-version}/version + scopetest/scope +/dependency + !-- test dependencies -- dependency groupIdorg.apache.camel/groupId @@ -69,13 +76,6 @@ artifactIdcamel-jetty/artifactId scopetest/scope /dependency - -dependency - groupIdorg.apache.httpcomponents/groupId - artifactIdhttpclient/artifactId - version${httpclient4-version}/version - scopetest/scope -/dependency dependency groupIdorg.slf4j/groupId http://git-wip-us.apache.org/repos/asf/camel/blob/99b40bd7/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 f00de32..3a7a9ae 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 @@ -49,7 +49,7 @@ import org.restlet.data.MediaType; import org.restlet.data.Method; import org.restlet.data.Preference; import org.restlet.data.Status; -import org.restlet.engine.http.header.HeaderConstants; +import org.restlet.engine.header.HeaderConstants; import org.restlet.representation.FileRepresentation; import org.restlet.representation.InputRepresentation; import org.slf4j.Logger; http://git-wip-us.apache.org/repos/asf/camel/blob/99b40bd7/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java -- diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java index a269169..b873230 100644 --- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java +++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletHeaderFilterStrategy.java @@ -18,7 +18,7 @@ package org.apache.camel.component.restlet; import org.apache.camel.Exchange; import org.apache.camel.impl.DefaultHeaderFilterStrategy; -import org.restlet.engine.http.header.HeaderConstants; +import org.restlet.engine.header.HeaderConstants; /** * Default header filtering strategy for Restlet http://git-wip-us.apache.org/repos/asf/camel/blob/99b40bd7/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java -- diff --git a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java b/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java index 049cc20..5469aa2 100644 --- a/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java +++
svn commit: r878742 - in /websites/production/camel/content: cache/main.pageCache camel-2130-release.html
Author: buildbot Date: Tue Sep 17 02:19:10 2013 New Revision: 878742 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2130-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2130-release.html == --- websites/production/camel/content/camel-2130-release.html (original) +++ websites/production/camel/content/camel-2130-release.html Tue Sep 17 02:19:10 2013 @@ -124,7 +124,7 @@ h2a shape=rect name=Camel2.13.0Release-DependencyUpgrades/aDependency Upgrades/h2 -ulliX to Y/li/ul +ulliJetty 7.6.9 to 8.1.12/liliServlet API 2.5 to 3.0/li/ul h2a shape=rect name=Camel2.13.0Release-Internalchanges/aInternal changes/h2
[CONF] Apache Camel Camel 2.13.0 Release
Camel 2.13.0 Release Page edited by Jonathan Anstey Changes (1) ... * Jetty 7.6.9 to 8.1.12 * Servlet API 2.5 to 3.0 * Restlet 2.0.15 to 2.1.4 h2. Internal changes ... Full Content Camel 2.13.0 release (currently in progress) New and Noteworthy Welcome to the 2.13.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...) When using multiple OSGi Blueprint cm:property-placeholder's then Camel now favors using non-default placeholders, or the last property-placeholder defined in the Blueprint XML file. This allows for example to define default properties in one placeholder, and override these values in other placeholders. FTP consumer allow to download a single named file without using the FTP LIST command. This allows to download a known file from a FTP server even when the user account does not have permission to do FTP LIST command. FTP consumer allow to ignore file not found or insufficient file permission errors. Data Format using marshal now leverages Stream caching out of the box if enabled, which allows to marshal big streams and spool to disk, instead of being pure in-memory based. Improved using Bean when the bean is looked up in the Registry, when using concurrent processing in the route. Added cache option to beanRef and bean in the DSL. This avoids looking up the Bean from the Registry on each usage; this can safely be done for singleton beans. Configuring Data Formats in XML attributes now supports reference lookup using the # syntax, eg jaxb xmlStreamWriterWrapper="#myWriterWrapper" .. Fixed Issues Fixed an ArrayIndexOutOfBoundsException with Message History when using SEDA Fixed requestTimeout on Netty not triggering when we have received message. Fixed Parameter Binding Annotations on boolean types to evaluate as Predicate instead of _expression_ Fixed using File consumer with delete=truereadLock=fileLock not being able to delete the file on Windows. New Enterprise Integration Patterns New Components New DSL New Annotations New Data Formats New Languages New Examples New Tutorials API changes Known Issues Dependency Upgrades Jetty 7.6.9 to 8.1.12 Servlet API 2.5 to 3.0 Restlet 2.0.15 to 2.1.4 Internal changes TODO Changes that may affect end users TODO Important changes to consider when upgrading If using groupedExchanges option on Aggregate EIP then the Exchanges is now stored on the message body as well. The old way of storing as a property is considered deprecated. See more details at Aggregate. Getting the Distributions Binary Distributions Description Download Link PGP Signature file of download Windows Distribution apache-camel-2.13.0.zip apache-camel-2.13.0.zip.asc Unix/Linux/Cygwin Distribution apache-camel-2.13.0.tar.gz apache-camel-2.13.0.tar.gz.asc The above URLs use redirectionThe above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using FireFox Source Distributions Description Download Link PGP Signature file of download Source for Windows apache-camel-2.13.0-src.zip apache-camel-2.13.0-src.zip.asc Source for Unix/Linux/Cygwin apache-camel-2.13.0-src.tar.gz apache-camel-2.13.0-src.tar.gz.asc Getting the Binaries using Maven 2 To use this release in your maven project, the proper dependency configuration that you should use in your Maven POM is: dependency groupIdorg.apache.camel/groupId artifactIdcamel-core/artifactId version2.13.0/version /dependency SVN Tag Checkout svn co http://svn.apache.org/repos/asf/camel/tags/camel-2.13.0 Changelog For a more detailed view of new features and bug fixes, see the: TODO: fix me release notes for 2.13.0 Stop watching space | Change email notification preferences View Online | View Changes | Add Comment
[CONF] Apache Camel Blueprint Testing
Blueprint Testing Page edited by willem jiang Changes (2) ... {code} h3. Setting timeout when getting CamelContext *Available as of Camel 2.13.0/2.12.1/2.11.2* {{CamelBlueprintTestSupport}} waits 30 sec for Camel Context to be ready by default, now you can override this value in two ways: * Globally, by setting {{org.apache.camel.test.blueprint.camelContextCreationTimeout}} system property. * Locally for each test, by overriding _getCamelContextCreationTimeout_ method. h3. Adding services on startup *Available as of Camel 2.11.2/2.12.0* ... Full Content Blueprint Testing Available as of Camel 2.10 Testing is a crucial part of any development or integration work. Camel supports the definition of Blueprint routes, but given Blueprint is an OSGi specific technology, writing unit tests is quite difficult. This library leverages PojoSR which provides a service registry without using a fully compliant OSGi container. This allows defining real unit tests (as opposed to integration tests using Pax Exam. Also notice the use of getBlueprintDescriptor to specify the location of the OSGi Blueprint XML file. If you have multiple OSGi Blueprint XML files, then you can specify them with a comma-separated list in the getBlueprintDescriptor method. Here's the Blueprint XML file: In order to define blueprint tests, add the following dependency in your pom: dependency groupIdorg.apache.camel/groupId artifactIdcamel-test-blueprint/artifactId version2.10/version scopetest/scope /dependency Setting timeout when getting CamelContext Available as of Camel 2.13.0/2.12.1/2.11.2 CamelBlueprintTestSupport waits 30 sec for Camel Context to be ready by default, now you can override this value in two ways: Globally, by setting org.apache.camel.test.blueprint.camelContextCreationTimeout system property. Locally for each test, by overriding getCamelContextCreationTimeout method. Adding services on startup Available as of Camel 2.11.2/2.12.0 When using camel-test-blueprint you may do unit tests which requires using shared services which is not available during unit testing, but only in the real OSGi container, for example a shared DataSource. To make it easier to register services on startup, such as a standalone DataSource or any other service, you can override the method addServicesOnStartup when your unit test class extends CamelBlueprintTestSupport. In the example below we register a service org.apache.camel.test.blueprint.MyService using the name myService having a property beer=Carlsberg, as shown below: @Override protected void addServicesOnStartup(MapString, KeyValueHolderObject, Dictionary services) { services.put("myService", asService(myService, "beer", "Carlsberg")); } The asService is a builder method that makes it easy to register a service with a single property. If you need more properties you can use the asService method that takes a Dictionary as argument. And if you do not need any properties, then just pass in null, eg: services.put("myService", asService(myService, null)); This allows us to use the service by calling a method on it from a Camel Bean component in a route as shown: route from uri="direct:start"/ to uri="bean:myService"/ to uri="mock:result"/ /route Notice the bean endpoint uses the service name myService which was the name we registered the service as. You can also use the fully qualified class name instead, which is more common with OSGi. @Override protected void addServicesOnStartup(MapString, KeyValueHolderObject, Dictionary services) { services.put(MyService.class.getName(), asService(myService, "beer", "Carlsberg")); } And in the route we use the FQN name: route from uri="direct:start"/ to uri="bean:org.apache.camel.test.blueprint.MyService"/ to uri="mock:result"/ /route Stop watching space | Change email notification preferences View Online | View Changes | Add Comment
svn commit: r878748 - in /websites/production/camel/content: blueprint-testing.html cache/main.pageCache camel-2130-release.html
Author: buildbot Date: Tue Sep 17 03:42:08 2013 New Revision: 878748 Log: Production update by buildbot for camel Modified: websites/production/camel/content/blueprint-testing.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2130-release.html Modified: websites/production/camel/content/blueprint-testing.html == --- websites/production/camel/content/blueprint-testing.html (original) +++ websites/production/camel/content/blueprint-testing.html Tue Sep 17 03:42:08 2013 @@ -183,6 +183,13 @@ If you have multiple OSGi Blueprint XML ]]/script /div/div +h3a shape=rect name=BlueprintTesting-SettingtimeoutwhengettingCamelContext/aSetting timeout when getting CamelContext/h3 +pbAvailable as of Camel 2.13.0/2.12.1/2.11.2/b/p + +pttCamelBlueprintTestSupport/tt waits 30 sec for Camel Context to be ready by default, now you can override this value in two ways:/p +ulliGlobally, by setting ttorg.apache.camel.test.blueprint.camelContextCreationTimeout/tt system property./liliLocally for each test, by overriding emgetCamelContextCreationTimeout/em method./li/ul + + h3a shape=rect name=BlueprintTesting-Addingservicesonstartup/aAdding services on startup/h3 pbAvailable as of Camel 2.11.2/2.12.0/b/p Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2130-release.html == --- websites/production/camel/content/camel-2130-release.html (original) +++ websites/production/camel/content/camel-2130-release.html Tue Sep 17 03:42:08 2013 @@ -124,7 +124,7 @@ h2a shape=rect name=Camel2.13.0Release-DependencyUpgrades/aDependency Upgrades/h2 -ulliJetty 7.6.9 to 8.1.12/liliServlet API 2.5 to 3.0/li/ul +ulliJetty 7.6.9 to 8.1.12/liliServlet API 2.5 to 3.0/liliRestlet 2.0.15 to 2.1.4/li/ul h2a shape=rect name=Camel2.13.0Release-Internalchanges/aInternal changes/h2
[7/9] git commit: CAMEL-6760 supporting to configure Camel Context creation timeoutin camel-test-blueprint with thanks to Eugene
CAMEL-6760 supporting to configure Camel Context creation timeoutin camel-test-blueprint with thanks to Eugene Conflicts: components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/506fc157 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/506fc157 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/506fc157 Branch: refs/heads/camel-2.11.x Commit: 506fc1579cf0d55e5e94692405ea9730a80631ee Parents: 3196054 Author: Willem Jiang ningji...@apache.org Authored: Tue Sep 17 11:45:07 2013 +0800 Committer: Willem Jiang ningji...@apache.org Committed: Tue Sep 17 11:45:07 2013 +0800 -- .../blueprint/CamelBlueprintTestSupport.java| 41 +- .../blueprint/ContextCreationTimeoutTest.java | 144 +++ 2 files changed, 184 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/506fc157/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java -- diff --git a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java index f839ce1..99a5aed 100644 --- a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java +++ b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java @@ -43,10 +43,15 @@ import org.osgi.service.cm.ConfigurationAdmin; * Base class for OSGi Blueprint unit tests with Camel. */ public abstract class CamelBlueprintTestSupport extends CamelTestSupport { +/** Name of a system property that sets camel context creation timeout. */ +public static final String SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT = org.apache.camel.test.blueprint.camelContextCreationTimeout; + private static ThreadLocalBundleContext threadLocalBundleContext = new ThreadLocalBundleContext(); private volatile BundleContext bundleContext; private final SetServiceRegistration? services = new LinkedHashSetServiceRegistration?(); + +@SuppressWarnings({rawtypes, unchecked}) protected BundleContext createBundleContext() throws Exception { String symbolicName = getClass().getSimpleName(); BundleContext answer = CamelBlueprintHelper.createBundleContext(symbolicName, getBlueprintDescriptor(), @@ -274,9 +279,43 @@ public abstract class CamelBlueprintTestSupport extends CamelTestSupport { return null; } +/** + * Returns how long to wait for Camel Context + * to be created. + * + * @return timeout in milliseconds. + */ +protected Long getCamelContextCreationTimeout() { +String tm = System.getProperty(SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT); +if (tm == null) { +return null; +} +try { +Long val = Long.valueOf(tm); +if (val 0) { +throw new IllegalArgumentException(Value of ++ SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT ++ cannot be negative.); +} +return val; +} catch (NumberFormatException e) { +throw new IllegalArgumentException(Value of ++ SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT ++ has wrong format., e); +} +} + @Override protected CamelContext createCamelContext() throws Exception { -CamelContext answer = CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class); +CamelContext answer = null; +Long timeout = getCamelContextCreationTimeout(); +if (timeout == null) { +answer = CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class); +} else if (timeout = 0) { +answer = CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class, timeout); +} else { +throw new IllegalArgumentException(getCamelContextCreationTimeout cannot return a negative value.); +} // must override context so we use the correct one in testing context = (ModelCamelContext) answer; return answer; http://git-wip-us.apache.org/repos/asf/camel/blob/506fc157/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ContextCreationTimeoutTest.java -- diff --git
[3/9] git commit: CAMEL-6757 support the StrictHostKeyChecking option with thanks to Guy
CAMEL-6757 support the StrictHostKeyChecking option with thanks to Guy Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bc6e7908 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bc6e7908 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bc6e7908 Branch: refs/heads/master Commit: bc6e7908d969a40e46608ffa4a77f9e0b83c455f Parents: 11cab47 Author: Willem Jiang ningji...@apache.org Authored: Tue Sep 17 11:30:02 2013 +0800 Committer: Willem Jiang ningji...@apache.org Committed: Tue Sep 17 11:30:58 2013 +0800 -- .../java/org/apache/camel/component/jsch/ScpConfiguration.java | 2 +- .../java/org/apache/camel/component/jsch/ScpOperations.java | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/bc6e7908/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java -- diff --git a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java index 86fc170..9bcb2d2 100644 --- a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java +++ b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java @@ -30,7 +30,7 @@ public class ScpConfiguration extends RemoteFileConfiguration { private String knownHostsFile; private String privateKeyFile; private String privateKeyFilePassphrase; -private String strictHostKeyChecking = no; +private String strictHostKeyChecking; private int serverAliveInterval; private int serverAliveCountMax = 1; private String chmod = DEFAULT_MOD; http://git-wip-us.apache.org/repos/asf/camel/blob/bc6e7908/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java -- diff --git a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java index a34cb28..5759c55 100644 --- a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java +++ b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java @@ -236,6 +236,11 @@ public class ScpOperations implements RemoteFileOperationsScpFile { session = jsch.getSession(config.getUsername(), config.getHost(), config.getPort()); session.setTimeout(config.getTimeout()); session.setUserInfo(new SessionUserInfo(config)); + +if (ObjectHelper.isNotEmpty(config.getStrictHostKeyChecking())) { +LOG.debug(Using StrickHostKeyChecking: {}, config.getStrictHostKeyChecking()); +session.setConfig(StrictHostKeyChecking, config.getStrictHostKeyChecking()); +} int timeout = config.getConnectTimeout(); LOG.debug(Connecting to {} with {} timeout..., config.remoteServerInformation(),
[5/9] git commit: CAMEL-6752 Added the unit test file
CAMEL-6752 Added the unit test file Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/31cc9700 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/31cc9700 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/31cc9700 Branch: refs/heads/camel-2.12.x Commit: 31cc97000e6b05c14d997b8f84e5f4b33af025ca Parents: 097a7e6 Author: Willem Jiang ningji...@apache.org Authored: Tue Sep 17 11:00:05 2013 +0800 Committer: Willem Jiang ningji...@apache.org Committed: Tue Sep 17 11:35:36 2013 +0800 -- .../bean/BeanOverloadedCovariantMethodTest.java | 120 +++ 1 file changed, 120 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/31cc9700/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java b/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java new file mode 100644 index 000..b74e7da --- /dev/null +++ b/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java @@ -0,0 +1,120 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.bean; + +import org.apache.camel.ContextTestSupport; +import org.apache.camel.builder.RouteBuilder; + +public class BeanOverloadedCovariantMethodTest extends ContextTestSupport { + +@Override +public boolean isUseRouteBuilder() { +return false; +} + +public void testHelloCovariantOverload() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class, hello) +.to(mock:result); +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello Claus from super class); + +template.sendBody(direct:start, Claus); + +assertMockEndpointsSatisfied(); +} + +public void testHelloCovariantOverloadNoNameOrParameters() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class) +.to(mock:result); + +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello null from super class); + +template.sendBody(direct:start, null); + +assertMockEndpointsSatisfied(); +} + +public void testHelloCovariantOverloadNoParameters() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class, hello) +.to(mock:result); + +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello null from super class); + +template.sendBody(direct:start, null); + +assertMockEndpointsSatisfied(); +} + +public void testHelloCovariantOverloadFromParameters() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class, hello(String)) +.to(mock:result); + +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello null from super class); + +template.sendBody(direct:start, null); + +
[6/9] git commit: CAMEL-6757 support the StrictHostKeyChecking option with thanks to Guy
CAMEL-6757 support the StrictHostKeyChecking option with thanks to Guy Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/16230cbb Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/16230cbb Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/16230cbb Branch: refs/heads/camel-2.12.x Commit: 16230cbb25eb496f979a8dc5de637db4e417a3d4 Parents: 31cc970 Author: Willem Jiang ningji...@apache.org Authored: Tue Sep 17 11:30:02 2013 +0800 Committer: Willem Jiang ningji...@apache.org Committed: Tue Sep 17 11:35:42 2013 +0800 -- .../java/org/apache/camel/component/jsch/ScpConfiguration.java | 2 +- .../java/org/apache/camel/component/jsch/ScpOperations.java | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/16230cbb/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java -- diff --git a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java index 86fc170..9bcb2d2 100644 --- a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java +++ b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java @@ -30,7 +30,7 @@ public class ScpConfiguration extends RemoteFileConfiguration { private String knownHostsFile; private String privateKeyFile; private String privateKeyFilePassphrase; -private String strictHostKeyChecking = no; +private String strictHostKeyChecking; private int serverAliveInterval; private int serverAliveCountMax = 1; private String chmod = DEFAULT_MOD; http://git-wip-us.apache.org/repos/asf/camel/blob/16230cbb/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java -- diff --git a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java index a34cb28..5759c55 100644 --- a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java +++ b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java @@ -236,6 +236,11 @@ public class ScpOperations implements RemoteFileOperationsScpFile { session = jsch.getSession(config.getUsername(), config.getHost(), config.getPort()); session.setTimeout(config.getTimeout()); session.setUserInfo(new SessionUserInfo(config)); + +if (ObjectHelper.isNotEmpty(config.getStrictHostKeyChecking())) { +LOG.debug(Using StrickHostKeyChecking: {}, config.getStrictHostKeyChecking()); +session.setConfig(StrictHostKeyChecking, config.getStrictHostKeyChecking()); +} int timeout = config.getConnectTimeout(); LOG.debug(Connecting to {} with {} timeout..., config.remoteServerInformation(),
[9/9] git commit: CAMEL-6757 support the StrictHostKeyChecking option with thanks to Guy
CAMEL-6757 support the StrictHostKeyChecking option with thanks to Guy Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/37d4307f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/37d4307f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/37d4307f Branch: refs/heads/camel-2.11.x Commit: 37d4307f7d2e76f6ef97f2bb10f7ad3dfe593d4f Parents: 32cfbaf Author: Willem Jiang ningji...@apache.org Authored: Tue Sep 17 11:30:02 2013 +0800 Committer: Willem Jiang ningji...@apache.org Committed: Tue Sep 17 11:45:52 2013 +0800 -- .../java/org/apache/camel/component/jsch/ScpConfiguration.java | 2 +- .../java/org/apache/camel/component/jsch/ScpOperations.java | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/37d4307f/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java -- diff --git a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java index 86fc170..9bcb2d2 100644 --- a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java +++ b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpConfiguration.java @@ -30,7 +30,7 @@ public class ScpConfiguration extends RemoteFileConfiguration { private String knownHostsFile; private String privateKeyFile; private String privateKeyFilePassphrase; -private String strictHostKeyChecking = no; +private String strictHostKeyChecking; private int serverAliveInterval; private int serverAliveCountMax = 1; private String chmod = DEFAULT_MOD; http://git-wip-us.apache.org/repos/asf/camel/blob/37d4307f/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java -- diff --git a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java index 2499b66..e397737 100644 --- a/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java +++ b/components/camel-jsch/src/main/java/org/apache/camel/component/jsch/ScpOperations.java @@ -236,6 +236,11 @@ public class ScpOperations implements RemoteFileOperationsScpFile { session = jsch.getSession(config.getUsername(), config.getHost(), config.getPort()); session.setTimeout(config.getTimeout()); session.setUserInfo(new SessionUserInfo(config)); + +if (ObjectHelper.isNotEmpty(config.getStrictHostKeyChecking())) { +LOG.debug(Using StrickHostKeyChecking: {}, config.getStrictHostKeyChecking()); +session.setConfig(StrictHostKeyChecking, config.getStrictHostKeyChecking()); +} int timeout = config.getConnectTimeout(); LOG.debug(Connecting to {} with {} timeout..., config.remoteServerInformation(),
[8/9] git commit: CAMEL-6752 Added the unit test file
CAMEL-6752 Added the unit test file Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/32cfbaf3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/32cfbaf3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/32cfbaf3 Branch: refs/heads/camel-2.11.x Commit: 32cfbaf31dcf9ed9fafd0b099d4e1aee0f6f6579 Parents: 506fc15 Author: Willem Jiang ningji...@apache.org Authored: Tue Sep 17 11:00:05 2013 +0800 Committer: Willem Jiang ningji...@apache.org Committed: Tue Sep 17 11:45:43 2013 +0800 -- .../bean/BeanOverloadedCovariantMethodTest.java | 120 +++ 1 file changed, 120 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/32cfbaf3/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java b/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java new file mode 100644 index 000..b74e7da --- /dev/null +++ b/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java @@ -0,0 +1,120 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.bean; + +import org.apache.camel.ContextTestSupport; +import org.apache.camel.builder.RouteBuilder; + +public class BeanOverloadedCovariantMethodTest extends ContextTestSupport { + +@Override +public boolean isUseRouteBuilder() { +return false; +} + +public void testHelloCovariantOverload() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class, hello) +.to(mock:result); +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello Claus from super class); + +template.sendBody(direct:start, Claus); + +assertMockEndpointsSatisfied(); +} + +public void testHelloCovariantOverloadNoNameOrParameters() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class) +.to(mock:result); + +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello null from super class); + +template.sendBody(direct:start, null); + +assertMockEndpointsSatisfied(); +} + +public void testHelloCovariantOverloadNoParameters() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class, hello) +.to(mock:result); + +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello null from super class); + +template.sendBody(direct:start, null); + +assertMockEndpointsSatisfied(); +} + +public void testHelloCovariantOverloadFromParameters() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class, hello(String)) +.to(mock:result); + +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello null from super class); + +template.sendBody(direct:start, null); + +
[2/9] git commit: CAMEL-6752 Added the unit test file
CAMEL-6752 Added the unit test file Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/11cab472 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/11cab472 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/11cab472 Branch: refs/heads/master Commit: 11cab4721136a8687f0a7311b1509c672185d9c2 Parents: 1f4adc2 Author: Willem Jiang ningji...@apache.org Authored: Tue Sep 17 11:00:05 2013 +0800 Committer: Willem Jiang ningji...@apache.org Committed: Tue Sep 17 11:00:05 2013 +0800 -- .../bean/BeanOverloadedCovariantMethodTest.java | 120 +++ 1 file changed, 120 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/11cab472/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java b/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java new file mode 100644 index 000..b74e7da --- /dev/null +++ b/camel-core/src/test/java/org/apache/camel/component/bean/BeanOverloadedCovariantMethodTest.java @@ -0,0 +1,120 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.bean; + +import org.apache.camel.ContextTestSupport; +import org.apache.camel.builder.RouteBuilder; + +public class BeanOverloadedCovariantMethodTest extends ContextTestSupport { + +@Override +public boolean isUseRouteBuilder() { +return false; +} + +public void testHelloCovariantOverload() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class, hello) +.to(mock:result); +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello Claus from super class); + +template.sendBody(direct:start, Claus); + +assertMockEndpointsSatisfied(); +} + +public void testHelloCovariantOverloadNoNameOrParameters() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class) +.to(mock:result); + +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello null from super class); + +template.sendBody(direct:start, null); + +assertMockEndpointsSatisfied(); +} + +public void testHelloCovariantOverloadNoParameters() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class, hello) +.to(mock:result); + +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello null from super class); + +template.sendBody(direct:start, null); + +assertMockEndpointsSatisfied(); +} + +public void testHelloCovariantOverloadFromParameters() throws Exception { +context.addRoutes(new RouteBuilder() { +@Override +public void configure() throws Exception { +from(direct:start) +.bean(MySuperBean.class, hello(String)) +.to(mock:result); + +} +}); +context.start(); + +getMockEndpoint(mock:result).expectedBodiesReceived(Hello null from super class); + +template.sendBody(direct:start, null); + +
[4/9] git commit: CAMEL-6760 supporting to configure Camel Context creation timeoutin camel-test-blueprint with thanks to Eugene
CAMEL-6760 supporting to configure Camel Context creation timeoutin camel-test-blueprint with thanks to Eugene Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/097a7e68 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/097a7e68 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/097a7e68 Branch: refs/heads/camel-2.12.x Commit: 097a7e68eded57b966387c865e5e40f1c945bc6b Parents: df9d866 Author: Willem Jiang ningji...@apache.org Authored: Tue Sep 17 10:58:10 2013 +0800 Committer: Willem Jiang ningji...@apache.org Committed: Tue Sep 17 11:35:30 2013 +0800 -- .../blueprint/CamelBlueprintTestSupport.java| 42 +- .../blueprint/ContextCreationTimeoutTest.java | 144 +++ 2 files changed, 184 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/097a7e68/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java -- diff --git a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java index 1a52d08..cce7a8e 100644 --- a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java +++ b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java @@ -41,10 +41,14 @@ import org.osgi.service.cm.ConfigurationAdmin; * Base class for OSGi Blueprint unit tests with Camel. */ public abstract class CamelBlueprintTestSupport extends CamelTestSupport { +/** Name of a system property that sets camel context creation timeout. */ +public static final String SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT = org.apache.camel.test.blueprint.camelContextCreationTimeout; + private static ThreadLocalBundleContext threadLocalBundleContext = new ThreadLocalBundleContext(); private volatile BundleContext bundleContext; private final SetServiceRegistration? services = new LinkedHashSetServiceRegistration?(); - + + @SuppressWarnings({rawtypes, unchecked}) protected BundleContext createBundleContext() throws Exception { String symbolicName = getClass().getSimpleName(); @@ -253,9 +257,43 @@ public abstract class CamelBlueprintTestSupport extends CamelTestSupport { return null; } +/** + * Returns how long to wait for Camel Context + * to be created. + * + * @return timeout in milliseconds. + */ +protected Long getCamelContextCreationTimeout() { +String tm = System.getProperty(SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT); +if (tm == null) { +return null; +} +try { +Long val = Long.valueOf(tm); +if (val 0) { +throw new IllegalArgumentException(Value of ++ SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT ++ cannot be negative.); +} +return val; +} catch (NumberFormatException e) { +throw new IllegalArgumentException(Value of ++ SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT ++ has wrong format., e); +} +} + @Override protected CamelContext createCamelContext() throws Exception { -CamelContext answer = CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class); +CamelContext answer = null; +Long timeout = getCamelContextCreationTimeout(); +if (timeout == null) { +answer = CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class); +} else if (timeout = 0) { +answer = CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class, timeout); +} else { +throw new IllegalArgumentException(getCamelContextCreationTimeout cannot return a negative value.); +} // must override context so we use the correct one in testing context = (ModelCamelContext) answer; return answer; http://git-wip-us.apache.org/repos/asf/camel/blob/097a7e68/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ContextCreationTimeoutTest.java -- diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ContextCreationTimeoutTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ContextCreationTimeoutTest.java new file mode 100644 index 000..4c6bc0a --- /dev/null +++
[1/9] git commit: CAMEL-6760 supporting to configure Camel Context creation timeoutin camel-test-blueprint with thanks to Eugene
Updated Branches: refs/heads/camel-2.11.x 31960541c - 37d4307f7 refs/heads/camel-2.12.x df9d866da - 16230cbb2 refs/heads/master 99b40bd77 - bc6e7908d CAMEL-6760 supporting to configure Camel Context creation timeoutin camel-test-blueprint with thanks to Eugene Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1f4adc2d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1f4adc2d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1f4adc2d Branch: refs/heads/master Commit: 1f4adc2d57b42d63b8c81eec0873368cbe20114b Parents: 99b40bd Author: Willem Jiang ningji...@apache.org Authored: Tue Sep 17 10:58:10 2013 +0800 Committer: Willem Jiang ningji...@apache.org Committed: Tue Sep 17 10:58:51 2013 +0800 -- .../blueprint/CamelBlueprintTestSupport.java| 42 +- .../blueprint/ContextCreationTimeoutTest.java | 144 +++ 2 files changed, 184 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/1f4adc2d/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java -- diff --git a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java index 1a52d08..cce7a8e 100644 --- a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java +++ b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java @@ -41,10 +41,14 @@ import org.osgi.service.cm.ConfigurationAdmin; * Base class for OSGi Blueprint unit tests with Camel. */ public abstract class CamelBlueprintTestSupport extends CamelTestSupport { +/** Name of a system property that sets camel context creation timeout. */ +public static final String SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT = org.apache.camel.test.blueprint.camelContextCreationTimeout; + private static ThreadLocalBundleContext threadLocalBundleContext = new ThreadLocalBundleContext(); private volatile BundleContext bundleContext; private final SetServiceRegistration? services = new LinkedHashSetServiceRegistration?(); - + + @SuppressWarnings({rawtypes, unchecked}) protected BundleContext createBundleContext() throws Exception { String symbolicName = getClass().getSimpleName(); @@ -253,9 +257,43 @@ public abstract class CamelBlueprintTestSupport extends CamelTestSupport { return null; } +/** + * Returns how long to wait for Camel Context + * to be created. + * + * @return timeout in milliseconds. + */ +protected Long getCamelContextCreationTimeout() { +String tm = System.getProperty(SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT); +if (tm == null) { +return null; +} +try { +Long val = Long.valueOf(tm); +if (val 0) { +throw new IllegalArgumentException(Value of ++ SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT ++ cannot be negative.); +} +return val; +} catch (NumberFormatException e) { +throw new IllegalArgumentException(Value of ++ SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT ++ has wrong format., e); +} +} + @Override protected CamelContext createCamelContext() throws Exception { -CamelContext answer = CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class); +CamelContext answer = null; +Long timeout = getCamelContextCreationTimeout(); +if (timeout == null) { +answer = CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class); +} else if (timeout = 0) { +answer = CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class, timeout); +} else { +throw new IllegalArgumentException(getCamelContextCreationTimeout cannot return a negative value.); +} // must override context so we use the correct one in testing context = (ModelCamelContext) answer; return answer; http://git-wip-us.apache.org/repos/asf/camel/blob/1f4adc2d/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ContextCreationTimeoutTest.java -- diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ContextCreationTimeoutTest.java
[CONF] Apache Camel RabbitMQ
RabbitMQ Page edited by Christian Mueller Changes (1) ... {code} rabbitmq:http://hostname[:port]/exchangeName?[options] {code} ... Full Content RabbitMQ Component Available as of Camel 2.12 The rabbitmq: component allows you produce and consume messages from RabbitMQ instances. Using the RabbitMQ AMQP client, this component offers a pure RabbitMQ approach over the generic AMQP component. Maven users will need to add the following dependency to their pom.xml for this component: dependency groupIdorg.apache.camel/groupId artifactIdcamel-rabbitmq/artifactId versionx.x.x/version !-- use the same version as your Camel core version -- /dependency URI format rabbitmq://hostname[:port]/exchangeName?[options] Where hostname is the hostname of the running rabbitmq instance or cluster. Port is optional and if not specified then defaults to the RabbitMQ client default (5672). The exchange name determines which exchange produced messages will sent to. In the case of consumers, the exchange name determines which exchange the queue will bind to. Options Property Default Description autoAck true If messages should be auto acknowledged autoDelete true If it is true, the message will be deleted when it is consumed durable true If message is durable queue random uuid The queue to receive messages from routingKey null The routing key to use when binding a consumer queue to the exchange. For producer routing keys, you set the header (see header section) threadPoolSize 10 The consumer uses a Thread Pool Executor with a fixed number of threads. This setting allows you to set that number of threads. username null username in case of authenticated access password null password for authenticated access vhost / the vhost for the channel Headers The following headers are set on exchanges when consuming messages. Property Value rabbitmq.ROUTING_KEY The routing key that was used to receive the message, or the routing key that will be used when producing a message rabbitmq.EXCHANGE_NAME The exchange the message was received from rabbitmq.DELIVERY_TAG The rabbitmq delivery tag of the received message The following headers are used by the producer. If these are set on the camel exchange then they will be set on the RabbitMQ message. Property Value rabbitmq.ROUTING_KEY The routing key that will be used when sending the message rabbitmq.EXCHANGE_NAME The exchange the message was received from, or sent to rabbitmq.CONTENT_TYPE The contentType to set on the RabbitMQ message rabbitmq.PRIORITY The priority header to set on the RabbitMQ message rabbitmq.CORRELATIONID The correlationId to set on the RabbitMQ message rabbitmq.MESSAGE_ID The message id to set on the RabbitMQ message rabbitmq.DELIVERY_MODE If the message should be persistent or not rabbitmq.USERID The userId to set on the RabbitMQ message rabbitmq.CLUSTERID The clusterId to set on the RabbitMQ message rabbitmq.REPLY_TO The replyTo to set on the RabbitMQ message rabbitmq.CONTENT_ENCODING The contentEncoding to set on the RabbitMQ message rabbitmq.TYPE The type to set on the RabbitMQ message rabbitmq.EXPIRATION The expiration to set on the RabbitMQ message rabbitmq.TIMESTAMP The timestamp to set on the RabbitMQ message rabbitmq.APP_ID The appId to set on the RabbitMQ message Headers are set by the consumer once the message is received. The producer will also set the headers for downstream processors once the exchange has taken place. Any headers set prior to production that the producer sets will be overriden. Message Body The component will use the camel exchange in body as the rabbit mq message body. The camel exchange in object must be convertible to a byte array. Otherwise the producer will throw an exception of unsupported body type. Samples To receive messages from a queue that is bound to an exchange A with the routing key B, from("rabbitmq://localhost/A?routingKey=B") To receive messages from a queue with a single thread with auto acknowledge disabled. from("rabbitmq://localhost/A?routingKey=BthreadPoolSize=1autoAck=false") To send messages to an exchange called C ...to("rabbitmq://localhost/B") See Also Configuring Camel Component Endpoint Getting Started Stop watching space | Change email notification preferences View Online | View Changes | Add Comment