svn commit: r830520 [2/2] - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache cxf.html
Modified: websites/production/camel/content/cxf.html == --- websites/production/camel/content/cxf.html (original) +++ websites/production/camel/content/cxf.html Thu Aug 30 04:20:38 2012 @@ -122,7 +122,7 @@ cxf:bean:cxfEndpoint?wsdlURL=wsdl/hello_ Options - Name Required Description wsdlURL No The location of the WSDL. It is obtained from endpoint address by default. Example: file://local/wsdl/hello.wsdl or wsdl/hello.wsdl serviceClass Yes The name of the SEI (Service Endpo int Interface) class. This class can have, but does not require, JSR181 annotations. Since 2.0, this option is only required by POJO mode. If the wsdlURL option is provided, serviceClass is not required for PAYLOAD and MESSAGE mode. When wsdlURL option is used without serviceClass, the serviceName and portName (endpointName for Spring configuration) options MUST be provided. It is possible to use # notation to reference a serviceClass object instance from the registry. E.g. serviceClass=#beanName. Since 2.8, it is possible to omit both wsdlURL and serviceClass options for PAYLOAD and MESSAGE mode. When they are omitted, arbitrary XML elements can be put in CxfPayload's body in PAYLOAD mode to facilitate CXF Dispatch Mode. Please be advised that the referenced object cannot be a Proxy (Spring AOP Proxy is OK) as it relies on Object.getClass().getName() method for non Spring AOP Proxy. Example: org.apache.camel.Hello serviceClassInstance No Use either serviceClass or serviceClassInstance. Deprecated in 2.x. In 1.6.x serviceClassInstance works like serviceClass=#beanName, which looks up a serviceObject instance from the registry. Example: serviceClassInstance=beanName serviceName No The service name this service is implementing, it maps to the wsdl:service@name. Required for camel-cxf consumer since camel-2.2.0 or if more than one serviceName is present in WSDL. Example: {http://org.apache.camel}ServiceName portName No The port name this service is implementing, it maps to the wsdl:port@name. Required for camel-cx f consumer since camel-2.2.0 or if more than one portName is present under serviceName. Example: {http://org.apache.camel}PortName dataFormat No The data type messages supported by the CXF endpoint. Default: POJO Example: POJO, PAYLOAD, MESSAGE relayHeaders No Available since 1.6.1. Please see the Descripti on of relayHeaders option section for this option in 2.0. Should a CXF endpoint relay headers along the route. Currently only available when dataFormat=POJO Default: true Example: true, false wrapped No Which kind of operation that CXF endpoint producer will invoke Default: false Example: true, false wrappedStyle No New in 2.5.0 The WSDL style that describes how parameters are represented in the SOAP body. If the value is false, CXF will chose the document-literal unwrapped style, If the value is true, CXF will chose the document-literal wrapped style Default: Null Example: true, false setDefaultBus No Will set the default bus when CXF endpoint create a bus by itself Default: false Example: true, false bus No New in 2.0.0. A default bus created by CXF Bus Factory. Use # notation to reference a bus object from the registry. The referenced object must be an instance of org.apache.cxf.Bus. Example: bus=#busName cxfBinding No New in 2.0. Use # notation to reference a CXF binding object from the registry. The referenced object must be an instance of org.apache.camel.component.cxf.CxfBinding (use an instance of org.apache.camel .component.cxf.DefaultCxfBinding). Example: cxfBinding=#bindingName headerFilterStrategy No New in 2.0. Use # notation to reference a header filter strategy object from the registry. The referenced object must be an instance of org.apache.camel.spi.HeaderFilterStrategy (use an instance of org.apache.camel.component.cxf.CxfHeaderFilterStrategy). Example: headerFilterStrategy=#strategyName loggingFeatureEnabled No New in 2.3. This option enables CXF Logging Feature which writes inbound and outbound SOAP messages to log. Default: false Example: loggingFeatureEnabled=true defaultOperationName No New in 2.4, this option will set the default operationName that will be used by the CxfProducer which invokes the remote service. Default: null Example: defaultOperationName=greetMe< /tt> defaultOperationNamespace No New in 2.4. This option will set the default operationNamespace that will be used by the CxfProducer which invokes the remote service. Default: null Example: defaultOperationNamespace=http://apache.org/hello_world_soap_http";>http://apache.org/hello_world_soap_http synchronous No New in 2.5. This option will let cxf endpoint decide to use sync or asyn c API to do the underlying work. The default value is false which means camel-cxf endpoint
svn commit: r1378796 [3/3] - in /camel/trunk/components/camel-sjms: ./ src/main/java/org/apache/camel/component/sjms/ src/main/java/org/apache/camel/component/sjms/consumer/ src/main/java/org/apache/c
Added: camel/trunk/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/BatchTransactedQueueConsumerTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/BatchTransactedQueueConsumerTest.java?rev=1378796&view=auto == --- camel/trunk/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/BatchTransactedQueueConsumerTest.java (added) +++ camel/trunk/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/tx/BatchTransactedQueueConsumerTest.java Thu Aug 30 03:42:12 2012 @@ -0,0 +1,104 @@ +/** + * 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.sjms.tx; + +import org.apache.activemq.ActiveMQConnectionFactory; +import org.apache.camel.CamelContext; +import org.apache.camel.Exchange; +import org.apache.camel.Processor; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.sjms.SjmsComponent; +import org.apache.camel.test.junit4.CamelTestSupport; +import org.junit.Test; + +/** + * Verify the ability to batch transactions. + * + */ +public class BatchTransactedQueueConsumerTest extends CamelTestSupport { + +/** + * Verify that messages are being redelivered + * @throws Exception + */ +@Test +public void testEndpointConfiguredBatchTransaction() throws Exception { +// We should get two sets of 10 messages. 10 before the rollback and 10 after the rollback. +getMockEndpoint("mock:test.before").expectedMessageCount(10); +getMockEndpoint("mock:test.after").expectedMessageCount(10); + +// Send only 10 messages +for (int i = 1; i <= 10; i++) { +template.sendBody("direct:start", "Hello World " + i); +} + +getMockEndpoint("mock:test.before").assertIsSatisfied(); +getMockEndpoint("mock:test.after").assertIsSatisfied(); + +} + +@Override +protected CamelContext createCamelContext() throws Exception { +CamelContext camelContext = super.createCamelContext(); + +ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://broker?broker.persistent=false&broker.useJmx=true"); +SjmsComponent component = new SjmsComponent(); +component.setConnectionFactory(connectionFactory); +camelContext.addComponent("sjms", component); + +return camelContext; +} + +@Override +protected RouteBuilder createRouteBuilder() throws Exception { +return new RouteBuilder() { +@Override +public void configure() { + +// Having a producer route helps with debugging and logging +from("direct:start") +.to("sjms:queue:transacted.consumer.test"); + +// Our test consumer route + from("sjms:queue:transacted.consumer.test?transacted=true&transactionBatchCount=10") +// first consume all the messages that are not redelivered +.choice() +.when(header("JMSRedelivered").isEqualTo("false")) +.to("log:before_log?showAll=true") +.to("mock:test.before") +// This is where we will cause the rollback after 10 messages have been sent. +.process(new Processor() { +@Override +public void process(Exchange exchange) throws Exception { +// Get the body +String body = exchange.getIn().getBody(String.class); + +// If the message ends with 10, throw the exception +if (body.endsWith("10")) { +log.info("10th message received. Rolling back."); +exchange.getOut().setFault(true); +e
svn commit: r1378786 - in /camel/trunk: components/camel-cmis/ components/camel-cmis/src/main/java/org/apache/camel/component/cmis/ components/camel-cmis/src/main/java/org/apache/camel/component/cmis/
Author: ningjiang Date: Thu Aug 30 02:01:42 2012 New Revision: 1378786 URL: http://svn.apache.org/viewvc?rev=1378786&view=rev Log: CAMEL-5552 camel-cmis supports OSGi Added: camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/SessionFactoryLocator.java camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/osgi/ camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/osgi/Activator.java Modified: camel/trunk/components/camel-cmis/pom.xml camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISConsumer.java camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/RecursiveTreeWalker.java camel/trunk/platforms/karaf/features/src/main/resources/features.xml Modified: camel/trunk/components/camel-cmis/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cmis/pom.xml?rev=1378786&r1=1378785&r2=1378786&view=diff == --- camel/trunk/components/camel-cmis/pom.xml (original) +++ camel/trunk/components/camel-cmis/pom.xml Thu Aug 30 02:01:42 2012 @@ -34,7 +34,9 @@ org.apache.camel.component.cmis.* - + + org.apache.camel.component.cmis.osgi.Activator + @@ -48,6 +50,14 @@ chemistry-opencmis-client-impl ${cmis-version} + + + +org.osgi +org.osgi.core +provided +true + Modified: camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISConsumer.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISConsumer.java?rev=1378786&r1=1378785&r2=1378786&view=diff == --- camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISConsumer.java (original) +++ camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISConsumer.java Thu Aug 30 02:01:42 2012 @@ -22,6 +22,7 @@ import java.util.Map; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.impl.ScheduledPollConsumer; +import org.apache.chemistry.opencmis.client.api.OperationContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -45,6 +46,10 @@ public class CMISConsumer extends Schedu protected int poll() throws Exception { return this.sessionFacade.poll(this); } + +public OperationContext createOperationContext() { +return sessionFacade.createOperationContext(); +} int sendExchangeWithPropsAndBody(Map properties, InputStream inputStream) throws Exception { Modified: camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java?rev=1378786&r1=1378785&r2=1378786&view=diff == --- camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java (original) +++ camel/trunk/components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISSessionFacade.java Thu Aug 30 02:01:42 2012 @@ -32,9 +32,6 @@ import org.apache.chemistry.opencmis.cli import org.apache.chemistry.opencmis.client.api.OperationContext; import org.apache.chemistry.opencmis.client.api.QueryResult; import org.apache.chemistry.opencmis.client.api.Session; -import org.apache.chemistry.opencmis.client.runtime.ObjectIdImpl; -import org.apache.chemistry.opencmis.client.runtime.OperationContextImpl; -import org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl; import org.apache.chemistry.opencmis.commons.PropertyIds; import org.apache.chemistry.opencmis.commons.SessionParameter; import org.apache.chemistry.opencmis.commons.data.ContentStream; @@ -66,9 +63,9 @@ public class CMISSessionFacade { parameter.put(SessionParameter.PASSWORD, this.password); if (this.repositoryId != null) { parameter.put(SessionParameter.REPOSITORY_ID, this.repositoryId); -this.session = SessionFactoryImpl.newInstance().createSession(parameter); +this.session = SessionFactoryLocator.getSessionFactory().createSession(parameter); } else { -this.session = SessionFactoryImpl.newInstance().getRepositories(parameter).get(0).createSession(); +this.session = SessionFactoryLocator.getSessionFactory().getRepositories(parameter).get(0).createSession();
svn commit: r830501 - in /websites/production/camel/content: cache/main.pageCache camel-2110-release.html
Author: buildbot Date: Wed Aug 29 21:17:42 2012 New Revision: 830501 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2110-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2110-release.html == --- websites/production/camel/content/camel-2110-release.html (original) +++ websites/production/camel/content/camel-2110-release.html Wed Aug 29 21:17:42 2012 @@ -136,7 +136,7 @@ Dependency Upgrades -Axiom 1.2.10 to 1.2.12BeanIO 2.0.0 to 2.0.1ConcurrentLinkedHashMap 1.2 to 1.3.1Ehcache bundle 2.5.1_1 to 2.5.2_1HTTP Client 4.1.3 to 4.2.1Jettison 1.3.1 to 1.3.2Lucene 3.6.0 to 3.6.1Netty 3.5.1 to 3.5.5Ognl bundle 3.0.4_1 to 3.0.5_1Restlet 2.0.14 to 2.0.15Saxon 9.3.0.11 to 9.4.0.1Spring Framework 3.1.1 to 3.1.2Spring Integration 2.1.2 to 2.1.3SSHD 0.6.0 to 0.7.0Woodstox 4.1.2 to 4.1.3 +Async Http Client 1.7.5 to 1.7.6Axiom 1.2.10 to 1.2.12BeanIO 2.0.0 to 2.0.1ConcurrentLinkedHashMap 1.2 to 1.3.1Ehcache bundle 2.5.1_1 to 2.5.2_1HTTP Client 4.1.3 to 4.2.1Jettison 1.3.1 to 1.3.2Lucene 3.6.0 to 3.6.1Netty 3.5.1 to 3.5.5Ognl bundle 3.0.4_1 to 3.0.5_1Restlet 2.0.14 to 2.0.15Saxon 9.3.0.11 to 9.4.0.1Spring Framework 3.1.1 to 3.1.2Spring Integration 2.1.2 to 2.1.3SSHD 0.6.0 to 0.7.0Woodstox 4.1.2 to 4.1.3 Important changes to consider when upgrading
svn commit: r1378731 - /camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java
Author: bvahdat Date: Wed Aug 29 21:10:15 2012 New Revision: 1378731 URL: http://svn.apache.org/viewvc?rev=1378731&view=rev Log: CAMEL-5545: Fixed the failed test (org.apache.camel.model.ModelSanityCheckerTest) on the CI-Server. Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java?rev=1378731&r1=1378730&r2=1378731&view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java Wed Aug 29 21:10:15 2012 @@ -317,11 +317,11 @@ public class XMLSecurityDataFormat exten this.keyOrTrustStoreParameters = keyOrTrustStoreParameters; } -private String getKeyPassword() { +public String getKeyPassword() { return this.keyPassword; } -private void setKeyPassword(String keyPassword) { +public void setKeyPassword(String keyPassword) { this.keyPassword = keyPassword; }
[CONF] Apache Camel > Camel 2.11.0 Release
Camel 2.11.0 Release Page edited by Babak Vahdat Changes (1) ... h2. Dependency Upgrades * Async Http Client 1.7.5 to 1.7.6 * Axiom 1.2.10 to 1.2.12 * BeanIO 2.0.0 to 2.0.1 ... Full Content Camel 2.11.0 release (currently in progress) New and Noteworthy Welcome to the 2.11.0 release with approximately XXX issues resolved - including new features, improvements, and bug fixes, such as: Added support for SOAP 1.2 in SOAP data format. Cache operation for add/update now supports expiry headers to control time to live/idle/eternal. Added allowNullBody option to JMS to configure whether sending messages with no body is allowed. Added connectOnStartup option to HDFS to allow to connect on demand, to avoid having Hadoop block for long time connecting to the HDFS cluster, as it has a hardcoded 15 minute retry mechanism. Added support for daily and weekly trends to Twitter component. The Camel Maven Archetypes now generates projects without any license headers. Added 'rejectOld' option to the Resequencer to prevent out of order messages from being delivered after capacity/timeout events occur Further optimized XPath under concurrent load, and as well ensured resources are cleaned up eagerly Added options allowNullBody and readLockMinLength to the File and FTP components. Made changed read lock strategy on FTP go faster (eg when the FTP server has a lot of files in the directory) if you enable the fastExistsCheck=true option as well. Notice that some FTP server may not support this. HL7 moves the HAPI 2.0 and supports Parser instance into unmarshal and "Terser" language and _expression_ to be able to extract fields from a parsed message. HL7 also upgraded to now use Apache Mina 2.x. Add an option HttpMethodRestrict to restrict HTTP method in Jetty and SERVLET Add support for selection of Direct-VM consumers by using ant-like path _expression_. The POJO Producing, and POJO Consuming with @Consume, @Produce, @EndpointInject now supports a new {{property} attribute to get the endpoint configuration from a bean property (eg using a getter method); this allows you to configure this on the bean using conventional bean configuration. Testing with camel-test-blueprint on Windows no longer tries to cleanup after testing taking up 5 seconds and logging WARNs. The File, and FTP components now support fileExist=Move option to move any existing files before writing a file. Added option loadStatisticsEnabled on Camel JMX to allow to disable load statistics if not needed (avoids a background thread being in use, to calculate the load stats). Enabled "lazy connections" for XMPP providers via the testConnectionOnStartup option Added a connection monitor to detect and fix dropped XMPP consumer connections at configurable connectionPollDelay intervals Added an ExchangeBuilder to build the exchange in a fluent way. Fixed issues Fixed RoutePolicy used from Spring XML with routePolicyRef may not invoke all callbacks on the policy. Fixed MINA consumer to force disconnect upon timeout when doing request/reply, as late replies may cause side effects otherwise. Fixed Simple language with empty quoted literals in predicates, so you can compare against empty strings. Fixed SOAP data format to set SOAP 1.1 namespace when marhsalling faults. Fixed SEDA producer to send to the right BlockingQueue being attached on the SEDA endpoint so that the sent messages don't get lost. Fixed using sendEmptyMessageWhenIdle=true on a batch consumer such as File now working with Aggregate EIP when using completionFromBatchConsumer Fixed MockEndpoint.expectedBodiesReceivedInAnyOrder to allow asserting on multiple arrival of the same/equal bodies. Fixed MyBatis to demarcate the running transactions properly while reading/writing from/to database. Fixed Jetty, HTTP, HTTP4, and AHC http components not working in bridge mode if content path have spaces Fixed the CXF fallback convertor issue which camel will unregister it when the converter return null. Fixed the issue that File2 endpoints on windows without volume name in the path url. Fixed the issue of unmarshaling pgp messages encrypted with ElGamal. Fixed random Load Balancer to be even spread (before was a little less likely to pick the 1st) Fixed Timer to not fire during starting CamelContext Fixed XMLSecurity DataFormat to enable retrieval of password-protected private keys for asymmetric decryption New Enterprise Integration Patterns New Camel Karaf Command New Components camel-cmis - for integration of CMIS compliant content repositories camel-couchdb - for integration with Apache CouchDB camel-elasticsearch - for ElasticSearch integration camel-sjms - for "Springless" JMS integrati
svn commit: r1378713 - /camel/trunk/parent/pom.xml
Author: bvahdat Date: Wed Aug 29 20:47:55 2012 New Revision: 1378713 URL: http://svn.apache.org/viewvc?rev=1378713&view=rev Log: Upgraded to Async Http Client 1.7.6. Modified: camel/trunk/parent/pom.xml Modified: camel/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1378713&r1=1378712&r2=1378713&view=diff == --- camel/trunk/parent/pom.xml (original) +++ camel/trunk/parent/pom.xml Wed Aug 29 20:47:55 2012 @@ -37,7 +37,7 @@ 1.1.2 5.6.0 -1.7.5 +1.7.6 1.5.7 0.7.2 0.3
svn commit: r1378712 - in /camel/trunk: components/camel-sjms/pom.xml parent/pom.xml tests/camel-itest/pom.xml
Author: bvahdat Date: Wed Aug 29 20:41:29 2012 New Revision: 1378712 URL: http://svn.apache.org/viewvc?rev=1378712&view=rev Log: Upgraded to atomikos 3.8.0 and renamed the property to 'atomikos-transactions-version' which corrects the typo (transactions instead of trascations). Modified: camel/trunk/components/camel-sjms/pom.xml camel/trunk/parent/pom.xml camel/trunk/tests/camel-itest/pom.xml Modified: camel/trunk/components/camel-sjms/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-sjms/pom.xml?rev=1378712&r1=1378711&r2=1378712&view=diff == --- camel/trunk/components/camel-sjms/pom.xml (original) +++ camel/trunk/components/camel-sjms/pom.xml Wed Aug 29 20:41:29 2012 @@ -85,7 +85,7 @@ com.atomikos transactions-jta -3.7.1 +${atomikos-transactions-version} test Modified: camel/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1378712&r1=1378711&r2=1378712&view=diff == --- camel/trunk/parent/pom.xml (original) +++ camel/trunk/parent/pom.xml Wed Aug 29 20:41:29 2012 @@ -42,7 +42,7 @@ 0.7.2 0.3 3.3_2 -3.7.0 +3.8.0 1.6.2 1.6.1_1 1.3.10 Modified: camel/trunk/tests/camel-itest/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/pom.xml?rev=1378712&r1=1378711&r2=1378712&view=diff == --- camel/trunk/tests/camel-itest/pom.xml (original) +++ camel/trunk/tests/camel-itest/pom.xml Wed Aug 29 20:41:29 2012 @@ -318,17 +318,17 @@ com.atomikos transactions - ${atomikos-trascations-version} + ${atomikos-transactions-version} com.atomikos transactions-jta - ${atomikos-trascations-version} + ${atomikos-transactions-version} com.atomikos transactions-jms - ${atomikos-trascations-version} + ${atomikos-transactions-version} javax.jms @@ -339,7 +339,7 @@ com.atomikos transactions-jdbc - ${atomikos-trascations-version} + ${atomikos-transactions-version}
svn commit: r1378695 - /camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java
Author: bvahdat Date: Wed Aug 29 20:02:19 2012 New Revision: 1378695 URL: http://svn.apache.org/viewvc?rev=1378695&view=rev Log: Polished avoiding deprecated API usage. Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java?rev=1378695&r1=1378694&r2=1378695&view=diff == --- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java (original) +++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConusmerNamespacePayLoadTest.java Wed Aug 29 20:02:19 2012 @@ -19,6 +19,7 @@ package org.apache.camel.component.cxf; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.util.EntityUtils; @@ -48,7 +49,7 @@ public class CxfConusmerNamespacePayLoad HttpPost post = new HttpPost(simpleEndpointAddress); post.addHeader("Accept" , "text/xml"); -StringEntity entity = new StringEntity(ECHO_REQUEST, "text/xml", "ISO-8859-1"); +StringEntity entity = new StringEntity(ECHO_REQUEST, ContentType.create("text/xml", "ISO-8859-1")); post.setEntity(entity); HttpClient httpclient = new DefaultHttpClient();
svn commit: r830483 [2/2] - in /websites/production/camel/content: ./ cache/
Modified: websites/production/camel/content/content-based-routing-on-camel.html == --- websites/production/camel/content/content-based-routing-on-camel.html (original) +++ websites/production/camel/content/content-based-routing-on-camel.html Wed Aug 29 17:19:33 2012 @@ -177,59 +177,11 @@ from("file:src/ -You can define custom exceptions before running, even in Web Console at runtime. However, We don't encourage to create new classes in Web Console since that involves non-treatable inner-classes for https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=CAMEL&title=Groovy+Renderer&linkCreation=true&fromPageId=2851523";>Groovy Renderer and you will find it hard to deal with through Web Console. +You can define custom exceptions before running, even in Web Console at runtime. However, We don't encourage to create new classes in Web Console since that involves non-treatable inner-classes for Groovy Renderer and you will find it hard to deal with through Web Console. Simpify your test by using Web Console To run a test, you can create a file holding the message above and throw it into the directory. However, Web Console can help to simplify your operations. Go to the endpoints page by directing your browser to: http://localhost:8080/endpoints"; rel="nofollow">http://localhost:8080/endpoints and you can see the file://src/data?noop=true endpoint. Just open it and then select the Send to this endpoint link for inputing your message. Web Console will save your message as a file in the directory: src/data, and camel will process the message file then. - -Source code - - - - - - - - - - - - - - - - - - -Name -Size -Creator Creation Date -Comment - -File -ContentBasedRoutingSample.zip - -12 kBhttps://cwiki.apache.org/confluence/display/~xueqiang.mi";>Xueqiang MiAug 19, 2009 08:55 - - - - - - - - Properties - - - - - Remove - - - - - - Modified: websites/production/camel/content/eip.html == --- websites/production/camel/content/eip.html (original) +++ websites/production/camel/content/eip.html Wed Aug 29 17:19:33 2012 @@ -134,55 +134,6 @@ - - -Resources - - - - - - - - - - - - - - - - - - -Name -Size -Creator Creation Date -Comment - -ZIP Archive -Hohpe_EIP_camel.zip - -191 kBhttps://cwiki.apache.org/confluence/display/~cmoulli...@xpectis.com";>Charles MoulliardApr 20, 2009 06:03 - - - - - - - - Properties - - - - - Remove - - - - - - Modified: websites/production/camel/content/enterprise-integration-patterns.html == --- websites/production/camel/content/enterprise-integration-patterns.html (original) +++ websites/production/camel/content/enterprise-integration-patterns.html Wed Aug 29 17:19:33 2012 @@ -134,55 +134,6 @@ - - -Resources - - - - - - - - - - - - - - - - - - -Name -Size -Creator Creation Date -Comment - -ZIP Archive -Hohpe_EIP_camel.zip - -191 kBhttps://cwiki.apache.org/confluence/display/~cmoulli...@xpectis.com";>Charles MoulliardApr 20, 2009 06:03 - - - - - - - - Properties - - - - - Remove
[CONF] Apache Camel > Camel 2.11.0 Release
Camel 2.11.0 Release Page edited by Claus Ibsen Changes (1) ... h3. New [Languages] * [VTD-XML] - for fast and efficient XPath evaluation/splitting using the VTD-XML Library. {{camel-vtdxml}} hosted at [Camel Extra|http://camel-extra.googlecode.com/] h3. New [Examples] ... Full Content Camel 2.11.0 release (currently in progress) New and Noteworthy Welcome to the 2.11.0 release with approximately XXX issues resolved - including new features, improvements, and bug fixes, such as: Added support for SOAP 1.2 in SOAP data format. Cache operation for add/update now supports expiry headers to control time to live/idle/eternal. Added allowNullBody option to JMS to configure whether sending messages with no body is allowed. Added connectOnStartup option to HDFS to allow to connect on demand, to avoid having Hadoop block for long time connecting to the HDFS cluster, as it has a hardcoded 15 minute retry mechanism. Added support for daily and weekly trends to Twitter component. The Camel Maven Archetypes now generates projects without any license headers. Added 'rejectOld' option to the Resequencer to prevent out of order messages from being delivered after capacity/timeout events occur Further optimized XPath under concurrent load, and as well ensured resources are cleaned up eagerly Added options allowNullBody and readLockMinLength to the File and FTP components. Made changed read lock strategy on FTP go faster (eg when the FTP server has a lot of files in the directory) if you enable the fastExistsCheck=true option as well. Notice that some FTP server may not support this. HL7 moves the HAPI 2.0 and supports Parser instance into unmarshal and "Terser" language and _expression_ to be able to extract fields from a parsed message. HL7 also upgraded to now use Apache Mina 2.x. Add an option HttpMethodRestrict to restrict HTTP method in Jetty and SERVLET Add support for selection of Direct-VM consumers by using ant-like path _expression_. The POJO Producing, and POJO Consuming with @Consume, @Produce, @EndpointInject now supports a new {{property} attribute to get the endpoint configuration from a bean property (eg using a getter method); this allows you to configure this on the bean using conventional bean configuration. Testing with camel-test-blueprint on Windows no longer tries to cleanup after testing taking up 5 seconds and logging WARNs. The File, and FTP components now support fileExist=Move option to move any existing files before writing a file. Added option loadStatisticsEnabled on Camel JMX to allow to disable load statistics if not needed (avoids a background thread being in use, to calculate the load stats). Enabled "lazy connections" for XMPP providers via the testConnectionOnStartup option Added a connection monitor to detect and fix dropped XMPP consumer connections at configurable connectionPollDelay intervals Added an ExchangeBuilder to build the exchange in a fluent way. Fixed issues Fixed RoutePolicy used from Spring XML with routePolicyRef may not invoke all callbacks on the policy. Fixed MINA consumer to force disconnect upon timeout when doing request/reply, as late replies may cause side effects otherwise. Fixed Simple language with empty quoted literals in predicates, so you can compare against empty strings. Fixed SOAP data format to set SOAP 1.1 namespace when marhsalling faults. Fixed SEDA producer to send to the right BlockingQueue being attached on the SEDA endpoint so that the sent messages don't get lost. Fixed using sendEmptyMessageWhenIdle=true on a batch consumer such as File now working with Aggregate EIP when using completionFromBatchConsumer Fixed MockEndpoint.expectedBodiesReceivedInAnyOrder to allow asserting on multiple arrival of the same/equal bodies. Fixed MyBatis to demarcate the running transactions properly while reading/writing from/to database. Fixed Jetty, HTTP, HTTP4, and AHC http components not working in bridge mode if content path have spaces Fixed the CXF fallback convertor issue which camel will unregister it when the converter return null. Fixed the issue that File2 endpoints on windows without volume name in the path url. Fixed the issue of unmarshaling pgp messages encrypted with ElGamal. Fixed random Load Balancer to be even spread (before was a little less likely to pick the 1st) Fixed Timer to not fire during starting CamelContext Fixed XMLSecurity DataFormat to enable retrieval of password-protected private keys for asymmetric decryption New Enterprise Integration Patterns New Camel Karaf Command New Components camel-cmis - for integration of CMIS compliant content repositories camel-couchdb - for integration with Apache CouchD
[CONF] Apache Camel > Load Balance for existing Messaging Service
Load Balance for existing Messaging Service Page edited by Claus Ibsen Changes (1) ... {code} from("file:src/data?noop=true").convertBodyTo(java.lang.String.class).to("stream:out") .loadBalance().random() .to("activemq:personnel.records1") .to("activemq:personnel.records2") .end() {code} Let the route2 collect messages from both queues providing the load balance support: {code} from("activemq:personnel.records1", "activemq:personnel.records2") .choice() .when().xpath("/person/city = 'London'").to("file:target/messages/uk") .otherwise().to("file:target/messages/others") .end() {code} With these two operations, you have complete this work. Just throw your message into the directory, camel will process and deliver it automatically. By the way, you may need some [Dead Letter Channel] configuration for it since XML analyzing with rigid format usually accompanies frequent error. h3. Source code If you would not like to build it by yourself, a copy is here: {attachments:patterns=.*Sample.zip} Just extract it and run it. Full Content Load Balance for Existing Messaging Service This is a sample to show how we can change our existing messaging service for requirement or improvement. Here we use a load balance support as example. Build the sample Imagine that we have a message handling system built before to collect some information from our client and then process and record them. This scenario can be constructed by using the following XML route configuration. "file:src/data?noop=true"/> "java.lang.String"/> "stream:out"/> "activemq:personnel.records"/> "activemq:personnel.records"/> /person/city = 'London' "file:target/messages/uk"/> "file:target/messages/others"/> For more instruction to build your sample, read the Camel Maven Archetypes page. The above routes are the default configuration for your new sample, so you can get started with it easily. In this scenario, the first route is responsible to collect data from a directory: src/data, print it to standard output console and deliver it to a message queue to further processing. Then, another route get messages from the queue, and use Content Based Router to sort out them. The messages for person in London are stored in the directory: target/messages/uk, and others in target/messages/others. You can run this sample using command: mvn jetty:run-war After started, we can view the routes configured in camel context by directing your browser to http://localhost:8080/routes. There are originally several message files in the directory: src/data and the message system processes them once it is started. We can get the processing result by checking the console and the files in target/messages. Use Web Console to add load balance support For a handful of small messages, one queue is enough to handle. But when encountering high volumn message input, we may want to use several queues to provide a load balance mechanism. So we can use the camel Load Balancer support. The messaging service improvement here is much easier than that in other messaging system. You can open the routes on the above page. Use a loadBalance DSL for the message delivery on route1: from("file:src/data?noop=true").convertBodyTo(java.lang.String.class).to("stream:out") .loadBalance().random() .to("activemq:personnel.records1") .to("activemq:personnel.records2") .end() Let the route2 collect messages from both queues providing the load balance support: from("activemq:personnel.records1", "activemq:personnel.records2") .choice() .when().xpath("/person/city = 'London'").to("file:target/messages/uk") .otherwise().to("file:target/messages/others") .end() With these two operations, you have complete this work. Just throw your message into the directory, camel will process and deliver it automatically. By the way, you may need some Dead Letter Channel configuration for it since XML analyzing with rigid format usually accompanies frequent error. Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Camel > Enterprise Integration Patterns
Enterprise Integration Patterns Page edited by Claus Ibsen Changes (1) ... {excerpt} h3. [#Resources] {attachments:patterns=.*camel.zip} Full Content Enterprise Integration Patterns Camel supports most of the Enterprise Integration Patterns from the excellent book by Gregor Hohpe and Bobby Woolf. If you are new to Camel you might want to try the Getting Started in the User Guide before attempting to implement these patterns. The EIP icons library is available as a Visio stencil file adapted to render the icons with the Camel color : sand. Download it here for your presentation, functional and technical analysis documents. The original EIP stencil is also available in OpenOffice 3.x Draw (thanks to Marco Garbelini) , Microsoft Visio, or Omnigraffle. Messaging Systems Message Channel How does one application communicate with another using messaging? Message How can two applications connected by a message channel exchange a piece of information? Pipes and Filters How can we perform complex processing on a message while maintaining independence and flexibility? Message Router How can you decouple individual processing steps so that messages can be passed to different filters depending on a set of conditions? Message Translator How can systems using different data formats communicate with each other using messaging? Message Endpoint How does an application connect to a messaging channel to send and receive messages? Messaging Channels Point to Point Channel How can the caller be sure that exactly one receiver will receive the document or perform the call? Publish Subscribe Channel How can the sender broadcast an event to all interested receivers? Dead Letter Channel What will the messaging system do with a message it cannot deliver? Guaranteed Delivery How can the sender make sure that a message will be delivered, even if the messaging system fails? Message Bus What is an architecture that enables separate applications to work together, but in a de-coupled fashion such that applications can be easily added or removed without affecting the others? Message Construction Event Message How can messaging be used to transmit events from one application to another? Request Reply When an application sends a message, how can it get a response from the receiver? Correlation Identifier How does a requestor that has received a reply know which request this is the reply for? Return Address How does a replier know where to send the reply? Message Routing Content Based Router How do we handle a situation where the implementation of a single logical function (e.g., inventory check) is spread across multiple physical systems? Message Filter How can a component avoid receiving uninteresting messages? Dynamic Router How can you avoid the dependency of the router on all possible destinations while maintaining its efficiency? Recipient List How do we route a message to a list of (static or dynamically) specified recipients? Splitter How can we process a message if it contains multiple elements, each of which may have to be processed in a different way? Aggregator How do we combine the results of individual, but related messages so that they can be processed as a whole? Resequencer How can we get a stream of related but out-of-sequence messages back into the correct order? Composed Message Processor How can you maintain the overall message flow when processing a message consisting of multiple elements, each of which may require different processing? Scatter-Gather How do you maintain the overall message flow when a message needs to be sent to multiple recipients, each of which may send a reply? Routing Slip How do we route a message consecutively through a series of processing steps when the sequence of steps is not known at design-time and may vary for each message? Throttler How can I throttle messages to ensure that a specific endpoint does not get overloaded, or we don't exceed an agreed SLA with some external service? Sampling How can I sample one message out of many in a given period to avoid downstream route does not get overloaded? Delayer How can I delay the sending of a message? Load Balancer How can I balance load across a number of endpoints? Multicast How can I route a message to a number of endpoints at the same time? Loop How can I repeat processing a message in a loop? Message Transformation Content Enricher How do we communicate with another system if
[CONF] Apache Camel > Content Based Routing on Camel
Content Based Routing on Camel Page edited by Claus Ibsen Changes (0) ... {code} You can define custom exceptions before running, even in [Web Console] at runtime. However, We don't encourage to create new classes in [Web Console] since that involves non-treatable inner-classes for Groovy Renderer and you will find it hard to deal with through [Web Console]. h3. Simpify your test by using [Web Console] ... Full Content Content Based Routing on Camel Content based routing (CBR) is considered as a necessary technology for service integration and has been widely used in current enterprise integration software. XML is a intermediary message type which provides the mediation between diverse data structures and formats as messages passing between applications or services. CBR can be thought as a service routing mechanism that determines a service route by analysing the message content at runtime. Camel support CBR using the Content Based Router and it defines a set of DSLs to simplify the usage of this patten . In Load Balance for existing Messaging Service sample, we have used the Content Based Router. This sample will guide you to creating your processor, registering and using it in Web Console. Build the sample You can build a sample as that in Load Balance for existing Messaging Service. Create a processor Now we create a validating processor which will check whether the message has been expired. If expired, the processor will throw a validation exception. The processor can be defined as follows: /** * a processor used to validate the message */ public class ValidatingProcessor implements Processor { public void process(Exchange exchange) throws Exception { String body = exchange.getIn().getBody().toString(); String[] tmp = body.split("|"); if (tmp.length < 3) { throw new ValidationException(exchange, "The message has no expired date!"); } SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-"); Date expiredDate = sdf.parse(tmp[1]); if (new Date().after(expiredDate)) { throw new ValidationException(exchange, "The message has been expired!"); } } } Register the processor We can register the processor in the spring context in two steps. Add a component-scan package in the applicationContext.xml. Spring will scan the package for service registry when starting. "org.apache.camel.web.example"/> Annotate the processor by adding one line code in the processor. Now the processor is as follows: package org.apache.camel.web.example; import java.text.SimpleDateFormat; import java.util.Date; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.ValidationException; import org.springframework.stereotype.Service; /** * a processor used to validate the message */ @Service(value = "validatingProcessor") public class ValidatingProcessor implements Processor { // ommision } Now you can run the sample, but it won't do the validation because we haven't configured the route to pass through the processor. You can complete it by editing the applicationContext.xml before running it, but here we want to show you how to do it through Web Console in groovy language. Use Content Based Router to orchestrate the processors We should execute the validation before processing the message, so we edit the route1 as follows: from("file:src/data?noop=true").convertBodyTo(java.lang.String.class) .processRef("validatingProcessor").to("stream:out").to("activemq:personnel.records") Now a expired date can be specified in the message, so the validating processor can filter the expired messages. You can add message files with content: "xueqiang"> 9-1-2009 Xueqiang Mi Shanghai When the the message is out of date, a validation exception is thrown. To make it a little elegant, you may use doTry...doCatch...doFinally to wrap it up and specify a queue to store the invalid messages. from("file:src/data?noop=true").convertBodyTo(java.lang.String.class) .doTry().processRef("validatingProcessor").to("stream:out").to("activemq:personnel.records") .doCatch(ValidationException.class).to("mock:invalid").end() You can define custom exceptions before running, even in Web Console at runtime. However, We don't encourage to create new classes in Web Console since that involves non-treatable inner-classes for Groovy Renderer and you will find it hard to deal with through Web Console. Simpify your test by using Web Console To run a test, you can create a file holding the message above and throw it into the directory. However, Web Console can help to simplify your operations. Go to the endpoi
[CONF] Apache Camel > Content Based Routing on Camel
Content Based Routing on Camel Page edited by Claus Ibsen Changes (1) ... To run a test, you can create a file holding the message above and throw it into the directory. However, [Web Console] can help to simplify your operations. Go to the endpoints page by directing your browser to: http://localhost:8080/endpoints and you can see the file://src/data?noop=true endpoint. Just open it and then select the Send to this endpoint link for inputing your message. [Web Console] will save your message as a file in the directory: src/data, and camel will process the message file then. h3. Source code {attachments:patterns=.*Sample.zip} Full Content Content Based Routing on Camel Content based routing (CBR) is considered as a necessary technology for service integration and has been widely used in current enterprise integration software. XML is a intermediary message type which provides the mediation between diverse data structures and formats as messages passing between applications or services. CBR can be thought as a service routing mechanism that determines a service route by analysing the message content at runtime. Camel support CBR using the Content Based Router and it defines a set of DSLs to simplify the usage of this patten . In Load Balance for existing Messaging Service sample, we have used the Content Based Router. This sample will guide you to creating your processor, registering and using it in Web Console. Build the sample You can build a sample as that in Load Balance for existing Messaging Service. Create a processor Now we create a validating processor which will check whether the message has been expired. If expired, the processor will throw a validation exception. The processor can be defined as follows: /** * a processor used to validate the message */ public class ValidatingProcessor implements Processor { public void process(Exchange exchange) throws Exception { String body = exchange.getIn().getBody().toString(); String[] tmp = body.split("|"); if (tmp.length < 3) { throw new ValidationException(exchange, "The message has no expired date!"); } SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-"); Date expiredDate = sdf.parse(tmp[1]); if (new Date().after(expiredDate)) { throw new ValidationException(exchange, "The message has been expired!"); } } } Register the processor We can register the processor in the spring context in two steps. Add a component-scan package in the applicationContext.xml. Spring will scan the package for service registry when starting. "org.apache.camel.web.example"/> Annotate the processor by adding one line code in the processor. Now the processor is as follows: package org.apache.camel.web.example; import java.text.SimpleDateFormat; import java.util.Date; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.ValidationException; import org.springframework.stereotype.Service; /** * a processor used to validate the message */ @Service(value = "validatingProcessor") public class ValidatingProcessor implements Processor { // ommision } Now you can run the sample, but it won't do the validation because we haven't configured the route to pass through the processor. You can complete it by editing the applicationContext.xml before running it, but here we want to show you how to do it through Web Console in groovy language. Use Content Based Router to orchestrate the processors We should execute the validation before processing the message, so we edit the route1 as follows: from("file:src/data?noop=true").convertBodyTo(java.lang.String.class) .processRef("validatingProcessor").to("stream:out").to("activemq:personnel.records") Now a expired date can be specified in the message, so the validating processor can filter the expired messages. You can add message files with content: "xueqiang"> 9-1-2009 Xueqiang Mi Shanghai When the the message is out of date, a validation exception is thrown. To make it a little elegant, you may use doTry...doCatch...doFinally to wrap it up and specify a queue to store the invalid messages. from("file:src/data?noop=true").convertBodyTo(java.lang.String.class) .doTry().processRef("validatingProcessor").to("stream:out").to("activemq:personnel.records") .doCatch(ValidationException.class).to("mock:invalid").end() You can define custom exceptions before running, even in Web Console at runtime. However, We don't encourage to create new classes in Web Console since that involves non-treatable inner-classes for Groovy Renderer and you will find it hard to deal with through Web Console. Simpify you
[CONF] Apache Camel > Tutorial-Example-ReportIncident
Tutorial-Example-ReportIncident Page edited by Claus Ibsen Changes (1) ... I wrote this tutorial motivated as Camel lacked an example application that was based on the web application deployment model. The entire world hasn't moved to pure OSGi deployments yet. {tip} The full source code for this tutorial as complete is part of the Apache Camel distribution in the {{examples/camel-example-reportincident}} directory {tip} h2. The use-case ... Full Content Tutorial - camel-example-reportincident Introduction Creating this tutorial was inspired by a real life use-case I discussed over the phone with a colleague. He was working at a client whom uses a heavy-weight integration platform from a very large vendor. He was in talks with developer shops to implement a new integration on this platform. His trouble was the shop tripled the price when they realized the platform of choice. So I was wondering how we could do this integration with Camel. Can it be done, without tripling the cost . This tutorial is written during the development of the integration. I have decided to start off with a sample that isn't Camel's but standard Java and then plugin Camel as we goes. Just as when people needed to learn Spring you could consume it piece by piece, the same goes with Camel. The target reader is person whom hasn't experience or just started using Camel. Motivation for this tutorial I wrote this tutorial motivated as Camel lacked an example application that was based on the web application deployment model. The entire world hasn't moved to pure OSGi deployments yet. The full source code for this tutorial as complete is part of the Apache Camel distribution in the examples/camel-example-reportincident directory The use-case The goal is to allow staff to report incidents into a central administration. For that they use client software where they report the incident and submit it to the central administration. As this is an integration in a transition phase the administration should get these incidents by email whereas they are manually added to the database. The client software should gather the incident and submit the information to the integration platform that in term will transform the report into an email and send it to the central administrator for manual processing. The figure below illustrates this process. The end users reports the incidents using the client applications. The incident is sent to the central integration platform as webservice. The integration platform will process the incident and send an OK acknowledgment back to the client. Then the integration will transform the message to an email and send it to the administration mail server. The users in the administration will receive the emails and take it from there. In EIP patterns We distill the use case as EIP patterns: Parts This tutorial is divided into sections and parts: Section A: Existing Solution, how to slowly use Camel Part 1 - This first part explain how to setup the project and get a webservice exposed using Apache CXF. In fact we don't touch Camel yet. Part 2 - Now we are ready to introduce Camel piece by piece (without using Spring or any XML configuration file) and create the full feature integration. This part will introduce different Camel's concepts and How we can build our solution using them like : CamelContext Endpoint, Exchange & Producer Components : Log, File Part 3 - Continued from part 2 where we implement that last part of the solution with the event driven consumer and how to send the email through the Mail component. Section B: The Camel Solution Part 4 - We now turn into the path of Camel where it excels - the routing. Part 5 - Is about how embed Camel with Spring and using CXF endpoints directly in Camel Using Axis 2See this blog entry by Sagara demonstrating how to use Apache Axis 2 instead of Apache CXF as the web service framework. Links Introduction Part 1 Part 2 Part 3 Part 4 Part 5 Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Camel > Tutorial-Example-ReportIncident-Part5
Tutorial-Example-ReportIncident-Part5 Page edited by Claus Ibsen Changes (1) ... In the next part's look at using XML to create the route instead of Java code. Then it might be even more readable by non developers. h2. [#Resources] * {attachments:patterns=part-five.zip} h2. Links ... Full Content Part 5 ... Continued from Part 4 We continue from part 4 where we have the routing in place. However as you might have noticed we aren't quiet there yet with a nice solution, we are still coding to much. In this part we will look into to address these two concerns: Starting Camel automatically Using CXF directly Starting Camel automatically Our current deployment model is as a war and we have the web.xml to help start things. Well in fact we will leverage Spring to start the world . We use it's ContextListener org.springframework.web.context.ContextLoaderListener Then we need a standard Spring XML file so we create a new file in src/main/resources and name it camel-config.xml. Before we start editing this XML file we need to link to it from the web.xml file. So we add this snippet to the web.xml: contextConfigLocation classpath:camel-config.xml Now we are ready to edit the camel-config.xml file that is a standard Spring XML bean file. So you can add standard spring beans and whatnot you like to do and can do with Spring. "http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> Now we are nearly there, we just need to add Camel to the Spring XML file, so Spring knows Camel exists and can start it. First we need to add Camel to the schema location in the top of the XML file. ... xsi:schemaLocation=" http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> Now we are ready to let Spring and Camel work together. What we need to do is adding a CamelContext to the Spring XML file. Camel ships with a CamelContextFactoryBean that is a Spring factory bean we should use for creating and initializing the SpringCamelContext. SpringCamelContext is extending CamelContext to be Spring aware so Camel and Spring can work nicely together. For instance the Registry will now use Spring bean lookup. So any spring bean can now easily be lookup and used from Camel. Well back to today's lesson. So we can create a SpringCamelContext using the factory bean as illustrated below: "camel" class="org.apache.camel.spring.CamelContextFactoryBean"/> However this is not used very often as Spring has support for custom namespace, so Camel has a CamelNamespaceHandler so we can create Camel using nice XML syntax as: "camel" xmlns="http://activemq.apache.org/camel/schema/spring"> ... Adding route builder Now we have Camel integrated but we still need to add our route bulder that we did manually from the javacode as: // append the routes to the context context.addRoutes(new ReportIncidentRoutes()); There are two solutions to this using spring bean package scanning Using a spring bean we just declare the route builder using a regular spring bean: "myrouter" class="org.apache.camel.example.reportincident.ReportIncidentRoutes"/> And then we can refer to it from our CamelContext: "camel" xmlns="http://activemq.apache.org/camel/schema/spring"> "myrouter"/> So now when Spring start's it will read the camel-context.xml file and thus also start Camel as well. As SpringCamelContext is spring lifecycle event aware, Camel will also shutdown when Spring is shutting down. So when you stop the web application Spring will notify this and Camel is also shutdown nice and properly. So as an end user no need to worry. The package scanning solution is for convenience to refer to a java package and Camel will scan all classes within this package for RouteBuilder classes. If using this then you dont need to declare your route builder as a Spring bean. So the XML can be reduced to. "camel" xmlns="http://activemq.apache.org/camel/schema/spring"> org.apache.camel.example.reportincident Using CXF directly Now we have seen how you can leverage Spring to start Camel, in fact it handles the lifecycle of Camel, so you can say Camel is embedded with Spring in your application. From the very start of this tutorial we have used CXF as the webservice framework
[CONF] Apache Camel > Tutorial-Example-ReportIncident-Part4
Tutorial-Example-ReportIncident-Part4 Page edited by Claus Ibsen Changes (1) ... We have just briefly touched the *routing* in Camel and shown how to implement them using the *fluent builder* syntax in Java. There is much more to the routing in Camel than shown here, but we are learning step by step. We continue in part 5. See you there. h2. [#Resources] * {attachments:patterns=.*part-four.zip} h2. Links - [Introduction|Tutorial-Example-ReportIncident] ... Full Content Part 4 Introduction This section is about regular Camel. The examples presented here in this section is much more in common of all the examples we have in the Camel documentation. If you have been reading the previous 3 parts then, this quote applies: you must unlearn what you have learned Master Yoda, Star Wars IV So we start all over again! Routing Camel is particular strong as a light-weight and agile routing and mediation framework. In this part we will introduce the routing concept and how we can introduce this into our solution. Looking back at the figure from the Introduction page we want to implement this routing. Camel has support for expressing this routing logic using Java as a DSL (Domain Specific Language). In fact Camel also has DSL for XML and Scala. In this part we use the Java DSL as its the most powerful and all developers know Java. Later we will introduce the XML version that is very well integrated with Spring. Before we jump into it, we want to state that this tutorial is about Developers not loosing control. In my humble experience one of the key fears of developers is that they are forced into a tool/framework where they loose control and/or power, and the possible is now impossible. So in this part we stay clear with this vision and our starting point is as follows: We have generated the webservice source code using the CXF wsdl2java generator and we have our ReportIncidentEndpointImpl.java file where we as a Developer feels home and have the power. So the starting point is: /** * The webservice we have implemented. */ public class ReportIncidentEndpointImpl implements ReportIncidentEndpoint { /** * This is the last solution displayed that is the most simple */ public OutputReportIncident reportIncident(InputReportIncident parameters) { // WE ARE HERE !!! return null; } } Yes we have a simple plain Java class where we have the implementation of the webservice. The cursor is blinking at the WE ARE HERE block and this is where we feel home. More or less any Java Developers have implemented webservices using a stack such as: Apache AXIS, Apache CXF or some other quite popular framework. They all allow the developer to be in control and implement the code logic as plain Java code. Camel of course doesn't enforce this to be any different. Okay the boss told us to implement the solution from the figure in the Introduction page and we are now ready to code. RouteBuilder RouteBuilder is the hearth in Camel of the Java DSL routing. This class does all the heavy lifting of supporting EIP verbs for end-users to express the routing. It does take a little while to get settled and used to, but when you have worked with it for a while you will enjoy its power and realize it is in fact a little language inside Java itself. Camel is the only integration framework we are aware of that has Java DSL, all the others are usually only XML based. As an end-user you usually use the RouteBuilder as of follows: create your own Route class that extends RouteBuilder implement your routing DSL in the configure method So we create a new class ReportIncidentRoutes and implement the first part of the routing: import org.apache.camel.builder.RouteBuilder; public class ReportIncidentRoutes extends RouteBuilder { public void configure() throws Exception { // direct:start is a internal queue to kick-start the routing in our example // we use this as the starting point where you can send messages to direct:start from("direct:start") // to is the destination we send the message to our velocity endpoint // where we transform the mail body .to("velocity:MailBody.vm"); } } What to notice here is the configure method. Here is where all the action is. Here we have the Java DSL langauge, that is expressed using the fluent builder syntax that is also known from Hibernate when you build the dynamic queries etc. What you do is that you can stack methods separating with the dot. In the example above we have a very common routing, that can be distilled from pseudo verbs to actual code with: from A to B From Endpoint A To Endpoint B from("endpointA").to
[CONF] Apache Camel > Tutorial-Example-ReportIncident-Part3
Tutorial-Example-ReportIncident-Part3 Page edited by Claus Ibsen Changes (1) ... - [Type Converter] h2. [#Resources] * {attachments:patterns=.*part-three.zip} h2. Links - [Introduction|Tutorial-Example-ReportIncident] ... Full Content Part 3 Recap Lets just recap on the solution we have now: public class ReportIncidentEndpointImpl implements ReportIncidentEndpoint { private CamelContext camel; private ProducerTemplate template; public ReportIncidentEndpointImpl() throws Exception { // create the camel context that is the "heart" of Camel camel = new DefaultCamelContext(); // get the ProducerTemplate thst is a Spring'ish xxxTemplate based producer for very // easy sending exchanges to Camel. template = camel.createProducerTemplate(); // start Camel camel.start(); } /** * This is the last solution displayed that is the most simple */ public OutputReportIncident reportIncident(InputReportIncident parameters) { // transform the request into a mail body Object mailBody = template.sendBody("velocity:MailBody.vm", parameters); // store the mail body in a file String filename = "mail-incident-" + parameters.getIncidentId() + ".txt"; template.sendBodyAndHeader("file://target/subfolder", mailBody, FileComponent.HEADER_FILE_NAME, filename); // return an OK reply OutputReportIncident out = new OutputReportIncident(); out.setCode("OK"); return out; } } This completes the first part of the solution: receiving the message using webservice, transform it to a mail body and store it as a text file. What is missing is the last part that polls the text files and send them as emails. Here is where some fun starts, as this requires usage of the Event Driven Consumer EIP pattern to react when new files arrives. So lets see how we can do this in Camel. There is a saying: Many roads lead to Rome, and that is also true for Camel - there are many ways to do it in Camel. Adding the Event Driven Consumer We want to add the consumer to our integration that listen for new files, we do this by creating a private method where the consumer code lives. We must register our consumer in Camel before its started so we need to add, and there fore we call the method addMailSenderConsumer in the constructor below: public ReportIncidentEndpointImpl() throws Exception { // create the camel context that is the "heart" of Camel camel = new DefaultCamelContext(); // get the ProducerTemplate thst is a Spring'ish xxxTemplate based producer for very // easy sending exchanges to Camel. template = camel.createProducerTemplate(); // add the event driven consumer that will listen for mail files and process them addMailSendConsumer(); // start Camel camel.start(); } The consumer needs to be consuming from an endpoint so we grab the endpoint from Camel we want to consume. It's file://target/subfolder. Don't be fooled this endpoint doesn't have to 100% identical to the producer, i.e. the endpoint we used in the previous part to create and store the files. We could change the URL to include some options, and to make it more clear that it's possible we setup a delay value to 10 seconds, and the first poll starts after 2 seconds. This is done by adding ?consumer.delay=1&consumer.initialDelay=2000 to the URL. URL ConfigurationThe URL configuration in Camel endpoints is just like regular URL we know from the Internet. You use ? and & to set the options. When we have the endpoint we can create the consumer (just as in part 1 where we created a producer}. Creating the consumer requires a Processor where we implement the java code what should happen when a message arrives. To get the mail body as a String object we can use the getBody method where we can provide the type we want in return. Camel Type ConverterWhy don't we just cast it as we always do in Java? Well the biggest advantage when you provide the type as a parameter you tell Camel what type you want and Camel can automatically convert it for you, using its flexible Type Converter mechanism. This is a great advantage, and you should try to use this instead of regular type casting. Sending the email is still left to be implemented, we will do this later. And finally we must remember to start the consumer otherwise its not active and won't listen for new files. private void addMailSendConsumer() throws Exception { // Grab the endpoint where we should consume. Option - the first poll starts after 2 seconds Endpoint endpint = camel.getEndpoint("file://
[CONF] Apache Camel > Tutorial-Example-ReportIncident-Part2
Tutorial-Example-ReportIncident-Part2 Page edited by Claus Ibsen Changes (1) ... Brew a cup of coffee, tug the kids and kiss the wife, for now we will have us some fun with the Camel. See you in part 3. h2. [#Resources] * {attachments:patterns=.*part-two.zip} h2. Links - [Introduction|Tutorial-Example-ReportIncident] ... Full Content Part 2 Adding Camel In this part we will introduce Camel so we start by adding Camel to our pom.xml: ... 1.4.0 org.apache.camel camel-core ${camel-version} That's it, only one dependency for now. Synchronize IDEIf you continue from part 1, remember to update your editor project settings since we have introduce new .jar files. For instance IDEA has a feature to synchronize with Maven projects. Now we turn towards our webservice endpoint implementation where we want to let Camel have a go at the input we receive. As Camel is very non invasive its basically a .jar file then we can just grap Camel but creating a new instance of DefaultCamelContext that is the hearth of Camel its context. CamelContext camel = new DefaultCamelContext(); In fact we create a constructor in our webservice and add this code: private CamelContext camel; public ReportIncidentEndpointImpl() throws Exception { // create the camel context that is the "heart" of Camel camel = new DefaultCamelContext(); // add the log component camel.addComponent("log", new LogComponent()); // start Camel camel.start(); } Logging the "Hello World" Here at first we want Camel to log the givenName and familyName parameters we receive, so we add the LogComponent with the key log. And we must start Camel before its ready to act. Component DocumentationThe Log and File components is documented as well, just click on the links. Just return to this documentation later when you must use these components for real. Then we change the code in the method that is invoked by Apache CXF when a webservice request arrives. We get the name and let Camel have a go at it in the new method we create sendToCamel: public OutputReportIncident reportIncident(InputReportIncident parameters) { String name = parameters.getGivenName() + " " + parameters.getFamilyName(); // let Camel do something with the name sendToCamelLog(name); OutputReportIncident out = new OutputReportIncident(); out.setCode("OK"); return out; } Next is the Camel code. At first it looks like there are many code lines to do a simple task of logging the name - yes it is. But later you will in fact realize this is one of Camels true power. Its concise API. Hint: The same code can be used for any component in Camel. private void sendToCamelLog(String name) { try { // get the log component Component component = camel.getComponent("log"); // create an endpoint and configure it. // Notice the URI parameters this is a common pratice in Camel to configure // endpoints based on URI. // com.mycompany.part2 = the log category used. Will log at INFO level as default Endpoint endpoint = component.createEndpoint("log:com.mycompany.part2"); // create an Exchange that we want to send to the endpoint Exchange exchange = endpoint.createExchange(); // set the in message payload (=body) with the name parameter exchange.getIn().setBody(name); // now we want to send the exchange to this endpoint and we then need a producer // for this, so we create and start the producer. Producer producer = endpoint.createProducer(); producer.start(); // process the exchange will send the exchange to the log component, that will process // the exchange and yes log the payload producer.process(exchange); // stop the producer, we want to be nice and cleanup producer.stop(); } catch (Exception e) { // we ignore any exceptions and just rethrow as runtime throw new RuntimeException(e); } } Okay there are code comments in the code block above that should explain what is happening. We run the code by invoking our unit test with maven mvn test, and we should get this log line: INFO: Exchange[BodyType:String, Body:Claus Ibsen] Write to file - easy with the same code style Okay that isn't to impressive, Camel can log Well I promised that the above code style can be used for any component, so let's store the
[CONF] Apache Camel > Tutorial-Example-ReportIncident-Part1
Tutorial-Example-ReportIncident-Part1 Page edited by Claus Ibsen Changes (1) ... h2. [#Resources] * [Apache CXF user guide|http://cwiki.apache.org/CXF20DOC/index.html] * {attachments:patterns=.*part-one.zip} h2. Links ... Full Content Part 1 Prerequisites This tutorial uses the following frameworks: Maven 2.0.9 Apache Camel 1.4.0 Apache CXF 2.1.1 Spring 2.5.5 Note: The sample project can be downloaded, see the resources section. Initial Project Setup We want the integration to be a standard .war application that can be deployed in any web container such as Tomcat, Jetty or even heavy weight application servers such as WebLogic or WebSphere. There fore we start off with the standard Maven webapp project that is created with the following long archetype command: mvn archetype:create -DgroupId=org.apache.camel -DartifactId=camel-example-reportincident -DarchetypeArtifactId=maven-archetype-webapp Notice that the groupId etc. doens't have to be org.apache.camel it can be com.mycompany.whatever. But I have used these package names as the example is an official part of the Camel distribution. Then we have the basic maven folder layout. We start out with the webservice part where we want to use Apache CXF for the webservice stuff. So we add this to the pom.xml 2.1.1 org.apache.cxf cxf-rt-core ${cxf-version} org.apache.cxf cxf-rt-frontend-jaxws ${cxf-version} org.apache.cxf cxf-rt-transports-http ${cxf-version} Developing the WebService As we want to develop webservice with the contract first approach we create our .wsdl file. As this is a example we have simplified the model of the incident to only include 8 fields. In real life the model would be a bit more complex, but not to much. We put the wsdl file in the folder src/main/webapp/WEB-INF/wsdl and name the file report_incident.wsdl. "1.0" encoding="ISO-8859-1"?> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://reportincident.example.camel.apache.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://reportincident.example.camel.apache.org"> "http://reportincident.example.camel.apache.org"> "inputReportIncident"> "xs:string" name="incidentId"/> "xs:string" name="incidentDate"/> "xs:string" name="givenName"/> "xs:string" name="familyName"/> "xs:string" name="summary"/> "xs:string" name="details"/> "xs:string" name="email"/> "xs:string" name="phone"/> "outputReportIncident"> "xs:string" name="code"/> "inputReportIncident"> "parameters" element="tns:inputReportIncident"/> "outputReportIncident"> "parameters" element="tns:outputReportIncident"/> "ReportIncidentEndpoint"> "ReportIncident"> "tns:inputReportIncident"/> "tns:outputReportIncident"/> "ReportIncidentBinding" type="tns:ReportIncidentEndpoint"> "http://schemas.xmlsoap.org/soap/http"/> "ReportIncident"> "http://reportincident.example.camel.apache.org/ReportIncident" style="document"/> "parameters" use="literal"/> "parameters" use="literal"/> "ReportIncidentService"> "ReportIncidentPort" binding="tns:ReportIncidentBinding"> "http://reportincident.example.camel.apache.org"/> CXF wsdl2java Then we integration the CXF wsdl2java generator in the pom.xml so we have CXF generate the needed POJO classes for our webservice contract. However at first we must configure maven to live in the modern world of Java 1.5 so we must add this to the pom.xml org.apache.maven.plugins maven-compiler-plugin 1.5 1.5 And then we can add the CXF wsdl2java code generator that will hook into the compile goal so its automatic run all the time: org.apache.cxf cxf-codegen-plugin ${cxf-version} generate-sources generate-sources ${basedir}/target/generated/src/main/java ${basedir}/src/main/webapp/WEB-INF/wsdl/report_incident.wsdl wsdl2java You are now setup and should be able to compile the project. So running the mvn compile should run the CXF wsdl2java and generate the source code in the folder &{basedir}/target/generated/src/main/java that we specified in the pom.xml above. Since its in the target/generated/src/main/java maven will pick it up and include it in the build process.
svn commit: r830476 - in /websites/production/camel/content: cache/main.pageCache vtd-xml.html
Author: buildbot Date: Wed Aug 29 16:17:43 2012 New Revision: 830476 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/vtd-xml.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/vtd-xml.html == --- websites/production/camel/content/vtd-xml.html (original) +++ websites/production/camel/content/vtd-xml.html Wed Aug 29 16:17:43 2012 @@ -89,15 +89,26 @@ This component is particular efficient f from("file:inbox") - .split().language("vtdxpath", "/persons/person").streaming() + .split().vtdxml("/persons/person").streaming() .to("activemq:queue:person") .end() -This will run the Splitter in streaming mode using the vtdxml language. +And in XML DSL + + ++ + + -There is a builder class org.apache.camel.component.vtdxml.VtdXmlXPathBuilder which you can use from Java code to execute xpath expressions/predicates using the vtd-xml library. +This will run the Splitter in streaming mode using the vtdxml language. See Also Configuring CamelComponentEndpointGetting Started+ + +/persons/person ++
[CONF] Apache Camel > VTD-XML
VTD-XML Page edited by Claus Ibsen Changes (4) ... {code} from("file:inbox") .split().language("vtdxpath", "/persons/person").streaming() .split().vtdxml("/persons/person").streaming() .to("activemq:queue:person") .end() {code} And in XML DSL {code:xml} /persons/person{code} This will run the [Splitter] in streaming mode using the *vtdxml* language. There is a builder class {{org.apache.camel.component.vtdxml.VtdXmlXPathBuilder}} which you can use from Java code to execute xpath expressions/predicates using the vtd-xml library. {include:Endpoint See Also} Full Content VTD-XML Available as of Camel 2.11 The VTD-XML component supports the VTD-XML Library for very fast and efficient XPath processing. The camel-vtdxml library is provided by the Camel Extra project which hosts all *GPL related components for Camel. Using The VTD-XML is implemented as a Camel Language which allows you to easily use it in the Camel routes. This component is particular efficient for splitting files or other big payloads. For example to split a big file containing many persons, you could do: from("file:inbox") .split().vtdxml("/persons/person").streaming() .to("activemq:queue:person") .end() And in XML DSL "file:inbox"/> "true"> /persons/person "activemq:queue:person"/> This will run the Splitter in streaming mode using the vtdxml language. See Also Configuring Camel Component Endpoint Getting Started Change Notification Preferences View Online | View Changes | Add Comment
svn commit: r1378628 - in /camel/trunk/camel-core/src/main: java/org/apache/camel/builder/ java/org/apache/camel/builder/xml/ java/org/apache/camel/model/language/ resources/org/apache/camel/model/lan
Author: davsclaus Date: Wed Aug 29 16:05:44 2012 New Revision: 1378628 URL: http://svn.apache.org/viewvc?rev=1378628&view=rev Log: CAMEL-5549: Added vtdxml language to Camel DSL to support camel-vtdxml component. Added: camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/VtdXmlExpression.java - copied, changed from r1378605, camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/XQueryExpression.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/Namespaces.java camel/trunk/camel-core/src/main/resources/org/apache/camel/model/language/jaxb.index Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java?rev=1378628&r1=1378627&r2=1378628&view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java Wed Aug 29 16:05:44 2012 @@ -534,6 +534,43 @@ public class ExpressionClause extends } /** + * Evaluates an http://camel.apache.org/vtdxml.html";>XPath + * expression using the VTD-XML library + * + * @param text the expression to be evaluated + * @return the builder to continue processing the DSL + */ +public T vtdxml(String text) { +return delegate.vtdxml(text); +} + +/** + * Evaluates an http://camel.apache.org/vtdxml.html";>XPath + * expression using the VTD-XML library + * with the specified set of namespace prefixes and URIs + * + * @param text the expression to be evaluated + * @param namespaces the namespace prefix and URIs to use + * @return the builder to continue processing the DSL + */ +public T vtdxml(String text, Namespaces namespaces) { +return delegate.vtdxml(text, namespaces); +} + +/** + * Evaluates an http://camel.apache.org/vtdxml.html";>XPath + * expression using the VTD-XML library + * with the specified set of namespace prefixes and URIs + * + * @param text the expression to be evaluated + * @param namespaces the namespace prefix and URIs to use + * @return the builder to continue processing the DSL + */ +public T vtdxml(String text, Map namespaces) { +return delegate.vtdxml(text, namespaces); +} + +/** * Evaluates an http://camel.apache.org/xpath.html";>XPath * expression * Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java?rev=1378628&r1=1378627&r2=1378628&view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java Wed Aug 29 16:05:44 2012 @@ -41,6 +41,7 @@ import org.apache.camel.model.language.S import org.apache.camel.model.language.SpELExpression; import org.apache.camel.model.language.SqlExpression; import org.apache.camel.model.language.TokenizerExpression; +import org.apache.camel.model.language.VtdXmlExpression; import org.apache.camel.model.language.XPathExpression; import org.apache.camel.model.language.XQueryExpression; @@ -563,6 +564,46 @@ public class ExpressionClauseSupport } /** + * Evaluates an http://camel.apache.org/vtdxml.html";>XPath + * expression using the VTD-XML library + * + * @param text the expression to be evaluated + * @return the builder to continue processing the DSL + */ +public T vtdxml(String text) { +return expression(new VtdXmlExpression(text)); +} + +/** + * Evaluates an http://camel.apache.org/vtdxml.html";>XPath + * expression using the VTD-XML library + * with the specified set of namespace prefixes and URIs + * + * @param text the expression to be evaluated + * @param namespaces the namespace prefix and URIs to use + * @return the builder to continue processing the DSL + */ +public T vtdxml(String text, Namespaces namespaces) { +return vtdxml(text, namespaces.getNamespaces()); +} + +/** + * Evaluates an http://camel.apache.org/vtdxml.html";>XPath + * expression using the VTD-XML library + * with the specified set of namespace prefixes and URIs + * + * @param text the expression to be evaluated + * @pa
[CONF] Apache Camel > Download
Download Comment removed by Daniel Kulp Adding a quick comment to see what will happen.. Change Notification Preferences
[CONF] Apache Camel > Download
Download Page comment added by Daniel Kulp Adding a quick comment to see what will happen.. Change Notification Preferences View Online | Reply To This
svn commit: r830472 [12/15] - in /websites/production/camel/content: ./ cache/
Modified: websites/production/camel/content/siteindex.html == --- websites/production/camel/content/siteindex.html (original) +++ websites/production/camel/content/siteindex.html Wed Aug 29 15:53:50 2012 @@ -80,7 +80,7 @@ - 0-9 ... 0A ... 29B ... 34C ... 120D ... 28E ... 27F ... 12G ... 23H ... 78I ... 15J ... 23K ... 3L ... 16M ... 26N ... 7O ... 4P ... 24Q ... 4R ... 27S ... 63T ... 40U ... 16V ... 5W ... 26X< /a> ... 11Y ... 0Z ... 2!@#$ ... 0 + 0-9 ... 0A ... 29B ... 35C ... 122D ... 28E ... 28F ... 12G ... 23H ... 79I ... 15J ... 23K ... 3L ... 16M ... 26N ... 7O ... 4P ... 24Q ... 4R ... 27S ... 86T ... 40U ... 16V ... 6W ... 27X< /a> ... 11Y ... 0Z ... 2!@#$ ... 0 0-9 A Page: @@ -261,6 +261,10 @@ 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 Using OSGi blueprint with Camel, but given Blueprint is an OSGi specific technology, writing unit tests ... Page: + Board Reports + + Status report for the Apache Camel project September 2012 work in progress Status report for the Apache Camel project June 2012 Status report for the Apache Camel project March 2012 Status report for the Apache Camel project December 2011 ... + Page: Book Book These pages are used to create the DocBook for the User Guide Introduction Book Introduction Getting Started Book Getting Started Architecture Book Architecture Enterprise Integration Patterns Book Enterprise Integration Patterns Cook Book Book cookbook Tutorials ... @@ -287,7 +291,7 @@ Page: Book Front Cover - Apache Camel User GuideVersion 2.7.0
Copyright 20072011, Apache Software Foundation + Apache Camel User GuideVersion 2.10.0
Copyright 20072012, Apache Software Foundation Page: Book Getting Started @@ -650,6 +654,10 @@ Camel proposes different solutions to allow your solution to be scalable, to distribute the load between different instances. The choice will depend on how you will deploy/package Camel (standalone mode, embedded in a J2EE or OSGI server, ...) and how the servers will be configured (master ... Page: + CMIS + + CMIS Component Available as of Camel 2.11 The cmis component uses the Apache Chemistry http://chemistry.apache.org/java/opencmis.html client API and allows you to add/read nodes to/from a CMIS compliant content repositories. URI Format cmis://cmisServerUrl ... + Page: Code Walkthrough Code Walkthrough The main module to get to grips with is the camelcore http://camel.apache.org/maven/current/camelcore/apidocs/index.html module which defines the core APIs and the DSL. Often developers pick up libraries by looking at test cases. Probably the best ... @@ -750,6 +758,10 @@ Correlation Identifier Camel supports the Correlation Identifier http://www.enterpriseintegrationpatterns.com/CorrelationIdentifier.html from the EIP patterns Enterprise Integration Patterns by getting or setting a header on a Message. When working with the ActiveMQ or JMS components the correlation identifier header is called JMSCorrelationID. You ... Page: + CouchDB + + Camel CouchDB component Available as of Camel 2.11 The couchdb: component allows you to treat CouchDB http://couchdb.apache.org/ instances as a producer or consumer of messages. Using the lightweight LightCouch API, this camel component has the following features: As a consumer, monitors couch ... + Page: Creating a new Camel Component Creating a new Camel Component If you want to create your own version of the Camel Component you can use the Camel Maven Archetypes.mvn archetype:generate \ DarchetypeGroupId=org.apache.camel.archetypes \ DarchetypeArtifactId=camelarchetypecomponent \ DarchetypeVersion=2.9.0 \ DgroupId=myGroupId \ DartifactId ... @@ -948,6 +960,10 @@ EL Camel supports the unified JSP and JSF Expression Language via the JUEL http://juel.sourceforge.net/ to allow an Expression or Predicate to be used in the DSL or Xml Configuration. For example
svn commit: r830472 [3/15] - in /websites/production/camel/content: ./ cache/
Modified: websites/production/camel/content/book-enterprise-integration-patterns.html == --- websites/production/camel/content/book-enterprise-integration-patterns.html (original) +++ websites/production/camel/content/book-enterprise-integration-patterns.html Wed Aug 29 15:53:50 2012 @@ -87,49 +87,49 @@ Messaging Systems - http://www.enterpriseintegrationpatterns.com/img/ChannelIcon.gif"; style="border: 0px solid black"> Message Channel How does one application communicate with another using messaging? http://www.enterpriseintegrationpatterns.com/img/MessageIcon.gif"; style="border: 0px solid black"> Message How can two applications connected by a message channel exchange a piece of information? http://www.enterpriseintegrationpatterns.com/img/PipesAndFiltersIcon.gif"; style="border: 0px solid black"> Pipes and Filters How can we perform complex processing on a message while maintaining independence and flexibility? http://www.enterpriseintegrationpatterns.com/img/ContentBasedRouterIcon.gif"; style="border: 0px solid black"> Message Router How can you decouple individual processing steps so that messages can be passed to different filters depending on a set of conditions? http://www.enterpriseintegrationpatterns.com/img/MessageTranslatorIcon.gif"; style="border: 0px solid black"> Message Translator How can systems using different data formats communicate with each other using messaging? http://www.enterpriseintegrationpatterns.com/img/MessageEndpointIcon.gif"; style="border: 0px solid black"> Message Endpoint How does an application connect to a messaging channel to send and receive messages? + http://www.eaipatterns.com/img/ChannelIcon.gif"; style="border: 0px solid black"> Message Channel How does one application communicate with another using messaging? http://www.eaipatterns.com/img/MessageIcon.gif"; style="border: 0px solid black"> Message How can two applications connected by a message channel exchange a piece of information? http://www.eaipatterns.com/img/PipesAndFiltersIcon.gif"; style="border: 0px solid black"> Pipes and Filters How can we perform complex processing on a message while maintaining independence and flexibility? http://www.eaipatterns.com/img/ContentBasedRouterIcon.gif"; style="border: 0px solid black"> Message Router How can you decouple individual processing steps so that messages can be passed to different filters depending on a set o f conditions? http://www.eaipatterns.com/img/MessageTranslatorIcon.gif"; style="border: 0px solid black"> Message Translator How can systems using different data formats communicate with each other using messaging? http://www.eaipatterns.com/img/MessageEndpointIcon.gif"; style="border: 0px solid black"> Message Endpoint How does an application connect to a messaging channel to send and receive messages? Messaging Channels - http://www.enterpriseintegrationpatterns.com/img/PointToPointIcon.gif"; style="border: 0px solid black"> Point to Point Channel How can the caller be sure that exactly one receiver will receive the document or perform the call? http://www.enterpriseintegrationpatterns.com/img/PublishSubscribeIcon.gif"; style="border: 0px solid black"> Publish Subscribe Channel How can the sender broadcast an event to all interested receivers? http://www.enterpriseintegrationpatterns.com/img/DeadLetterChannelIcon.gif"; style="border: 0px solid black"> Dead Letter Channel What will the messaging system do with a message it cannot deliver? http://www.enterpriseintegrationpatterns.com/img/GuaranteedMessagingIcon.gif"; style="border: 0px solid black"> Guaranteed Delivery How can the sender make sure that a message will be delivered, even if the messaging system fails? http://www.enterpriseintegrationpatterns.com/img/MessageBusIcon.gif"; style="border: 0px solid black"> Message Bus What is an architecture that enables separate applications to work together, but in a de-coupled fashion such that applications can be easily added or removed without affecting the others? + http://www.eaipatterns.com/img/PointToPointIcon.gif"; style="border: 0px solid black"> Point to Point Channel How can the caller be sure that exactly one receiver will receive the document or perform the call? http://www.eaipatterns.com/img/PublishSubscribeIcon.gif"; style="border: 0px solid black"> Publish Subscribe Channel How can the sender broadcast an event to all interested receivers? http://www.eaipatterns.com/img/DeadLetterChannelIcon.gif"; style="border: 0px solid black"> Dead Letter Channel What will the messaging system do with a message it cannot deliver? http://www.eaipatterns.com/img/GuaranteedMessagingIcon.gif"; style="border: 0px solid black"> Guaranteed Delivery How can the sender make sur e that a message will be delivered, even if the messaging s
svn commit: r830472 [2/15] - in /websites/production/camel/content: ./ cache/
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 Wed Aug 29 15:53:50 2012 @@ -5529,7 +5529,7 @@ hazelcast:[ map | multimap | queue | sed https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif"; width="16" height="16" alt="" border="0">Header variables have changed in Camel 2.8 - Name Type Description CamelHazelcastOperationType String valid values are: put, delete, get, update, query [Version 2.8] CamelHazelcastObjectId String the object id to store / find your object inside the cache (not needed for the query operation) [Version 2.8] + Name Type Description CamelHazelcastOperationType String valid values are: put, delete, get, update, query https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=CAMEL&title=Version+2.8&linkCreation=true&fromPageId=25202845";>Version 2.8 CamelHazelcastObjectId String the object id to store / find your object inside the cache (not needed for the query operation) https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=CAMEL&title=Version+2.8&linkCreation=true&fromPageId=25202845";>Version 2.8 @@ -5690,7 +5690,7 @@ template.sendBodyAndHeader(https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif"; width="16" height="16" alt="" border="0">Header variables have changed in Camel 2.8 - Name Type Description CamelHazelcastListenerTime Long time of the event in millis [Version 2.8] CamelHazelcastListenerType String the map consumer sets here "cachelistener" [Version 2.8] CamelHazelcastListenerAction String type of event - here added, updated, envicted and removed. [Version 2.8] CamelHazelcastObjectId String the oid of the object [Version 2.8] CamelHazelcastCacheName String the name of the cache - e.g. "foo" [Version 2.8] CamelHazelcastCacheType String the type of the cache - here map [Version 2.8] + Name Type Description CamelHazelcastListenerTime Long time of the event in millis https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=CAMEL&title=Version+2.8&linkCreation=true&fromPageId=25202845";>Version 2.8 CamelHazelcastListenerType String the map consumer sets here "cachelistener" https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=CAMEL&title=Version+2.8&linkCreation=true&fromPageId=25202845";>Version 2.8 CamelHazelcastListenerAction String type of event - here added, updated, envicted and removed. https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=CAMEL&title=Version+2.8&linkCreation=true&fromPageId=25202845";>Version 2.8 CamelHazelcastObjectId String the oid of the object Version 2.8 CamelHazelcastCacheName String the name of the cache - e.g. "foo" https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=CAMEL&title=Version+2.8&linkCreation=true&fromPageId=25202845";>Version 2.8 CamelHazelcastCacheType String the type of the cache - here map https://cwiki.apache.org/confluence/pages/createpage.action?spaceKe y=CAMEL&title=Version+2.8&linkCreation=true&fromPageId=25202845">Version 2.8 @@ -5738,7 +5738,7 @@ fromF("hazelcas - Name Type Description CamelHazelcastOperationType String valid values are: put, delete, get, update, query Available as of Camel 2.8 CamelHazelcastObjectId String the object id to store / find your object inside the cache (not needed for the query operation) [Version 2.8] + Name Type Description CamelHazelcastOperationType String valid values are: put, delete, get, update, query Available as of Camel 2.8 CamelHazelcastObjectId String the object id to store / find your object inside the cache (not needed for the query operation) https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=CAMEL&title=Version+ 2.8&linkCreation=true&fromPageId=25202845">Version 2.8 @@ -5899,7 +5899,7 @@ template.sendBodyAndHeader(https://cwiki.apache.org/confluence/images/icons/emoticons/forbidden.gif"; width="16" height="16" alt="" border="0">Header variables have changed in Camel 2.8 - Name Type Description CamelHazelcastListenerTime Long time of the event in millis [Version 2.8] CamelHazelcastListenerType String the map consumer sets here "cachelistener" [Version 2.8] CamelHazelcastListenerAction String type of event - here added, updated, envicted and removed. [Version 2.8] CamelHazelcastObjectId String the oid of the object [Version 2.8] CamelHazelcastCacheName String the name of the cache - e.g. "foo" [Version 2.8] CamelHazelcastCacheType String the type of the cache - here map [Version 2.8] + Name Type Description CamelHazelcastListenerTime Long time of the event in millis https://cwiki.apache.org/confluence/pages/creat
svn commit: r1378606 - /camel/website/template/template.camel
Author: dkulp Date: Wed Aug 29 15:22:35 2012 New Revision: 1378606 URL: http://svn.apache.org/viewvc?rev=1378606&view=rev Log: Add comment link Modified: camel/website/template/template.camel Modified: camel/website/template/template.camel URL: http://svn.apache.org/viewvc/camel/website/template/template.camel?rev=1378606&r1=1378605&r2=1378606&view=diff == --- camel/website/template/template.camel (original) +++ camel/website/template/template.camel Wed Aug 29 15:22:35 2012 @@ -100,7 +100,8 @@ $content Privacy Policy - -(edit page) +(edit page) +(add comment)
svn commit: r830470 - in /websites/production/camel/content: book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache camel-2110-release.html vtd-xml.html xmlsecurity-dataformat.html
Author: buildbot Date: Wed Aug 29 15:19:57 2012 New Revision: 830470 Log: Production update by buildbot for camel Added: websites/production/camel/content/vtd-xml.html 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-2110-release.html websites/production/camel/content/xmlsecurity-dataformat.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 Wed Aug 29 15:19:57 2012 @@ -2443,7 +2443,7 @@ The XMLSecurity DataFormat supports asym Option Default Description recipientKeyAlias none The key alias to be used when retrieving the recipient's public or private key from a KeyStore when performing asymmetric key encryption or decryption keyCipherAlgorithm none The cipher algorithm to be used for encryption/decription of the asymmetric key. The available choices are: XMLCipher.RSA_v1dot5XMLCipher.RSA_OAEP - keyOrTrustStoreParameters none Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. keyPassword none 2.10.2, 2.11 The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption. + keyOrTrustStoreParameters none Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. keyPassword none Camel 2.10.2 / 2.11 The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption. 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 Wed Aug 29 15:19:57 2012 @@ -13400,7 +13400,7 @@ The XMLSecurity DataFormat supports asym Option Default Description recipientKeyAlias none The key alias to be used when retrieving the recipient's public or private key from a KeyStore when performing asymmetric key encryption or decryption keyCipherAlgorithm none The cipher algorithm to be used for encryption/decription of the asymmetric key. The available choices are: XMLCipher.RSA_v1dot5XMLCipher.RSA_OAEP - keyOrTrustStoreParameters none Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. keyPassword none 2.10.2, 2.11 The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption. + keyOrTrustStoreParameters none Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. keyPassword none Camel 2.10.2 / 2.11 The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption. Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2110-release.html == --- websites/production/camel/content/camel-2110-release.html (original) +++ websites/production/camel/content/camel-2110-release.html Wed Aug 29 15:19:57 2012 @@ -84,7 +84,7 @@ Welcome to the 2.11.0 release with approximately XXX issues resolved - including new features, improvements, and bug fixes, such as: -Added support for SOAP 1.2 in SOAP data format.Cache operation for add/update now supports expiry headers to control time to live/idle/eternal.Added allowNullBody option to JMS to configure whether sending messages with no body is allowed.Added connectOnStartup option to HDFS to allow to connect on demand, to avoid having Hadoop block for long time connecting to the HDFS cluster, as it has a hardcoded 15 minute retry mechanism.Added support for daily and weekly trends to Twitter component.The Camel Maven Archetypes now generates projects without any license headers.Added 'rejectOld' option to the title="Resequencer">Resequencer to prevent out of order messages from >being delivered after capacity/timeout events occurFurther optimized >XPath under concurrent >load, and as well ensured resources are cleaned up eagerlyAdded >options allowNullBody and readLockMinLength to the shape="rect" href="file2.html" title="File2">File and href="ftp2.html" title="FTP2
[CONF] Apache Camel > VTD-XML
VTD-XML Page moved by Claus Ibsen From: Apache Camel > Components To: Apache Camel > Languages Children moved Change Notification Preferences View Online | Add Comment
[CONF] Apache Camel > Languages Supported
Languages Supported Page edited by Claus Ibsen Changes (1) ... * [XPath] * [XQuery] * [VTD-XML] Most of these languages is also supported used as [Annotation Based _expression_ Language]. Full Content Bean Language for using Java for expressions Constant the unified EL from JSP and JSF Header JXPath Mvel OGNL Ref Language Property Scala DSL Scripting Languages such as BeanShell _javascript_ Groovy Python PHP Ruby Simple File Language Spring _expression_ Language SQL Tokenizer XPath XQuery VTD-XML Most of these languages is also supported used as Annotation Based _expression_ Language. Change Notification Preferences View Online | View Changes | Add Comment
[CONF] Apache Camel > VTD-XML
VTD-XML Page added by Claus Ibsen VTD-XML Available as of Camel 2.11 The VTD-XML component supports the VTD-XML Library for very fast and efficient XPath processing. The camel-vtdxml library is provided by the Camel Extra project which hosts all *GPL related components for Camel. Using The VTD-XML is implemented as a Camel Language which allows you to easily use it in the Camel routes. This component is particular efficient for splitting files or other big payloads. For example to split a big file containing many persons, you could do: from("file:inbox") .split().language("vtdxpath", "/persons/person").streaming() .to("activemq:queue:person") .end() This will run the Splitter in streaming mode using the vtdxml language. There is a builder class org.apache.camel.component.vtdxml.VtdXmlXPathBuilder which you can use from Java code to execute xpath expressions/predicates using the vtd-xml library. See Also Configuring Camel Component Endpoint Getting Started Change Notification Preferences View Online | Add Comment
[CONF] Apache Camel > Camel 2.11.0 Release
Camel 2.11.0 Release Page edited by willem jiang Changes (1) ... * Enabled "lazy connections" for [XMPP] providers via the {{testConnectionOnStartup}} option * Added a connection monitor to detect and fix dropped [XMPP] consumer connections at configurable {{connectionPollDelay}} intervals * Added an ExchangeBuilder to build the exchange in a fluent way. h3. Fixed issues ... Full Content Camel 2.11.0 release (currently in progress) New and Noteworthy Welcome to the 2.11.0 release with approximately XXX issues resolved - including new features, improvements, and bug fixes, such as: Added support for SOAP 1.2 in SOAP data format. Cache operation for add/update now supports expiry headers to control time to live/idle/eternal. Added allowNullBody option to JMS to configure whether sending messages with no body is allowed. Added connectOnStartup option to HDFS to allow to connect on demand, to avoid having Hadoop block for long time connecting to the HDFS cluster, as it has a hardcoded 15 minute retry mechanism. Added support for daily and weekly trends to Twitter component. The Camel Maven Archetypes now generates projects without any license headers. Added 'rejectOld' option to the Resequencer to prevent out of order messages from being delivered after capacity/timeout events occur Further optimized XPath under concurrent load, and as well ensured resources are cleaned up eagerly Added options allowNullBody and readLockMinLength to the File and FTP components. Made changed read lock strategy on FTP go faster (eg when the FTP server has a lot of files in the directory) if you enable the fastExistsCheck=true option as well. Notice that some FTP server may not support this. HL7 moves the HAPI 2.0 and supports Parser instance into unmarshal and "Terser" language and _expression_ to be able to extract fields from a parsed message. HL7 also upgraded to now use Apache Mina 2.x. Add an option HttpMethodRestrict to restrict HTTP method in Jetty and SERVLET Add support for selection of Direct-VM consumers by using ant-like path _expression_. The POJO Producing, and POJO Consuming with @Consume, @Produce, @EndpointInject now supports a new {{property} attribute to get the endpoint configuration from a bean property (eg using a getter method); this allows you to configure this on the bean using conventional bean configuration. Testing with camel-test-blueprint on Windows no longer tries to cleanup after testing taking up 5 seconds and logging WARNs. The File, and FTP components now support fileExist=Move option to move any existing files before writing a file. Added option loadStatisticsEnabled on Camel JMX to allow to disable load statistics if not needed (avoids a background thread being in use, to calculate the load stats). Enabled "lazy connections" for XMPP providers via the testConnectionOnStartup option Added a connection monitor to detect and fix dropped XMPP consumer connections at configurable connectionPollDelay intervals Added an ExchangeBuilder to build the exchange in a fluent way. Fixed issues Fixed RoutePolicy used from Spring XML with routePolicyRef may not invoke all callbacks on the policy. Fixed MINA consumer to force disconnect upon timeout when doing request/reply, as late replies may cause side effects otherwise. Fixed Simple language with empty quoted literals in predicates, so you can compare against empty strings. Fixed SOAP data format to set SOAP 1.1 namespace when marhsalling faults. Fixed SEDA producer to send to the right BlockingQueue being attached on the SEDA endpoint so that the sent messages don't get lost. Fixed using sendEmptyMessageWhenIdle=true on a batch consumer such as File now working with Aggregate EIP when using completionFromBatchConsumer Fixed MockEndpoint.expectedBodiesReceivedInAnyOrder to allow asserting on multiple arrival of the same/equal bodies. Fixed MyBatis to demarcate the running transactions properly while reading/writing from/to database. Fixed Jetty, HTTP, HTTP4, and AHC http components not working in bridge mode if content path have spaces Fixed the CXF fallback convertor issue which camel will unregister it when the converter return null. Fixed the issue that File2 endpoints on windows without volume name in the path url. Fixed the issue of unmarshaling pgp messages encrypted with ElGamal. Fixed random Load Balancer to be even spread (before was a little less likely to pick the 1st) Fixed Timer to not fire during starting CamelContext Fixed XMLSecurity DataFormat to enable retrieval of password-protected private keys for asymmetric decryption New Enterprise Integration Patterns New Camel Karaf Command New Components camel-cmis - for
svn commit: r830461 - in /websites/production/camel/content: cache/main.pageCache camel-2110-release.html
Author: buildbot Date: Wed Aug 29 14:17:29 2012 New Revision: 830461 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2110-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2110-release.html == --- websites/production/camel/content/camel-2110-release.html (original) +++ websites/production/camel/content/camel-2110-release.html Wed Aug 29 14:17:29 2012 @@ -89,8 +89,7 @@ Fixed issues -Fixed RoutePolicy used from Spring XML with routePolicyRef may not invoke all callbacks on the policy.Fixed MINA consumer to force disconnect upon timeout when doing request/reply, as late replies may cause side effects otherwise.Fixed Simple language with empty quoted literals in predicates, so you can compare against empty strings.Fixed SOAP data format to set SOAP 1.1 namespace when marhsalling faults.Fixed SEDA producer to send to the right BlockingQueue being attached on the SEDA endpoint so that the sent messages don't get lost.Fixed using sendEmptyMessageWhenIdle=true on a batch consume r such as File now working with Aggregate EIP when using completionFromBatchConsumerFixed MockEndpoint.expectedBodiesReceivedInAnyOrder to allow asserting on multiple arrival of the same/equal bodies.Fixed MyBatis to demarcate the running transactions properly while reading/writing from/to database.Fixed Jetty, HTTP, HTTP4, and AHC http components not working in bridge mode if content path have spacesFixed the CXF fallback convertor issue which camel will unregister it when the converter return null.Fixed the issue that title="File2">File2 endpoints on windows without volume name in the path >url.Fixed the issue of unmarshaling pgp messages encrypted with >ElGamal.Fixed random title="Load Balancer">Load Balancer to be even spread (before was a >little less likely to pick the 1st)Fixed href="timer.html" title="Timer">Timer to not fire during starting shape="rect" href="camelcontext.html" >title="CamelContext">CamelContext - +Fixed RoutePolicy used from Spring XML with routePolicyRef may not invoke all callbacks on the policy.Fixed MINA consumer to force disconnect upon timeout when doing request/reply, as late replies may cause side effects otherwise.Fixed Simple language with empty quoted literals in predicates, so you can compare against empty strings.Fixed SOAP data format to set SOAP 1.1 namespace when marhsalling faults.Fixed SEDA producer to send to the right BlockingQueue being attached on the SEDA endpoint so that the sent messages don't get lost.Fixed using sendEmptyMessageWhenIdle=true on a batch consume r such as File now working with Aggregate EIP when using completionFromBatchConsumerFixed MockEndpoint.expectedBodiesReceivedInAnyOrder to allow asserting on multiple arrival of the same/equal bodies.Fixed MyBatis to demarcate the running transactions properly while reading/writing from/to database.Fixed Jetty, HTTP, HTTP4, and AHC http components not working in bridge mode if content path have spacesFixed the CXF fallback convertor issue which camel will unregister it when the converter return null.Fixed the issue that title="File2">File2 endpoints on windows without volume name in the path >url.Fixed the issue of unmarshaling pgp messages encrypted with >ElGamal.Fixed random title="Load Balancer">Load Balancer to be even spread (before was a >little less likely to pick the 1st)Fixed href="timer.html" title="Timer">Timer to not fire during starting shape="rect" href="camelcontext.html" >title="CamelContext">CamelContextFixed href="xmlsecurity-dataformat.html" title="XMLSecurity DataFormat">XMLSecurity >DataFormat to enable retrieval of password-protected private keys for >asymmetric decryption New Enterprise Integration Patterns @@ -134,7 +133,7 @@ Dependency Upgrades -Axiom 1.2.10 to 1.2.12BeanIO 2.0.0 to 2.0.1ConcurrentLinkedHashMap 1.2 to 1.3.1Ehcache bundle 2.5.1_1 to 2.5.2_1HTTP Client 4.1.3 to 4.2.1Jettison 1.3.1 to 1.3.2Lucene 3.6.0 to 3.6.1Netty 3.5.1 to 3.5.5Ognl bundle 3.0.4_1 to 3.0.5_1Saxon 9.3.0.11 to 9.4.0.1Spring Framework 3.1.1 to 3.1.2Spring Integration 2.1.2 to 2.1.3SSHD 0.6.0 to 0.7.0Woodstox 4.1.2 to 4.1.3 +Axiom 1.2.10 to 1.2.12BeanIO 2.0.0 to 2.0.1ConcurrentLinkedHashMap 1.2 to 1.3.1Ehcache bundle 2.5.1_1 to 2.5.2_1HTTP Client 4.1.3 to 4.2.1Jettison 1.3.1 to 1.3.2Lucene 3.6.0 to 3.6.1Netty 3.5.1 to 3.5.5Ognl bundle 3.0.4_1 to 3.0.5_1Restlet 2.0.14 to 2.0.15Saxon 9.3.0.11 to 9.4.0.1Spring Framework 3.1.1 to 3.1.2Spring Integration 2.1.2 to 2.1.3SSHD 0.6.0 to 0.7.0Woodstox 4.1.2 to 4.1.3 Important changes to consider when upgrading
[CONF] Apache Camel > Camel 2.11.0 Release
Camel 2.11.0 Release Page edited by Rich Newcomb Changes (1) ... * Fixed random [Load Balancer] to be even spread (before was a little less likely to pick the 1st) * Fixed [Timer] to not fire during starting [CamelContext] * Fixed [XMLSecurity] to enable retrieval of password-protected private keys for asymmetric decryption h3. New [Enterprise Integration Patterns] ... Full Content Camel 2.11.0 release (currently in progress) New and Noteworthy Welcome to the 2.11.0 release with approximately XXX issues resolved - including new features, improvements, and bug fixes, such as: Added support for SOAP 1.2 in SOAP data format. Cache operation for add/update now supports expiry headers to control time to live/idle/eternal. Added allowNullBody option to JMS to configure whether sending messages with no body is allowed. Added connectOnStartup option to HDFS to allow to connect on demand, to avoid having Hadoop block for long time connecting to the HDFS cluster, as it has a hardcoded 15 minute retry mechanism. Added support for daily and weekly trends to Twitter component. The Camel Maven Archetypes now generates projects without any license headers. Added 'rejectOld' option to the Resequencer to prevent out of order messages from being delivered after capacity/timeout events occur Further optimized XPath under concurrent load, and as well ensured resources are cleaned up eagerly Added options allowNullBody and readLockMinLength to the File and FTP components. Made changed read lock strategy on FTP go faster (eg when the FTP server has a lot of files in the directory) if you enable the fastExistsCheck=true option as well. Notice that some FTP server may not support this. HL7 moves the HAPI 2.0 and supports Parser instance into unmarshal and "Terser" language and _expression_ to be able to extract fields from a parsed message. HL7 also upgraded to now use Apache Mina 2.x. Add an option HttpMethodRestrict to restrict HTTP method in Jetty and SERVLET Add support for selection of Direct-VM consumers by using ant-like path _expression_. The POJO Producing, and POJO Consuming with @Consume, @Produce, @EndpointInject now supports a new {{property} attribute to get the endpoint configuration from a bean property (eg using a getter method); this allows you to configure this on the bean using conventional bean configuration. Testing with camel-test-blueprint on Windows no longer tries to cleanup after testing taking up 5 seconds and logging WARNs. The File, and FTP components now support fileExist=Move option to move any existing files before writing a file. Added option loadStatisticsEnabled on Camel JMX to allow to disable load statistics if not needed (avoids a background thread being in use, to calculate the load stats). Enabled "lazy connections" for XMPP providers via the testConnectionOnStartup option Added a connection monitor to detect and fix dropped XMPP consumer connections at configurable connectionPollDelay intervals Fixed issues Fixed RoutePolicy used from Spring XML with routePolicyRef may not invoke all callbacks on the policy. Fixed MINA consumer to force disconnect upon timeout when doing request/reply, as late replies may cause side effects otherwise. Fixed Simple language with empty quoted literals in predicates, so you can compare against empty strings. Fixed SOAP data format to set SOAP 1.1 namespace when marhsalling faults. Fixed SEDA producer to send to the right BlockingQueue being attached on the SEDA endpoint so that the sent messages don't get lost. Fixed using sendEmptyMessageWhenIdle=true on a batch consumer such as File now working with Aggregate EIP when using completionFromBatchConsumer Fixed MockEndpoint.expectedBodiesReceivedInAnyOrder to allow asserting on multiple arrival of the same/equal bodies. Fixed MyBatis to demarcate the running transactions properly while reading/writing from/to database. Fixed Jetty, HTTP, HTTP4, and AHC http components not working in bridge mode if content path have spaces Fixed the CXF fallback convertor issue which camel will unregister it when the converter return null. Fixed the issue that File2 endpoints on windows without volume name in the path url. Fixed the issue of unmarshaling pgp messages encrypted with ElGamal. Fixed random Load Balancer to be even spread (before was a little less likely to pick the 1st) Fixed Timer to not fire during starting CamelContext Fixed XMLSecurity to enable retrieval of password-protected private keys for asymmetric decryption New Enterprise Integration Patterns New Camel Karaf Command New Components camel-cmis - for integration of CMIS compliant content repositories camel-couchdb -
[CONF] Apache Camel > Camel 2.11.0 Release
Camel 2.11.0 Release Page edited by Babak Vahdat Changes (1) ... * Netty 3.5.1 to 3.5.5 * Ognl bundle 3.0.4_1 to 3.0.5_1 * Restlet 2.0.14 to 2.0.15 * Saxon 9.3.0.11 to 9.4.0.1 * Spring Framework 3.1.1 to 3.1.2 ... Full Content Camel 2.11.0 release (currently in progress) New and Noteworthy Welcome to the 2.11.0 release with approximately XXX issues resolved - including new features, improvements, and bug fixes, such as: Added support for SOAP 1.2 in SOAP data format. Cache operation for add/update now supports expiry headers to control time to live/idle/eternal. Added allowNullBody option to JMS to configure whether sending messages with no body is allowed. Added connectOnStartup option to HDFS to allow to connect on demand, to avoid having Hadoop block for long time connecting to the HDFS cluster, as it has a hardcoded 15 minute retry mechanism. Added support for daily and weekly trends to Twitter component. The Camel Maven Archetypes now generates projects without any license headers. Added 'rejectOld' option to the Resequencer to prevent out of order messages from being delivered after capacity/timeout events occur Further optimized XPath under concurrent load, and as well ensured resources are cleaned up eagerly Added options allowNullBody and readLockMinLength to the File and FTP components. Made changed read lock strategy on FTP go faster (eg when the FTP server has a lot of files in the directory) if you enable the fastExistsCheck=true option as well. Notice that some FTP server may not support this. HL7 moves the HAPI 2.0 and supports Parser instance into unmarshal and "Terser" language and _expression_ to be able to extract fields from a parsed message. HL7 also upgraded to now use Apache Mina 2.x. Add an option HttpMethodRestrict to restrict HTTP method in Jetty and SERVLET Add support for selection of Direct-VM consumers by using ant-like path _expression_. The POJO Producing, and POJO Consuming with @Consume, @Produce, @EndpointInject now supports a new {{property} attribute to get the endpoint configuration from a bean property (eg using a getter method); this allows you to configure this on the bean using conventional bean configuration. Testing with camel-test-blueprint on Windows no longer tries to cleanup after testing taking up 5 seconds and logging WARNs. The File, and FTP components now support fileExist=Move option to move any existing files before writing a file. Added option loadStatisticsEnabled on Camel JMX to allow to disable load statistics if not needed (avoids a background thread being in use, to calculate the load stats). Enabled "lazy connections" for XMPP providers via the testConnectionOnStartup option Added a connection monitor to detect and fix dropped XMPP consumer connections at configurable connectionPollDelay intervals Fixed issues Fixed RoutePolicy used from Spring XML with routePolicyRef may not invoke all callbacks on the policy. Fixed MINA consumer to force disconnect upon timeout when doing request/reply, as late replies may cause side effects otherwise. Fixed Simple language with empty quoted literals in predicates, so you can compare against empty strings. Fixed SOAP data format to set SOAP 1.1 namespace when marhsalling faults. Fixed SEDA producer to send to the right BlockingQueue being attached on the SEDA endpoint so that the sent messages don't get lost. Fixed using sendEmptyMessageWhenIdle=true on a batch consumer such as File now working with Aggregate EIP when using completionFromBatchConsumer Fixed MockEndpoint.expectedBodiesReceivedInAnyOrder to allow asserting on multiple arrival of the same/equal bodies. Fixed MyBatis to demarcate the running transactions properly while reading/writing from/to database. Fixed Jetty, HTTP, HTTP4, and AHC http components not working in bridge mode if content path have spaces Fixed the CXF fallback convertor issue which camel will unregister it when the converter return null. Fixed the issue that File2 endpoints on windows without volume name in the path url. Fixed the issue of unmarshaling pgp messages encrypted with ElGamal. Fixed random Load Balancer to be even spread (before was a little less likely to pick the 1st) Fixed Timer to not fire during starting CamelContext New Enterprise Integration Patterns New Camel Karaf Command New Components camel-cmis - for integration of CMIS compliant content repositories camel-couchdb - for integration with Apache CouchDB camel-elasticsearch - for ElasticSearch integration camel-sjms - for "Springless" JMS integration camel-neo4j - for talking to neo4j server from Camel. DSL Changes Added LoggingErrorHandler fluent builder to Scala DSL. New A
svn commit: r1378549 - /camel/trunk/parent/pom.xml
Author: bvahdat Date: Wed Aug 29 13:40:51 2012 New Revision: 1378549 URL: http://svn.apache.org/viewvc?rev=1378549&view=rev Log: Upgrade to restlet 2.0.15. Modified: camel/trunk/parent/pom.xml Modified: camel/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/parent/pom.xml?rev=1378549&r1=1378548&r2=1378549&view=diff == --- camel/trunk/parent/pom.xml (original) +++ camel/trunk/parent/pom.xml Wed Aug 29 13:40:51 2012 @@ -162,7 +162,7 @@ 0.16 1.8.5 1.5.2-bd -2.0.14 +2.0.15 1.0 9.4.0.1 2.9.1
svn commit: r1378534 - in /camel/trunk: camel-core/src/test/java/org/apache/camel/component/xslt/ components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/ components/camel-couchdb/sr
Author: bvahdat Date: Wed Aug 29 13:22:42 2012 New Revision: 1378534 URL: http://svn.apache.org/viewvc?rev=1378534&view=rev Log: Polished. Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java camel/trunk/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbException.java camel/trunk/components/camel-couchdb/src/test/java/org/apache/camel/component/couchdb/CouchDbChangesetTrackerTest.java camel/trunk/components/camel-couchdb/src/test/java/org/apache/camel/component/couchdb/CouchDbProducerTest.java camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/cxfbean/CxfBeanWithWsdlLocationInBeanAndIoCTest.java camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/cxfbean/CxfBeanWithWsdlLocationInBeanTest.java camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpChangedExclusiveReadLockStrategy.java camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/SftpProcessStrategyFactory.java camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProducerTwoHeadersWithSameKeyTest.java camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProducerTwoParametersWithSameKeyTest.java camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProxyServerTest.java camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/handler/BasicValidationHandler.java camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java camel/trunk/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/FilterTest.java camel/trunk/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/consumer/streaming/FilterConsumer.java camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/http/Http4EndpointTest.java camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/http/Http4MaxConnectionPerHostTest.java Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java?rev=1378534&r1=1378533&r2=1378534&view=diff == --- camel/trunk/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java (original) +++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/xslt/XsltCustomizeURIResolverTest.java Wed Aug 29 13:22:42 2012 @@ -27,16 +27,12 @@ import org.apache.camel.ContextTestSuppo import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.impl.JndiRegistry; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * */ public class XsltCustomizeURIResolverTest extends ContextTestSupport { -private static final transient Logger LOG = LoggerFactory.getLogger(XsltCustomizeURIResolverTest.class); - private static final String EXPECTED_XML_CONSTANT = "FOO DATA"; public void testXsltCustomURIResolverDirectInRouteUri() throws Exception { Modified: camel/trunk/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbException.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbException.java?rev=1378534&r1=1378533&r2=1378534&view=diff == --- camel/trunk/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbException.java (original) +++ camel/trunk/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbException.java Wed Aug 29 13:22:42 2012 @@ -21,6 +21,8 @@ import org.apache.camel.Exchange; public class CouchDbException extends CamelExchangeException { +private static final long serialVersionUID = 1L; + public CouchDbException(String message, Exchange exchange) { super(message, exchange); } Modified: camel/trunk/components/camel-couchdb/src/test/java/org/apache/camel/component/couchdb/CouchDbChangesetTrackerTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-couchdb/src/test/java/org/apache/camel/component/couchdb/CouchDbChangesetTrackerTest.java?rev=1378534&r1=1378533&r2=1378534&view=diff =
svn commit: r830454 - in /websites/production/camel/content: book-dataformat-appendix.html book-in-one-page.html cache/main.pageCache xmlsecurity-dataformat.html
Author: buildbot Date: Wed Aug 29 13:19:13 2012 New Revision: 830454 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/xmlsecurity-dataformat.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 Wed Aug 29 13:19:13 2012 @@ -2443,7 +2443,7 @@ The XMLSecurity DataFormat supports asym Option Default Description recipientKeyAlias none The key alias to be used when retrieving the recipient's public or private key from a KeyStore when performing asymmetric key encryption or decryption keyCipherAlgorithm none The cipher algorithm to be used for encryption/decription of the asymmetric key. The available choices are: XMLCipher.RSA_v1dot5XMLCipher.RSA_OAEP - keyOrTrustStoreParameters none Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. + keyOrTrustStoreParameters none Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. keyPassword none 2.10.2, 2.11 The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption. @@ -2603,7 +2603,8 @@ context.addRoutes("http://www.w3.org/2001/04/xmlenc#aes128-cbc" keyCipherAlgorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" recipientKeyAlias="recipient" -keyOrTrustStoreParametersId="keyStoreParams" /> +keyOrTrustStoreParametersId="keyStoreParams" +keyPassword="privateKeyPassword" /> ... 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 Wed Aug 29 13:19:13 2012 @@ -13400,7 +13400,7 @@ The XMLSecurity DataFormat supports asym Option Default Description recipientKeyAlias none The key alias to be used when retrieving the recipient's public or private key from a KeyStore when performing asymmetric key encryption or decryption keyCipherAlgorithm none The cipher algorithm to be used for encryption/decription of the asymmetric key. The available choices are: XMLCipher.RSA_v1dot5XMLCipher.RSA_OAEP - keyOrTrustStoreParameters none Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. + keyOrTrustStoreParameters none Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. keyPassword none 2.10.2, 2.11 The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption. @@ -13560,7 +13560,8 @@ context.addRoutes("http://www.w3.org/2001/04/xmlenc#aes128-cbc" keyCipherAlgorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" recipientKeyAlias="recipient" -keyOrTrustStoreParametersId="keyStoreParams" /> +keyOrTrustStoreParametersId="keyStoreParams" +keyPassword="privateKeyPassword" /> ... Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/xmlsecurity-dataformat.html == --- websites/production/camel/content/xmlsecurity-dataformat.html (original) +++ websites/production/camel/content/xmlsecurity-dataformat.html Wed Aug 29 13:19:13 2012 @@ -108,7 +108,7 @@ The XMLSecurity DataFormat supports asym Option Default Description recipientKeyAlias none The key alias to be used when retrieving the recipient's public or private key from a KeyStore when performing asymmetric key encryption or decryption keyCipherAlgorithm none The cipher algorithm to be used for encryption/decription of the asymmetric key. The available choices are: XMLCipher.RSA_v1dot5XMLCipher.RSA_OAEP - keyOrTrustStoreParameters none Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or
[CONF] Apache Camel > XMLSecurity DataFormat
XMLSecurity DataFormat Page edited by Rich Newcomb Changes (3) ... * {{XMLCipher.RSA_OAEP}} | | keyOrTrustStoreParameters | none | Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. | | keyPassword | none | *2.10.2, 2.11* The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption. | h3. Marshal ... keyCipherAlgorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" recipientKeyAlias="recipient" keyOrTrustStoreParametersId="keyStoreParams" /> keyPassword="privateKeyPassword" /> ... ... Full Content XMLSecurity Data Format Available as of Camel 2.0 The XMLSecurity DataFormat facilitates encryption and decryption of XML payloads at the Document, Element and Element Content levels (including simultaneous multi-node encryption/decryption using XPATH). The encryption capability is based on formats supported using the Apache XML Security (Santaurio) project. Symmetric encryption/cecryption is currently supported using Triple-DES and AES (128, 192 and 256) encryption formats. Additional formats can be easily added later as needed. The capability allows Camel users to encrypt/decrypt payloads while being dispatched or received along a route. Available as of Camel 2.9 The XMLSecurity DataFormat supports asymmetric key encryption. In this encryption model a symmetric key is generated and used to perform XML content encryption or decryption. This "content encryption key" is then itself encrypted using an asymmetric encryption algorithm that leverages the recipient's public key as the "key encryption key". Use of an asymmetric key encryption algorithm ensures that only the holder of the recipient's private key can access the generated symmetric encryption key. Thus, only the private key holder can decode the message. The XMLSecurity DataFormat handles all of the logic required to encrypt and decrypt the message content and encryption key(s) using asymmetric key encryption. The XMLSecurity DataFormat also has improved support for namespaces when processing the XPath queries that select content for encryption. A namespace definition mapping can be included as part of the data format configuration. This enables true namespace matching, even if the prefix values in the XPath query and the target xml document are not equivalent strings. Basic Options Option Default Description secureTag null The XPATH reference to the XML Element selected for encryption/decryption. If no tag is specified, the entire payload is encrypted/decrypted. secureTagContents false A boolean value to specify whether the XML Element is to be encrypted or the contents of the XML Element false = Element Level true = Element Content Level passPhrase null A String used as passPhrase to encrypt/decrypt content. The passPhrase has to be provided. If no passPhrase is specified, a default passPhrase is used. The passPhrase needs to be put together in conjunction with the appropriate encryption algorithm. For example using TRIPLEDES the passPhase can be a "Only another 24 Byte key" xmlCipherAlgorithm TRIPLEDES The cipher algorithm to be used for encryption/decryption of the XML message content. The available choices are: XMLCipher.TRIPLEDES XMLCipher.AES_128 XMLCipher.AES_192 XMLCipher.AES_256 namespaces none A map of namespace values indexed by prefix. The index values must match the prefixes used in the secureTag XPath query. Asymmetric Encryption Options These options can be applied in addition to relevant the Basic options to use asymmetric key encryption. Option Default Description recipientKeyAlias none The key alias to be used when retrieving the recipient's public or private key from a KeyStore when performing asymmetric key encryption or decryption keyCipherAlgorithm none The cipher algorithm to be used for encryption/decription of the asymmetric key. The available choices are: XMLCipher.RSA_v1dot5 XMLCipher.RSA_OAEP keyOrTrustStoreParameters none Configuration options for creating and loading a KeyStore instance that represents the sender's trustStore or recipient's keyStore. keyPassword none 2.10.2, 2.11 The password to be used for retrieving the private key from the KeyStore. This key is used for asymmetric decryption. Marshal In order to encrypt the payload, the marshal processor needs to be applied on the route followed by the secureXML() tag. Unmarshal
svn commit: r1378526 - in /camel/trunk/components/camel-jms/src/test: java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java resources/org/apache/camel/component/jms/issues/JmsTXF
Author: davsclaus Date: Wed Aug 29 12:49:40 2012 New Revision: 1378526 URL: http://svn.apache.org/viewvc?rev=1378526&view=rev Log: Added test based on user forum issue Added: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java (with props) camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.xml - copied, changed from r1378512, camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/issues/TransactionErrorHandlerRedeliveryDelayTest-context.xml Added: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java?rev=1378526&view=auto == --- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java (added) +++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java Wed Aug 29 12:49:40 2012 @@ -0,0 +1,59 @@ +/** + * 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.jms.issues; + +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.test.junit4.CamelSpringTestSupport; +import org.junit.Ignore; +import org.junit.Test; +import org.springframework.context.support.AbstractApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +/** + * + */ +public class JmsTXForceShutdownIssueTest extends CamelSpringTestSupport { + +@Override +protected AbstractApplicationContext createApplicationContext() { +return new ClassPathXmlApplicationContext("org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.xml"); +} + +@Override +protected int getShutdownTimeout() { +// force a bit faster forced shutdown +return 5; +} + +@Test +@Ignore("This is a manual test, start Apache ActiveMQ broker manually first, using bin/activemq console") +// and make sure to setup tcp transport connector on the remote AMQ broker in the conf/activemq.xml file +// +// +// +// the ActiveMQ web console can be used to browse the queue: http://0.0.0.0:8161/admin/ +public void testTXForceShutdown() throws Exception { +MockEndpoint mock = getMockEndpoint("mock:inflight"); +mock.expectedMessageCount(1); + +template.sendBody("activemq:queue:inbox", "Hello World"); + +assertMockEndpointsSatisfied(); + +// will complete the test and force a shutdown ... +} +} Propchange: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java -- svn:eol-style = native Propchange: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.java -- svn:keywords = Rev Date Copied: camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.xml (from r1378512, camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/issues/TransactionErrorHandlerRedeliveryDelayTest-context.xml) URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.xml?p2=camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/issues/JmsTXForceShutdownIssueTest.xml&p1=camel/trunk/components/camel-jms/src/test/resources/org/apache/camel/component/jms/issues/TransactionErrorHandlerRedeliveryDelayTest-context.xml&r1=1378512&r2=1378526&rev=1378526&view=diff == --- camel/trunk/components/camel-jm
svn commit: r1378516 - /camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/TransactionErrorHandler.java
Author: davsclaus Date: Wed Aug 29 12:19:34 2012 New Revision: 1378516 URL: http://svn.apache.org/viewvc?rev=1378516&view=rev Log: Polished Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/TransactionErrorHandler.java Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/TransactionErrorHandler.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/TransactionErrorHandler.java?rev=1378516&r1=1378515&r2=1378516&view=diff == --- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/TransactionErrorHandler.java (original) +++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/TransactionErrorHandler.java Wed Aug 29 12:19:34 2012 @@ -195,6 +195,9 @@ public class TransactionErrorHandler ext } // throw runtime exception to force rollback (which works best to rollback with Spring transaction manager) +if (log.isTraceEnabled()) { +log.trace("Throwing runtime exception to force transaction to rollback on {}", transactionTemplate.getName()); +} throw rce; } }
svn commit: r1378511 - /camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperRoutePolicy.java
Author: davsclaus Date: Wed Aug 29 12:03:33 2012 New Revision: 1378511 URL: http://svn.apache.org/viewvc?rev=1378511&view=rev Log: CAMEL-5544: Polished zookeeper route policy. Thanks to Andrew Wheat for patch. Modified: camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperRoutePolicy.java Modified: camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperRoutePolicy.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperRoutePolicy.java?rev=1378511&r1=1378510&r2=1378511&view=diff == --- camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperRoutePolicy.java (original) +++ camel/trunk/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/ZooKeeperRoutePolicy.java Wed Aug 29 12:03:33 2012 @@ -17,6 +17,7 @@ package org.apache.camel.component.zookeeper.policy; import java.net.InetAddress; +import java.net.UnknownHostException; import java.util.Collections; import java.util.List; import java.util.Set; @@ -26,8 +27,6 @@ import java.util.concurrent.atomic.Atomi import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; -import static java.lang.String.format; - import org.apache.camel.CamelContext; import org.apache.camel.Exchange; import org.apache.camel.ExchangePattern; @@ -68,41 +67,40 @@ import org.apache.zookeeper.CreateMode; */ public class ZooKeeperRoutePolicy extends RoutePolicySupport { -private String uri; - -private int enabledCount; - +private final String uri; +private final int enabledCount; private String candidateName; - private final Lock lock = new ReentrantLock(); - private final CountDownLatch electionComplete = new CountDownLatch(1); - -private Set suspendedRoutes = new CopyOnWriteArraySet(); - -private AtomicBoolean shouldProcessExchanges = new AtomicBoolean(); - +private final Set suspendedRoutes = new CopyOnWriteArraySet(); +private final AtomicBoolean shouldProcessExchanges = new AtomicBoolean(); private ProducerTemplate template; +private volatile boolean shouldStopConsumer = true; +private final UuidGenerator uuidGenerator = new JavaUuidGenerator(); +private volatile boolean isCandidateCreated; -private boolean shouldStopConsumer = true; - -private UuidGenerator uuidGenerator = new JavaUuidGenerator(); - -private boolean isCandidateCreated; - -public ZooKeeperRoutePolicy(String uri, int enabledCount) throws Exception { +public ZooKeeperRoutePolicy(String uri, int enabledCount) { this.uri = uri; this.enabledCount = enabledCount; createCandidateName(); } -private void createCandidateName() throws Exception { +private void createCandidateName() { /** UUID would be enough, also using hostname for human readability */ -StringBuilder b = new StringBuilder(InetAddress.getLocalHost().getCanonicalHostName()); +StringBuilder b = new StringBuilder(fetchHostname()); b.append("-").append(uuidGenerator.generateUuid()); this.candidateName = b.toString(); } +private String fetchHostname() { +try { +return InetAddress.getLocalHost().getCanonicalHostName(); +} catch (UnknownHostException ex) { +log.warn("Unable to determine the local hostname, using a default.", ex); +return "default"; +} +} + @Override public void onExchangeBegin(Route route, Exchange exchange) { testAndCreateCandidateNode(route); @@ -180,7 +178,7 @@ public class ZooKeeperRoutePolicy extend lock.lock(); if (!suspendedRoutes.isEmpty()) { if (log.isDebugEnabled()) { -log.debug(format("'%d' have been stopped previously by poilcy, restarting.", suspendedRoutes.size())); +log.debug("{} have been stopped previously by policy, restarting.", suspendedRoutes.size()); } for (Route suspended : suspendedRoutes) { startConsumer(suspended.getConsumer()); @@ -205,9 +203,8 @@ public class ZooKeeperRoutePolicy extend private ZooKeeperEndpoint createCandidateNode(CamelContext camelContext) { this.template = camelContext.createProducerTemplate(); -if (log.isInfoEnabled()) { -log.info(format("Initializing ZookeeperRoutePolicy with uri '%s'", uri)); -} +log.info("Initializing ZookeeperRoutePolicy with uri {}", uri); + ZooKeeperEndpoint zep = camelContext.getEndpoint(uri, ZooKeeperEndpoint.class); zep.getConfiguration().setCreate(true); String fullpath = createFullPathToCan
svn commit: r830434 - in /websites/production/camel/content: book-in-one-page.html book-pattern-appendix.html cache/main.pageCache load-balancer.html
Author: buildbot Date: Wed Aug 29 09:18:33 2012 New Revision: 830434 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-in-one-page.html websites/production/camel/content/book-pattern-appendix.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/load-balancer.html 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 Wed Aug 29 09:18:33 2012 @@ -17959,7 +17959,7 @@ roundRobin().to( The above example loads balance requests from direct:start to one of the available mock endpoint instances, in this case using a round robin policy. -For further examples of this pattern look at http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/LoadBalanceTest.java?view=markup";>this junit test case +For further examples of this pattern look at http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoundRobinLoadBalanceTest.java?view=markup";>this junit test case Failover Available as of Camel 2.0 Modified: websites/production/camel/content/book-pattern-appendix.html == --- websites/production/camel/content/book-pattern-appendix.html (original) +++ websites/production/camel/content/book-pattern-appendix.html Wed Aug 29 09:18:33 2012 @@ -3601,7 +3601,7 @@ roundRobin().to( The above example loads balance requests from direct:start to one of the available mock endpoint instances, in this case using a round robin policy. -For further examples of this pattern look at http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/LoadBalanceTest.java?view=markup";>this junit test case +For further examples of this pattern look at http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoundRobinLoadBalanceTest.java?view=markup";>this junit test case Failover Available as of Camel 2.0 Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/load-balancer.html == --- websites/production/camel/content/load-balancer.html (original) +++ websites/production/camel/content/load-balancer.html Wed Aug 29 09:18:33 2012 @@ -120,7 +120,7 @@ roundRobin().to( The above example loads balance requests from direct:start to one of the available mock endpoint instances, in this case using a round robin policy. -For further examples of this pattern look at http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/LoadBalanceTest.java?view=markup";>this junit test case +For further examples of this pattern look at http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoundRobinLoadBalanceTest.java?view=markup";>this junit test case Failover Available as of Camel 2.0
[CONF] Apache Camel > Load Balancer
Load Balancer Page edited by willem jiang Comment: Fix the broken link. Changes (1) ... The above example loads balance requests from *direct:start* to one of the available *mock endpoint* instances, in this case using a round robin policy. For further examples of this pattern look at [this junit test case|http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoundRobinLoadBalanceTest.java?view=markup] h3. Failover ... Full Content Load Balancer The Load Balancer Pattern allows you to delegate to one of a number of endpoints using a variety of different load balancing policies. Built-in load balancing policies Camel provides the following policies out-of-the-box: Policy Description Round Robin The exchanges are selected from in a round robin fashion. This is a well known and classic policy, which spreads the load evenly. Random A random endpoint is selected for each exchange. Sticky Sticky load balancing using an _expression_ to calculate a correlation key to perform the sticky load balancing; rather like jsessionid in the web or JMSXGroupID in JMS. Topic Topic which sends to all destinations (rather like JMS Topics) Failover Camel 2.0: In case of failures the exchange will be tried on the next endpoint. Weighted Round-Robin Camel 2.5: The weighted load balancing policy allows you to specify a processing load distribution ratio for each server with respect to the others. In addition to the weight, endpoint selection is then further refined using round-robin distribution based on weight. Weighted Random Camel 2.5: The weighted load balancing policy allows you to specify a processing load distribution ratio for each server with respect to others.In addition to the weight, endpoint selection is then further refined using random distribution based on weight. Custom Camel 2.8: From Camel 2.8 onwards the preferred way of using a custom Load Balancer is to use this policy, instead of using the @deprecated ref attribute. Load balancing HTTP endpointsIf you are proxying and load balancing HTTP, then see this page for more details. Round Robin The round robin load balancer is not meant to work with failover, for that you should use the dedicated failover load balancer. The round robin load balancer will only change to next endpoint per message. The round robin load balancer is stateful as it keeps state of which endpoint to use next time. Using the Fluent Builders from("direct:start").loadBalance(). roundRobin().to("mock:x", "mock:y", "mock:z"); Using the Spring configuration "camel" xmlns="http://camel.apache.org/schema/spring"> "direct:start"/> "mock:x"/> "mock:y"/> "mock:z"/> The above example loads balance requests from direct:start to one of the available mock endpoint instances, in this case using a round robin policy. For further examples of this pattern look at this junit test case Failover Available as of Camel 2.0 The failover load balancer is capable of trying the next processor in case an Exchange failed with an exception during processing. You can constrain the failover to activate only when one exception of a list you specify occurs. If you do not specify a list any exception will cause fail over to occur. This balancer uses the same strategy for matching exceptions as the Exception Clause does for the onException. Enable stream caching if using streamsIf you use streaming then you should enable Stream caching when using the failover load balancer. This is needed so the stream can be re-read after failing over to the next processor. Failover offers the following options: Option Type Default Description inheritErrorHandler boolean true Camel 2.3: Whether or not the Error Handler configured on the route should be used. Disable this if you want failover to transfer immediately to the next endpoint. On the other hand, if you have this option enabled, then Camel will first let the Error Handler try to process the message. The Error Handler may have been configured to redeliver and use delays between attempts. If you have enabled a number of redeliveries then Camel will try to redeliver to the same endpoint, and only fail over to the next endpoint, when the Error Handler is exhausted. maximumFailoverAttempts int -1 Camel 2.3: A value to indicate after X failover attempts we should exhaust (give up). Use -1 to indicate never give up and continuously try to failover. Use 0 to never failover. And use e.g. 3 to failover at most 3 times before giving up. This option can be
svn commit: r1378477 - in /camel/branches/camel-2.10.x: ./ camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/model/dataformat/ components/camel-xmlsecurity/s
Author: davsclaus Date: Wed Aug 29 08:38:02 2012 New Revision: 1378477 URL: http://svn.apache.org/viewvc?rev=1378477&view=rev Log: CAMEL-5545: Support key password for private key access in XMLSecurity. Thanks to Rich Newcomb for the patch. Added: camel/branches/camel-2.10.x/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/SpringXmlSecurityDataFormatWithKeyPasswordTest.java - copied unchanged from r1378476, camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/SpringXmlSecurityDataFormatWithKeyPasswordTest.java camel/branches/camel-2.10.x/components/camel-xmlsecurity/src/test/resources/org/apache/camel/dataformat/xmlsecurity/SpringXmlSecurityDataFormatWithKeyPasswordTest-context.xml - copied unchanged from r1378476, camel/trunk/components/camel-xmlsecurity/src/test/resources/org/apache/camel/dataformat/xmlsecurity/SpringXmlSecurityDataFormatWithKeyPasswordTest-context.xml camel/branches/camel-2.10.x/components/camel-xmlsecurity/src/test/resources/recipient-with-key-pass.ks - copied unchanged from r1378476, camel/trunk/components/camel-xmlsecurity/src/test/resources/recipient-with-key-pass.ks Modified: camel/branches/camel-2.10.x/ (props changed) camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java camel/branches/camel-2.10.x/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java camel/branches/camel-2.10.x/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java Propchange: camel/branches/camel-2.10.x/ -- Merged /camel/trunk:r1378476 Propchange: camel/branches/camel-2.10.x/ -- Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java?rev=1378477&r1=1378476&r2=1378477&view=diff == --- camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java (original) +++ camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java Wed Aug 29 08:38:02 2012 @@ -516,6 +516,16 @@ public class DataFormatClause namespaces, boolean secureTagContents, String recipientKeyAlias, String xmlCipherAlgorithm, String keyCipherAlgorithm, String keyOrTrustStoreParametersId) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents, recipientKeyAlias, xmlCipherAlgorithm, @@ -536,6 +556,16 @@ public class DataFormatClause namespaces, boolean secureTagContents, String recipientKeyAlias, +String xmlCipherAlgorithm, String keyCipherAlgorithm, String keyOrTrustStoreParametersId, String keyPassword) { +XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents, recipientKeyAlias, xmlCipherAlgorithm, +keyCipherAlgorithm, keyOrTrustStoreParametersId, keyPassword); +return dataFormat(xsdf); +} + +/** + * Uses the XML Security data format + */ +public T secureXML(String secureTag, Map namespaces, boolean secureTagContents, String recipientKeyAlias, String xmlCipherAlgorithm, String keyCipherAlgorithm, KeyStoreParameters keyOrTrustStoreParameters) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents, recipientKeyAlias, xmlCipherAlgorithm, keyCipherAlgorithm, keyOrTrustStoreParameters); @@ -543,6 +573,16 @@ public class DataFormatClause namespaces, boolean secureTagContents, String recipientKeyAlias, +String xmlCipherAlgorithm, String keyCipherAlgorithm, KeyStoreParameters keyOrTrustStoreParameters, String keyPassword) { +XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents, recipientKeyAlias, xmlCipherAlgorithm, +keyCipherAlgorithm, keyOrTrustStoreParameters, keyPassword); +return dataFormat(xsdf); +} + +/** * Uses the xmlBeans data format */ public T xmlBeans() { Modified: camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/model/datafor
svn commit: r1378476 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/model/dataformat/ components/camel-xmlsecurity/src/main/java/org/ap
Author: davsclaus Date: Wed Aug 29 08:36:27 2012 New Revision: 1378476 URL: http://svn.apache.org/viewvc?rev=1378476&view=rev Log: CAMEL-5545: Support key password for private key access in XMLSecurity. Thanks to Rich Newcomb for the patch. Added: camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/SpringXmlSecurityDataFormatWithKeyPasswordTest.java (with props) camel/trunk/components/camel-xmlsecurity/src/test/resources/org/apache/camel/dataformat/xmlsecurity/SpringXmlSecurityDataFormatWithKeyPasswordTest-context.xml (with props) camel/trunk/components/camel-xmlsecurity/src/test/resources/recipient-with-key-pass.ks (with props) Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java camel/trunk/components/camel-xmlsecurity/src/main/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormat.java camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java?rev=1378476&r1=1378475&r2=1378476&view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java Wed Aug 29 08:36:27 2012 @@ -525,6 +525,16 @@ public class DataFormatClause namespaces, boolean secureTagContents, String recipientKeyAlias, String xmlCipherAlgorithm, String keyCipherAlgorithm, String keyOrTrustStoreParametersId) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents, recipientKeyAlias, xmlCipherAlgorithm, @@ -545,6 +565,16 @@ public class DataFormatClause namespaces, boolean secureTagContents, String recipientKeyAlias, +String xmlCipherAlgorithm, String keyCipherAlgorithm, String keyOrTrustStoreParametersId, String keyPassword) { +XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents, recipientKeyAlias, xmlCipherAlgorithm, +keyCipherAlgorithm, keyOrTrustStoreParametersId, keyPassword); +return dataFormat(xsdf); +} + +/** + * Uses the XML Security data format + */ +public T secureXML(String secureTag, Map namespaces, boolean secureTagContents, String recipientKeyAlias, String xmlCipherAlgorithm, String keyCipherAlgorithm, KeyStoreParameters keyOrTrustStoreParameters) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents, recipientKeyAlias, xmlCipherAlgorithm, keyCipherAlgorithm, keyOrTrustStoreParameters); @@ -552,6 +582,16 @@ public class DataFormatClause namespaces, boolean secureTagContents, String recipientKeyAlias, +String xmlCipherAlgorithm, String keyCipherAlgorithm, KeyStoreParameters keyOrTrustStoreParameters, String keyPassword) { +XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents, recipientKeyAlias, xmlCipherAlgorithm, +keyCipherAlgorithm, keyOrTrustStoreParameters, keyPassword); +return dataFormat(xsdf); +} + +/** * Uses the xmlBeans data format */ public T xmlBeans() { Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java?rev=1378476&r1=1378475&r2=1378476&view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/XMLSecurityDataFormat.java Wed Aug 29 08:36:27 2012 @@ -53,6 +53,8 @@ public class XMLSecurityDataFormat exten private String recipientKeyAlias; @XmlAttribute private String keyOrTrustStoreParametersId; +@XmlAttribute +private String keyPassword; @XmlTransient private KeyStoreParameters keyOrTrustStoreParameters; @@ -133,6 +135,26 @@ public class XMLSecurityDataFormat exten this.setKeyCipherAlgorithm(keyCipherAlgorithm); this.setKeyOrTrustStoreParameters(keyOrTrustStoreParameters); } + +public XMLSecurityDataFormat(String secureTag, boolean secureTagContents, String recipientKeyAlias, +String xmlCipherAlgorithm, String keyCiph
svn commit: r1378464 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/builder/ main/java/org/apache/camel/util/ test/java/org/apache/camel/builder/ test/java/org/apache/camel/util/
Author: ningjiang Date: Wed Aug 29 07:39:04 2012 New Revision: 1378464 URL: http://svn.apache.org/viewvc?rev=1378464&view=rev Log: CAMEL-3104 moving the ExchangeBuilder to builder package and added java doc for the end user API Added: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExchangeBuilder.java - copied, changed from r1378463, camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeBuilder.java camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExchangeBuilderTest.java - copied, changed from r1378463, camel/trunk/camel-core/src/test/java/org/apache/camel/util/ExchangeBuilderTest.java Removed: camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeBuilder.java camel/trunk/camel-core/src/test/java/org/apache/camel/util/ExchangeBuilderTest.java Copied: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExchangeBuilder.java (from r1378463, camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeBuilder.java) URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExchangeBuilder.java?p2=camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExchangeBuilder.java&p1=camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeBuilder.java&r1=1378463&r2=1378464&rev=1378464&view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/util/ExchangeBuilder.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExchangeBuilder.java Wed Aug 29 07:39:04 2012 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.util; +package org.apache.camel.builder; import java.util.HashMap; import java.util.Map; @@ -25,7 +25,7 @@ import org.apache.camel.ExchangePattern; import org.apache.camel.Message; import org.apache.camel.impl.DefaultExchange; -public class ExchangeBuilder { +public final class ExchangeBuilder { private CamelContext context; private ExchangePattern pattern; private Object body; @@ -36,35 +36,67 @@ public class ExchangeBuilder { this.context = context; } +/** + * Create the exchange by setting the camel context + * @param context the camel context + * @return exchange builder + */ public static ExchangeBuilder anExchange(CamelContext context) { return new ExchangeBuilder(context); } +/** + * Set the in message body on the exchange + * @param body + * @return exchange builder + */ public ExchangeBuilder withBody(Object body) { this.body = body; return this; } +/** + * Set the message header of the in message on the exchange + * @param key the key of the header + * @param value the value of the header + * @return exchange builder + */ public ExchangeBuilder withHeader(String key, Object value) { headers.put(key, value); return this; } +/** + * Set the message exchange pattern on the exchange + * @param pattern exchange pattern + * @return exchange builder + */ public ExchangeBuilder withPattern(ExchangePattern pattern) { this.pattern = pattern; return this; } +/** + * Set the exchange property + * @param pattern exchange pattern + * @return exchange builder + */ public ExchangeBuilder withProperty(String key, Object value) { properties.put(key, value); return this; } +/** + * Build up the exchange from the exchange builder + * @return exchange + */ public Exchange build() { Exchange exchange = new DefaultExchange(context); Message message = exchange.getIn(); message.setBody(body); -message.setHeaders(headers); +if (headers.size() > 0) { +message.setHeaders(headers); +} // setup the properties on the exchange for (Map.Entry entry : properties.entrySet()) { exchange.setProperty(entry.getKey(), entry.getValue()); Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExchangeBuilderTest.java (from r1378463, camel/trunk/camel-core/src/test/java/org/apache/camel/util/ExchangeBuilderTest.java) URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExchangeBuilderTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/builder/ExchangeBuilderTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/util/ExchangeBuilderTest.java&r1=1378463&r2=1378464&rev=1378464&view=diff == --- camel/trunk/camel-core/src/test/java/org/apache/camel/util/ExchangeBuilderTest.java (original) +++ camel/tru
svn commit: r1378463 - /camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
Author: ningjiang Date: Wed Aug 29 07:38:25 2012 New Revision: 1378463 URL: http://svn.apache.org/viewvc?rev=1378463&view=rev Log: Polish the comments of DefaultCamelContext Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?rev=1378463&r1=1378462&r2=1378463&view=diff == --- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java (original) +++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java Wed Aug 29 07:38:25 2012 @@ -1394,7 +1394,7 @@ public class DefaultCamelContext extends // if the context was configured with auto startup = false, and we are already started, // then we may need to start the routes on the 2nd start call if (firstStartDone && !isAutoStartup() && isStarted()) { -// invoke this logic to warmup the routes and if possible also start the routes +// invoke this logic to warm up the routes and if possible also start the routes doStartOrResumeRoutes(routeServices, true, true, false, true); }