svn commit: r920499 - in /websites/production/camel/content: cache/main.pageCache rabbitmq.html
Author: buildbot Date: Wed Aug 27 06:17:58 2014 New Revision: 920499 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/rabbitmq.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/rabbitmq.html == --- websites/production/camel/content/rabbitmq.html (original) +++ websites/production/camel/content/rabbitmq.html Wed Aug 27 06:17:58 2014 @@ -96,9 +96,7 @@ /div/divh3 id=RabbitMQ-URIformatURI format/h3div class=code panel pdl style=border-width: 1px;div class=codeContent panelContent pdl script class=theme: Default; brush: java; gutter: false type=syntaxhighlighter![CDATA[rabbitmq://hostname[:port]/exchangeName?[options] ]]/script -/div/divpWhere stronghostname/strong is the hostname of the running rabbitmq instance or cluster. Port is optional and if not specified then defaults to the RabbitMQ client default (5672). The exchange name determines which exchange produced messages will sent to. In the case of consumers, the exchange name determines which exchange the queue will bind to./ph3 id=RabbitMQ-OptionsOptions/h3div class=confluenceTableSmall -div class=table-wraptable class=confluenceTabletbodytrth colspan=1 rowspan=1 class=confluenceThp Property /p/thth colspan=1 rowspan=1 class=confluenceThp Default /p/thth colspan=1 rowspan=1 class=confluenceThp Description /p/th/trtrtd colspan=1 rowspan=1 class=confluenceTdp codeautoAck/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codetrue/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp If messages should be auto acknowledged /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codeautoDelete/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codetrue/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp If it is true, the exchange will be deleted when it is no longer in use /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codedurable/code /p/tdtd colspan=1 rowspan=1 class=conflu enceTdp codetrue/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp If we are declaring a durable exchange (the exchange will survive a server restart) /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codequeue/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp coderandom uuid/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The queue to receive messages from /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp coderoutingKey/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codenull/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The routing key to use when binding a consumer queue to the exchange. For producer routing keys, you set the header (see header section) /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codethreadPoolSize/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp code10/co de /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The consumer uses a Thread Pool Executor with a fixed number of threads. This setting allows you to set that number of threads. /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codeusername/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codenull/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp username in case of authenticated access /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codepassword/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codenull/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp password for authenticated access /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codevhost/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp code//code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp the vhost for the channel /p /td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codeexchangeType/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codedirect/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp strongCamel 2.12.2:/strong The exchange type such as direct or topic. /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codebridgeEndpoint/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codefalse/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp strongCamel 2.12.3:/strong If the bridgeEndpoint is true, the producer will ignore the message header of rabbitmq.EXCHANGE_NAME and rabbitmq.ROUTING_KEY /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codeaddresses/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codenull/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp strongCamel 2.12.3:/strong If this option is set, camel-rabbitmq will try to create connection based on the setting of option addresses. The addresses value is a string which looks like server1:12345, server2:12345/p/td/trtrtd colspan=1 rowspan=1
git commit: Fixed tests
Repository: camel Updated Branches: refs/heads/master 5d3b9457e - f39b5446e Fixed tests Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f39b5446 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f39b5446 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f39b5446 Branch: refs/heads/master Commit: f39b5446ef2c454cc87ed61bee38226e2d248d9d Parents: 5d3b945 Author: Claus Ibsen davscl...@apache.org Authored: Wed Aug 27 08:38:27 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Wed Aug 27 08:42:33 2014 +0200 -- .../apache/camel/processor/OnCompletionOnFailureOnlyTest.java | 2 +- .../org/apache/camel/scala/dsl/SOnCompletionGlobalTest.scala | 4 ++-- .../camel/scala/dsl/SOnCompletionOnCompleteOnlyTest.scala | 5 +++-- .../camel/scala/dsl/SOnCompletionOnFailureOnlyTest.scala | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/f39b5446/camel-core/src/test/java/org/apache/camel/processor/OnCompletionOnFailureOnlyTest.java -- diff --git a/camel-core/src/test/java/org/apache/camel/processor/OnCompletionOnFailureOnlyTest.java b/camel-core/src/test/java/org/apache/camel/processor/OnCompletionOnFailureOnlyTest.java index 44fe5c4..d34cf26 100644 --- a/camel-core/src/test/java/org/apache/camel/processor/OnCompletionOnFailureOnlyTest.java +++ b/camel-core/src/test/java/org/apache/camel/processor/OnCompletionOnFailureOnlyTest.java @@ -49,7 +49,7 @@ public class OnCompletionOnFailureOnlyTest extends OnCompletionTest { .to(mock:sync) // must use end to denote the end of the onCompletion route .end() -// here the original route contiues +// here the original route continues .process(new MyProcessor()) .to(mock:result); // END SNIPPET: e1 http://git-wip-us.apache.org/repos/asf/camel/blob/f39b5446/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionGlobalTest.scala -- diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionGlobalTest.scala b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionGlobalTest.scala index 2e9e3af..6714bf1 100644 --- a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionGlobalTest.scala +++ b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionGlobalTest.scala @@ -24,9 +24,9 @@ class SOnCompletionGlobalTest extends OnCompletionGlobalTest with RouteBuilderSu override def createRouteBuilder = new RouteBuilder { -onCompletion to mock:sync +onCompletion to log:global to mock:sync -direct:start process (new MyProcessor()) to (mock:result) +direct:start process new MyProcessor() to mock:result } http://git-wip-us.apache.org/repos/asf/camel/blob/f39b5446/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionOnCompleteOnlyTest.scala -- diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionOnCompleteOnlyTest.scala b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionOnCompleteOnlyTest.scala index 354c34d..3309143 100644 --- a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionOnCompleteOnlyTest.scala +++ b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionOnCompleteOnlyTest.scala @@ -17,7 +17,7 @@ package org.apache.camel package scala.dsl -import org.apache.camel.processor.OnCompletionGlobalTest.MyProcessor +import org.apache.camel.processor.OnCompletionTest.MyProcessor import org.apache.camel.scala.dsl.builder.{RouteBuilderSupport, RouteBuilder} import processor.OnCompletionOnCompleteOnlyTest @@ -26,7 +26,8 @@ class SOnCompletionOnCompleteOnlyTest extends OnCompletionOnCompleteOnlyTest wit override def createRouteBuilder = new RouteBuilder { direct:start == { - onCompletion(completeOnly).parallelProcessing { + onCompletion.onCompleteOnly { +to(log:sync) to(mock:sync) } process(new MyProcessor()) http://git-wip-us.apache.org/repos/asf/camel/blob/f39b5446/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionOnFailureOnlyTest.scala -- diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionOnFailureOnlyTest.scala
[CONF] Apache Camel MQTT
willem jiang edited the page: MQTT ... div class confluenceTableSmall Property Default Description host tcp://127.0.0.1:1883 The URI of the MQTT broker to connect too - this component also supports SSL - e.g. ssl://127.0.0.1:8883 localAddress The local InetAddress and port to use connectAttemptsMax -1 The maximum number of attempts to establish an initial connection - -1 in infinite.
git commit: CAMEL-7628: Fixed tests. Thanks to Nikolay Turpitko for the patch.
Repository: camel Updated Branches: refs/heads/master f39b5446e - 2e1f1cd9d CAMEL-7628: Fixed tests. Thanks to Nikolay Turpitko for the patch. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2e1f1cd9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2e1f1cd9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2e1f1cd9 Branch: refs/heads/master Commit: 2e1f1cd9d06a191c11b3dca94b858387ded7c5fb Parents: f39b544 Author: Claus Ibsen davscl...@apache.org Authored: Wed Aug 27 09:04:05 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Wed Aug 27 09:04:05 2014 +0200 -- .../component/quartz2/SpringQuartzPersistentStoreRestartTest.xml | 4 ++-- .../camel/component/quartz2/SpringQuartzPersistentStoreTest.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/2e1f1cd9/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreRestartTest.xml -- diff --git a/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreRestartTest.xml b/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreRestartTest.xml index 410968d..1a4b6a6 100644 --- a/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreRestartTest.xml +++ b/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreRestartTest.xml @@ -29,7 +29,7 @@ !-- do not load script as database alreaady exists -- /jdbc:embedded-database - bean id=quartz class=org.apache.camel.component.quartz2.QuartzComponent + bean id=quartz2 class=org.apache.camel.component.quartz2.QuartzComponent property name=scheduler ref=scheduler/ /bean @@ -41,7 +41,7 @@ property name=schedulerContextAsMap !-- hook Camel into Quartz -- map -entry key=CamelQuartzCamelContext value-ref=camelContext/ + entry key=CamelQuartzCamelContext-camelContext value-ref=camelContext/ /map /property property name=quartzProperties http://git-wip-us.apache.org/repos/asf/camel/blob/2e1f1cd9/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml -- diff --git a/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml b/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml index e5605b9..b37ac8f 100644 --- a/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml +++ b/components/camel-quartz2/src/test/resources/org/apache/camel/component/quartz2/SpringQuartzPersistentStoreTest.xml @@ -29,7 +29,7 @@ jdbc:script location=classpath:tables_derby.sql/ /jdbc:embedded-database - bean id=quartz class=org.apache.camel.component.quartz2.QuartzComponent + bean id=quartz2 class=org.apache.camel.component.quartz2.QuartzComponent property name=scheduler ref=scheduler/ /bean @@ -41,7 +41,7 @@ property name=schedulerContextAsMap !-- hook Camel into Quartz -- map -entry key=CamelQuartzCamelContext value-ref=camelContext/ +entry key=CamelQuartzCamelContext-camelContext value-ref=camelContext/ /map /property property name=quartzProperties
svn commit: r920501 - in /websites/production/camel/content: cache/main.pageCache mqtt.html
Author: buildbot Date: Wed Aug 27 07:18:02 2014 New Revision: 920501 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/mqtt.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/mqtt.html == --- websites/production/camel/content/mqtt.html (original) +++ websites/production/camel/content/mqtt.html Wed Aug 27 07:18:02 2014 @@ -96,9 +96,7 @@ /div/divh3 id=MQTT-URIformatURI format/h3div class=code panel pdl style=border-width: 1px;div class=codeContent panelContent pdl script class=theme: Default; brush: java; gutter: false type=syntaxhighlighter![CDATA[mqtt://name[?options] ]]/script -/div/divpWhere strongname/strong is the name you want to assign the component./ph3 id=MQTT-OptionsOptions/h3div class=confluenceTableSmall -div class=table-wraptable class=confluenceTabletbodytrth colspan=1 rowspan=1 class=confluenceThp Property /p/thth colspan=1 rowspan=1 class=confluenceThp Default /p/thth colspan=1 rowspan=1 class=confluenceThp Description /p/th/trtrtd colspan=1 rowspan=1 class=confluenceTdp codehost/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codetcp://127.0.0.1:1883/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The URI of the MQTT broker to connect too - this component also supports SSL - e.g. emssl://127.0.0.1:8883/em/p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codelocalAddress/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp#160;/p/tdtd colspan=1 rowspan=1 class=confluenceTdp The local InetAddress and port to use /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codeconnectAttemptsMax/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp code-1/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The maximum number of attempts to establish an initial connection - strongem-1/em/strong in infinite. /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codereconnectAttemptsMax/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp code-1/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The maximum number of attempts to re-establish a connection after failure - strongem-1/em/strong in infinite. /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codereconnectDelay/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp code10/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The time in milliseconds between attempts to reestablish an initial or failed connection /p/td/trtrtd colspan=1 rowspan=1 class=c onfluenceTdp codereconnectBackOffMultiplier/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp code2.0/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The multiplier to use to the delay between connection attempts for successive failed connection attempts /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codereconnectDelayMax/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp code3/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The maximum time in milliseconds between a new attempt to establish a connection. So even using the reconnectBackOffMultiplier, this property will define the maximum delay before another connection attempt to the MQTT broker /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codequalityOfService/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codeAtLeastOnce/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The MQTT Quality of Service to use for message exchanges. It can be one of strongAtMostOnce/strong, strongAtLeastOnce/strong or strongExactlyOnce/strong /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codesubscribeTopicName/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp#160;/p/tdtd colspan=1 rowspan=1 class=confluenceTdp The name of the Topic to subscribe to for messages /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codepublishTopicName/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codeemcamel/mqtt/test/em/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The default Topic to publish messages on /p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codebyDefaultRetain/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp codefalse/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The default retain policy to be used on messages sent to the MQTT broker/p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp codemqttTopicPropertyName/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp code_MQTTTopicPropertyName+/code /p/tdtd colspan=1 rowspan=1 class=confluenceTdp The property name to look for on an Exchange for an individual published message. If this is set - the name will be used as the Topic to publish a message to the MQTT message broker.
git commit: CAMEL-7673 Introduced different topic property names to avoid the infinit delivery of MQTT
Repository: camel Updated Branches: refs/heads/master 2e1f1cd9d - 6a63eb432 CAMEL-7673 Introduced different topic property names to avoid the infinit delivery of MQTT Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6a63eb43 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6a63eb43 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6a63eb43 Branch: refs/heads/master Commit: 6a63eb432f28c815a48425e20c296a7830d7a2c0 Parents: 2e1f1cd Author: Willem Jiang willem.ji...@gmail.com Authored: Wed Aug 27 15:04:00 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Wed Aug 27 15:16:06 2014 +0800 -- .../apache/camel/component/mqtt/MQTTConfiguration.java| 10 ++ .../org/apache/camel/component/mqtt/MQTTEndpoint.java | 2 +- .../org/apache/camel/component/mqtt/MQTTProducer.java | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/6a63eb43/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTConfiguration.java -- diff --git a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTConfiguration.java b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTConfiguration.java index 86510b4..7c7233a 100644 --- a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTConfiguration.java +++ b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTConfiguration.java @@ -20,6 +20,8 @@ import org.fusesource.mqtt.client.MQTT; import org.fusesource.mqtt.client.QoS; public class MQTTConfiguration extends MQTT { +public static final String MQTT_SUBSCRIBE_TOPIC = CamelMQTTSubscribeTopic; +public static final String MQTT_PUBLISH_TOPIC = CamelMQTTPublishTopic; /** * These a properties that are looked for in an Exchange - to publish to @@ -70,10 +72,18 @@ public class MQTTConfiguration extends MQTT { this.publishTopicName = publishTopicName; } +/** + * Please use MQTT_SUBSCRIBE_TOPIC and MQTT_PUBLISH_TOPIC to set or get the topic name + */ +@Deprecated public String getMqttTopicPropertyName() { return mqttTopicPropertyName; } +/** + * Please use MQTT_SUBSCRIBE_TOPIC and MQTT_PUBLISH_TOPIC to set or get the topic name + */ +@Deprecated public void setMqttTopicPropertyName(String mqttTopicPropertyName) { this.mqttTopicPropertyName = mqttTopicPropertyName; } http://git-wip-us.apache.org/repos/asf/camel/blob/6a63eb43/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java -- diff --git a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java index e264c85..9c8dd95 100644 --- a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java +++ b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java @@ -85,7 +85,7 @@ public class MQTTEndpoint extends DefaultEndpoint { if (!consumers.isEmpty()) { Exchange exchange = createExchange(); exchange.getIn().setBody(body.toByteArray()); - exchange.setProperty(configuration.getMqttTopicPropertyName(), topic.toString()); + exchange.setProperty(MQTTConfiguration.MQTT_SUBSCRIBE_TOPIC, topic.toString()); for (MQTTConsumer consumer : consumers) { consumer.processExchange(exchange); } http://git-wip-us.apache.org/repos/asf/camel/blob/6a63eb43/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTProducer.java -- diff --git a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTProducer.java b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTProducer.java index 530623a..7a1797b 100644 --- a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTProducer.java +++ b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTProducer.java @@ -47,7 +47,8 @@ public class MQTTProducer extends DefaultAsyncProducer implements Processor { // where should we publish to String topicName = configuration.getPublishTopicName(); -Object topicValue = exchange.getProperty(configuration.getMqttTopicPropertyName()); +// get the topic name by using the header of MQTT_PUBLISH_TOPIC +
git commit: JAR upgrades
Repository: camel Updated Branches: refs/heads/master 6a63eb432 - ec34144a7 JAR upgrades Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ec34144a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ec34144a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ec34144a Branch: refs/heads/master Commit: ec34144a7374f81257d7760396dad7f1dd7a1fdb Parents: 6a63eb4 Author: Claus Ibsen davscl...@apache.org Authored: Wed Aug 27 09:19:40 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Wed Aug 27 09:20:04 2014 +0200 -- parent/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/ec34144a/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 6cb99a9..1f40145 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -114,7 +114,7 @@ cxf-version3.0.1/cxf-version cxf-version-range[2.7,4.0)/cxf-version-range cxf-xjc-utils-version3.0.1/cxf-xjc-utils-version -deltaspike-version1.0.1/deltaspike-version +deltaspike-version1.0.2/deltaspike-version derby-version10.10.2.0/derby-version disruptor-version3.3.0/disruptor-version dnsjava-version2.1.1/dnsjava-version @@ -318,7 +318,7 @@ mvel-version2.2.1.Final/mvel-version mybatis-version3.2.7/mybatis-version neethi-bundle-version3.0.1/neethi-bundle-version -netty3-version3.9.3.Final/netty3-version +netty3-version3.9.4.Final/netty3-version netty-version4.0.23.Final/netty-version noggit-bundle-version0.5_1/noggit-bundle-version !-- should be in-sync with deltaspike --
git commit: Try to fix the CI test error of CxfRsRelayTest
Repository: camel Updated Branches: refs/heads/master ec34144a7 - 877854777 Try to fix the CI test error of CxfRsRelayTest Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/87785477 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/87785477 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/87785477 Branch: refs/heads/master Commit: 8778547770713afca1c6267989d60d2893511a5b Parents: ec34144 Author: Willem Jiang willem.ji...@gmail.com Authored: Wed Aug 27 15:40:22 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Wed Aug 27 15:40:46 2014 +0800 -- .../component/cxf/jaxrs/CxfRsRelayTest.java | 36 +++- .../component/cxf/jaxrs/CxfRsSpringRelay.xml| 9 +++-- 2 files changed, 25 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/87785477/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java -- diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java index 1e05ff4..3033a81 100644 --- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java +++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java @@ -33,6 +33,7 @@ import javax.ws.rs.Produces; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.cxf.CXFTestSupport; import org.apache.camel.spring.Main; import org.apache.camel.test.junit4.TestSupport; import org.apache.cxf.helpers.IOUtils; @@ -41,6 +42,7 @@ import org.apache.cxf.jaxrs.ext.multipart.Multipart; import org.junit.Test; public class CxfRsRelayTest extends TestSupport { +private static int port6 = CXFTestSupport.getPort6(); /** * A sample service interface (technically, it is a class since we will * use proxy-client. That interface exposes three methods over-loading each @@ -94,6 +96,22 @@ public class CxfRsRelayTest extends TestSupport { try { main.setApplicationContextUri(org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml); main.start(); +Thread t = new Thread(new Runnable() { +/** + * Sends a request to the first endpoint in the route + */ +public void run() { +try { +JAXRSClientFactory.create(http://localhost:; + port6 + /CxfRsRelayTest/rest, UploadService.class) + .upload(CamelRouteBuilder.class.getResourceAsStream(SAMPLE_CONTENT_PATH), +SAMPLE_NAME); +} catch (Exception e) { +e.printStackTrace(); +throw new RuntimeException(e); +} +} +}); +t.start(); LATCH.await(10, TimeUnit.SECONDS); assertEquals(SAMPLE_NAME, name); StringWriter writer = new StringWriter(); @@ -124,23 +142,7 @@ public class CxfRsRelayTest extends TestSupport { LATCH.countDown(); } }); -Thread t = new Thread(new Runnable() { -/** - * Sends a request to the first endpoint in the route - */ -public void run() { -try { - JAXRSClientFactory.create(getContext().getEndpoint(upload1, CxfRsEndpoint.class) - .getAddress(), UploadService.class) - .upload(CamelRouteBuilder.class.getResourceAsStream(SAMPLE_CONTENT_PATH), -SAMPLE_NAME); -} catch (Exception e) { -e.printStackTrace(); -throw new RuntimeException(e); -} -} -}); -t.start(); + } } } http://git-wip-us.apache.org/repos/asf/camel/blob/87785477/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml -- diff --git a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml index a7d5adc..97b5ede 100644 ---
[1/2] git commit: Try to fix the CI test error of CxfRsRelayTest
Repository: camel Updated Branches: refs/heads/camel-2.12.x 61b17143f - 678eb77ff refs/heads/camel-2.13.x d4cf2860e - a6508e2a6 Try to fix the CI test error of CxfRsRelayTest Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a6508e2a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a6508e2a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a6508e2a Branch: refs/heads/camel-2.13.x Commit: a6508e2a6aa8705a748119d2595999bd46c04039 Parents: d4cf286 Author: Willem Jiang willem.ji...@gmail.com Authored: Wed Aug 27 15:40:22 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Wed Aug 27 15:43:39 2014 +0800 -- .../component/cxf/jaxrs/CxfRsRelayTest.java | 36 +++- .../component/cxf/jaxrs/CxfRsSpringRelay.xml| 9 +++-- 2 files changed, 25 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a6508e2a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java -- diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java index 1e05ff4..3033a81 100644 --- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java +++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java @@ -33,6 +33,7 @@ import javax.ws.rs.Produces; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.cxf.CXFTestSupport; import org.apache.camel.spring.Main; import org.apache.camel.test.junit4.TestSupport; import org.apache.cxf.helpers.IOUtils; @@ -41,6 +42,7 @@ import org.apache.cxf.jaxrs.ext.multipart.Multipart; import org.junit.Test; public class CxfRsRelayTest extends TestSupport { +private static int port6 = CXFTestSupport.getPort6(); /** * A sample service interface (technically, it is a class since we will * use proxy-client. That interface exposes three methods over-loading each @@ -94,6 +96,22 @@ public class CxfRsRelayTest extends TestSupport { try { main.setApplicationContextUri(org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml); main.start(); +Thread t = new Thread(new Runnable() { +/** + * Sends a request to the first endpoint in the route + */ +public void run() { +try { +JAXRSClientFactory.create(http://localhost:; + port6 + /CxfRsRelayTest/rest, UploadService.class) + .upload(CamelRouteBuilder.class.getResourceAsStream(SAMPLE_CONTENT_PATH), +SAMPLE_NAME); +} catch (Exception e) { +e.printStackTrace(); +throw new RuntimeException(e); +} +} +}); +t.start(); LATCH.await(10, TimeUnit.SECONDS); assertEquals(SAMPLE_NAME, name); StringWriter writer = new StringWriter(); @@ -124,23 +142,7 @@ public class CxfRsRelayTest extends TestSupport { LATCH.countDown(); } }); -Thread t = new Thread(new Runnable() { -/** - * Sends a request to the first endpoint in the route - */ -public void run() { -try { - JAXRSClientFactory.create(getContext().getEndpoint(upload1, CxfRsEndpoint.class) - .getAddress(), UploadService.class) - .upload(CamelRouteBuilder.class.getResourceAsStream(SAMPLE_CONTENT_PATH), -SAMPLE_NAME); -} catch (Exception e) { -e.printStackTrace(); -throw new RuntimeException(e); -} -} -}); -t.start(); + } } } http://git-wip-us.apache.org/repos/asf/camel/blob/a6508e2a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml -- diff --git a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml index a7d5adc..97b5ede 100644 ---
[2/2] git commit: Try to fix the CI test error of CxfRsRelayTest
Try to fix the CI test error of CxfRsRelayTest Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/678eb77f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/678eb77f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/678eb77f Branch: refs/heads/camel-2.12.x Commit: 678eb77fff5ecacf678b8249edcc18b717ed29af Parents: 61b1714 Author: Willem Jiang willem.ji...@gmail.com Authored: Wed Aug 27 15:40:22 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Wed Aug 27 15:43:50 2014 +0800 -- .../component/cxf/jaxrs/CxfRsRelayTest.java | 36 +++- .../component/cxf/jaxrs/CxfRsSpringRelay.xml| 9 +++-- 2 files changed, 25 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/678eb77f/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java -- diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java index 1e05ff4..3033a81 100644 --- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java +++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsRelayTest.java @@ -33,6 +33,7 @@ import javax.ws.rs.Produces; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.cxf.CXFTestSupport; import org.apache.camel.spring.Main; import org.apache.camel.test.junit4.TestSupport; import org.apache.cxf.helpers.IOUtils; @@ -41,6 +42,7 @@ import org.apache.cxf.jaxrs.ext.multipart.Multipart; import org.junit.Test; public class CxfRsRelayTest extends TestSupport { +private static int port6 = CXFTestSupport.getPort6(); /** * A sample service interface (technically, it is a class since we will * use proxy-client. That interface exposes three methods over-loading each @@ -94,6 +96,22 @@ public class CxfRsRelayTest extends TestSupport { try { main.setApplicationContextUri(org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml); main.start(); +Thread t = new Thread(new Runnable() { +/** + * Sends a request to the first endpoint in the route + */ +public void run() { +try { +JAXRSClientFactory.create(http://localhost:; + port6 + /CxfRsRelayTest/rest, UploadService.class) + .upload(CamelRouteBuilder.class.getResourceAsStream(SAMPLE_CONTENT_PATH), +SAMPLE_NAME); +} catch (Exception e) { +e.printStackTrace(); +throw new RuntimeException(e); +} +} +}); +t.start(); LATCH.await(10, TimeUnit.SECONDS); assertEquals(SAMPLE_NAME, name); StringWriter writer = new StringWriter(); @@ -124,23 +142,7 @@ public class CxfRsRelayTest extends TestSupport { LATCH.countDown(); } }); -Thread t = new Thread(new Runnable() { -/** - * Sends a request to the first endpoint in the route - */ -public void run() { -try { - JAXRSClientFactory.create(getContext().getEndpoint(upload1, CxfRsEndpoint.class) - .getAddress(), UploadService.class) - .upload(CamelRouteBuilder.class.getResourceAsStream(SAMPLE_CONTENT_PATH), -SAMPLE_NAME); -} catch (Exception e) { -e.printStackTrace(); -throw new RuntimeException(e); -} -} -}); -t.start(); + } } } http://git-wip-us.apache.org/repos/asf/camel/blob/678eb77f/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml -- diff --git a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml b/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml index a7d5adc..97b5ede 100644 --- a/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringRelay.xml +++
[CONF] Apache Camel XSLT
Claus Ibsen edited the page: XSLT ... Available as of Camel 2.9 (removed in 2.11.4, 2.12.3 and 2.13.0) Camel provides the CamelXsltResourceUri header which you can use to define a stylesheet to use instead of what is configured on the endpoint URI. This allows you to provide a dynamic stylesheet at runtime. Accessing warnings, errors and fatalErrors from XSLT ErrorListener Available as of Camel 2.14 From Camel 2.14 onwards, any warning/error or fatalError is stored on the current Exchange as a property with the keysExchange.XSLT_ERROR,Exchange.XSLT_FATAL_ERROR, orExchange.XSLT_WARNING which allows end users to get hold of any errors happening during transformation. For example in the stylesheet below, we want to terminate if a staff has an empty dob field. And to include a custom error message using xsl:message. Code Block xsl:template match=/ html body xsl:for-each select=staff/programmer pName: xsl:value-of select=name/br / xsl:if test=dob='' xsl:message terminate=yesError: DOB is an empty string!/xsl:message /xsl:if /p /xsl:for-each /body /html /xsl:template This information is not available on the Exchange stored as an Exception that contains the message in the getMessage() method on the exception. The exception is stored on the Exchange as a warning with the keyExchange.XSLT_WARNING. Notes on using XSLT and Java Versions ... View Online Like View Changes Stop watching space Manage Notifications This message was sent by Atlassian Confluence 5.0.3, Team Collaboration Software
svn commit: r920503 - in /websites/production/camel/content: book-component-appendix.html book-in-one-page.html cache/main.pageCache xslt.html
Author: buildbot Date: Wed Aug 27 08:18:38 2014 New Revision: 920503 Log: Production update by buildbot for camel Modified: websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/xslt.html Modified: websites/production/camel/content/book-component-appendix.html == --- websites/production/camel/content/book-component-appendix.html (original) +++ websites/production/camel/content/book-component-appendix.html Wed Aug 27 08:18:38 2014 @@ -1529,11 +1529,11 @@ template.send(quot;direct:alias-verify /div /div pThe strongcxf:/strong component provides integration with a shape=rect href=http://cxf.apache.org;Apache CXF/a for connecting to JAX-WS services hosted in CXF./ppstyle type=text/css/*![CDATA[*/ -div.rbtoc1409044661949 {padding: 0px;} -div.rbtoc1409044661949 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1409044661949 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1409127441886 {padding: 0px;} +div.rbtoc1409127441886 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1409127441886 li {margin-left: 0px;padding-left: 0px;} -/*]]*//style/pdiv class=toc-macro rbtoc1409044661949 +/*]]*//style/pdiv class=toc-macro rbtoc1409127441886 ul class=toc-indentationlia shape=rect href=#CXF-CXFComponentCXF Component/a ul class=toc-indentationlia shape=rect href=#CXF-URIformatURI format/a/lilia shape=rect href=#CXF-OptionsOptions/a ul class=toc-indentationlia shape=rect href=#CXF-ThedescriptionsofthedataformatsThe descriptions of the dataformats/a @@ -13608,7 +13608,21 @@ from(quot;activemq:My.Queuequot;). /div/divpFrom Camel 2.10.4 onwards we have made this easier as Camel will use the prefix from the endpoint configuration as the default prefix. So from Camel 2.10.4 onwards you can do:/pdiv class=code panel pdl style=border-width: 1px;div class=codeContent panelContent pdl script class=theme: Default; brush: xml; gutter: false type=syntaxhighlighter![CDATA[lt;xsl:include href=quot;staff_template.xslquot;/gt; ]]/script -/div/divpWhich will load the staff_template.xsl resource from the file system, as the endpoint was configured with file: as prefix.br clear=none You can still though explicit configure a prefix, and then mix and match. And have both file and classpath loading. But that would be unusual, as most people either use file or classpath based resources./ph3 id=BookComponentAppendix-DynamicstylesheetsDynamic stylesheets/h3pTo provide a dynamic stylesheet at runtime you can define a dynamic URI. See#160;a shape=rect href=how-to-use-a-dynamic-uri-in-to.htmlHow to use a dynamic URI in to()/a for more information./ppstrongAvailable as of Camel 2.9 (removed in 2.11.4, 2.12.3 and 2.13.0)/strongbr clear=none Camel provides the codeCamelXsltResourceUri/code header which you can use to define a stylesheet to use instead of what is configured on the endpoint URI. This allows you to provide a dynamic stylesheet at runtime./ph3 id=BookComponentAppendix -NotesonusingXSLTandJavaVersionsNotes on using XSLT and Java Versions/h3pHere are some observations from Sameer, a Camel user, which he kindly shared with us:/pblockquotepIn case anybody faces issues with the XSLT endpoint please review these points./ppI was trying to use an xslt endpoint for a simple transformation from one xml to another using a simple xsl. The output xml kept appearing (after the xslt processor in the route) with outermost xml tag with no content within./ppNo explanations show up in the DEBUG logs. On the TRACE logs however I did find some error/warning indicating that the XMLConverter bean could no be initialized./ppAfter a few hours of cranking my mind, I had to do the following to get it to work (thanks to some posts on the users forum that gave some clue):/pp1. Use the transformerFactory option in the route code(xslt:my-transformer.xsl?transformerFactory=tFactory)/code with the codetFactory/code bean having bean defined i n the spring context for codeclass=org.apache.xalan.xsltc.trax.TransformerFactoryImpl/code.br clear=none 2. Added the Xalan jar into my maven pom./ppMy guess is that the default xml parsing mechanism supplied within the JDK (I am using 1.6.0_03) does not work right in this context and does not throw up any error either. When I switched to Xalan this way it works. This is not a Camel issue, but might need a mention on the xslt component page./ppAnother note, jdk 1.6.0_03 ships with JAXB 2.0 while Camel needs 2.1. One workaround is to add the 2.1 jar to the codejre/lib/endorsed/code directory for the jvm or as specified by the container./ppHope this post saves newbie Camel riders some time./p/blockquotep/ph3 id=BookComponentAppendix-SeeAlso.71See Also/h3 +/div/divpWhich will load the staff_template.xsl
git commit: CAMEL-7737 Fixed the test error of camel-fop
Repository: camel Updated Branches: refs/heads/camel-2.13.x a6508e2a6 - 637aa4dfe CAMEL-7737 Fixed the test error of camel-fop Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/637aa4df Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/637aa4df Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/637aa4df Branch: refs/heads/camel-2.13.x Commit: 637aa4dfe56babf50a91009ddc23bff3fd26cbf3 Parents: a6508e2 Author: Willem Jiang willem.ji...@gmail.com Authored: Sun Aug 24 18:13:57 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Wed Aug 27 16:32:07 2014 +0800 -- components/camel-fop/pom.xml | 5 + 1 file changed, 5 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/637aa4df/components/camel-fop/pom.xml -- diff --git a/components/camel-fop/pom.xml b/components/camel-fop/pom.xml index 1082445..dcbd748 100644 --- a/components/camel-fop/pom.xml +++ b/components/camel-fop/pom.xml @@ -53,6 +53,11 @@ groupIdorg.apache.avalon.framework/groupId artifactIdavalon-framework-impl/artifactId /exclusion +!-- exclude the dependency of xalan to fix CAMEL-7737 -- +exclusion +groupIdxalan/groupId +artifactIdxalan/artifactId +/exclusion /exclusions /dependency dependency
git commit: Fixed the test error of SpringJmxDumpCBRRoutesAsXmlTest
Repository: camel Updated Branches: refs/heads/camel-2.12.x 678eb77ff - b49717a9b Fixed the test error of SpringJmxDumpCBRRoutesAsXmlTest Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b49717a9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b49717a9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b49717a9 Branch: refs/heads/camel-2.12.x Commit: b49717a9b895dac873fc78ee3496d90e2cf02408 Parents: 678eb77 Author: Willem Jiang willem.ji...@gmail.com Authored: Wed Aug 27 16:59:11 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Wed Aug 27 16:59:11 2014 +0800 -- .../management/SpringJmxDumpCBRRoutesAsXmlTest.java | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b49717a9/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpCBRRoutesAsXmlTest.java -- diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpCBRRoutesAsXmlTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpCBRRoutesAsXmlTest.java index 2b4940e..764dbf2 100644 --- a/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpCBRRoutesAsXmlTest.java +++ b/components/camel-spring/src/test/java/org/apache/camel/spring/management/SpringJmxDumpCBRRoutesAsXmlTest.java @@ -16,6 +16,7 @@ */ package org.apache.camel.spring.management; +import java.util.Set; import javax.management.MBeanServer; import javax.management.ObjectName; @@ -24,7 +25,7 @@ import org.springframework.context.support.AbstractXmlApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; /** - * @version + * @version */ public class SpringJmxDumpCBRRoutesAsXmlTest extends SpringTestSupport { @@ -37,10 +38,17 @@ public class SpringJmxDumpCBRRoutesAsXmlTest extends SpringTestSupport { return context.getManagementStrategy().getManagementAgent().getMBeanServer(); } +static ObjectName getCamelContextObjectName(MBeanServer mbeanServer) throws Exception { +SetObjectName set = mbeanServer.queryNames(new ObjectName(*:type=context,*), null); +assertEquals(1, set.size()); + +return set.iterator().next(); +} + public void testJmxDumpCBRRoutesAsXml() throws Exception { MBeanServer mbeanServer = getMBeanServer(); - -ObjectName on = ObjectName.getInstance(org.apache.camel:context=camel-1,type=context,name=\camel-1\); +// We need to look up the camel context object name first +ObjectName on = getCamelContextObjectName(mbeanServer); String xml = (String) mbeanServer.invoke(on, dumpRoutesAsXml, null, null); assertNotNull(xml); log.info(xml);
git commit: CAMEL-7673 polish the code
Repository: camel Updated Branches: refs/heads/master 877854777 - 13a92cc13 CAMEL-7673 polish the code Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/13a92cc1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/13a92cc1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/13a92cc1 Branch: refs/heads/master Commit: 13a92cc13fc8e517633dbdc8266b3d842ccf1592 Parents: 8778547 Author: Willem Jiang willem.ji...@gmail.com Authored: Wed Aug 27 17:02:36 2014 +0800 Committer: Willem Jiang willem.ji...@gmail.com Committed: Wed Aug 27 17:02:36 2014 +0800 -- .../main/java/org/apache/camel/component/mqtt/MQTTProducer.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/13a92cc1/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTProducer.java -- diff --git a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTProducer.java b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTProducer.java index 7a1797b..86dad19 100644 --- a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTProducer.java +++ b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTProducer.java @@ -48,7 +48,7 @@ public class MQTTProducer extends DefaultAsyncProducer implements Processor { // where should we publish to String topicName = configuration.getPublishTopicName(); // get the topic name by using the header of MQTT_PUBLISH_TOPIC -Object topicValue = exchange.getProperty(configuration.MQTT_PUBLISH_TOPIC); +Object topicValue = exchange.getProperty(MQTTConfiguration.MQTT_PUBLISH_TOPIC); if (topicValue != null) { topicName = topicValue.toString(); }
git commit: CAMEL-7753: xslt component - Store warning/errors etc as exchange properties so end users can get hold of those
Repository: camel Updated Branches: refs/heads/master 13a92cc13 - 68d0f1419 CAMEL-7753: xslt component - Store warning/errors etc as exchange properties so end users can get hold of those Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/68d0f141 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/68d0f141 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/68d0f141 Branch: refs/heads/master Commit: 68d0f141946e77c28b61f45fb85f6f4f848c70a2 Parents: 13a92cc Author: Claus Ibsen davscl...@apache.org Authored: Wed Aug 27 11:05:47 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Wed Aug 27 11:12:10 2014 +0200 -- .../main/java/org/apache/camel/Exchange.java| 5 +- .../xml/DefaultTransformErrorHandler.java | 25 ++--- .../apache/camel/builder/xml/XsltBuilder.java | 5 +- camel-core/src/test/data/terminate.xml | 36 + .../xslt/XsltMessageTerminateTest.java | 57 .../apache/camel/component/xslt/terminate.xsl | 34 6 files changed, 151 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/68d0f141/camel-core/src/main/java/org/apache/camel/Exchange.java -- diff --git a/camel-core/src/main/java/org/apache/camel/Exchange.java b/camel-core/src/main/java/org/apache/camel/Exchange.java index 587f17d..a33253a 100644 --- a/camel-core/src/main/java/org/apache/camel/Exchange.java +++ b/camel-core/src/main/java/org/apache/camel/Exchange.java @@ -210,7 +210,10 @@ public interface Exchange { @Deprecated String UNIT_OF_WORK_PROCESS_SYNC = CamelUnitOfWorkProcessSync; -String XSLT_FILE_NAME = CamelXsltFileName; +String XSLT_FILE_NAME = CamelXsltFileName; +String XSLT_ERROR = CamelXsltError; +String XSLT_FATAL_ERROR = CamelXsltFatalError; +String XSLT_WARNING = CamelXsltWarning; /** * Returns the {@link ExchangePattern} (MEP) of this exchange. http://git-wip-us.apache.org/repos/asf/camel/blob/68d0f141/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultTransformErrorHandler.java -- diff --git a/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultTransformErrorHandler.java b/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultTransformErrorHandler.java index c37df88..006545f 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultTransformErrorHandler.java +++ b/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultTransformErrorHandler.java @@ -19,42 +19,53 @@ package org.apache.camel.builder.xml; import javax.xml.transform.ErrorListener; import javax.xml.transform.TransformerException; +import org.apache.camel.Exchange; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** - * {@link ErrorHandler} and {@link ErrorListener} which will log warnings, + * {@link ErrorHandler} and {@link ErrorListener} which will ignore warnings, * and throws error and fatal as exception, which ensures those can be caught by Camel and dealt-with. + * p/ + * Also any warning, error or fatal error is stored on the {@link Exchange} as a property with the keys + * {@link Exchange#XSLT_WARNING}, {@link Exchange#XSLT_ERROR}, and {@link Exchange#XSLT_FATAL_ERROR} which + * allows end users to access those information form the exchange. */ public class DefaultTransformErrorHandler implements ErrorHandler, ErrorListener { -private static final Logger LOG = LoggerFactory.getLogger(DefaultTransformErrorHandler.class); + +private final Exchange exchange; + +public DefaultTransformErrorHandler(Exchange exchange) { +this.exchange = exchange; +} public void error(SAXParseException exception) throws SAXException { +exchange.setProperty(Exchange.XSLT_ERROR, exception); throw exception; } public void fatalError(SAXParseException exception) throws SAXException { +exchange.setProperty(Exchange.XSLT_FATAL_ERROR, exception); throw exception; } public void warning(SAXParseException exception) throws SAXException { -LOG.warn(parser warning, exception); +exchange.setProperty(Exchange.XSLT_WARNING, exception); } public void error(TransformerException exception) throws TransformerException { +exchange.setProperty(Exchange.XSLT_ERROR, exception); throw exception; } public void fatalError(TransformerException exception) throws TransformerException { +exchange.setProperty(Exchange.XSLT_FATAL_ERROR,
git commit: CAMEL-7754: Add QuartzConstants.QUARTZ_TRIGGER_CRON_TIMEZONE to the QuartzEndpoint if it exists
Repository: camel Updated Branches: refs/heads/master 68d0f1419 - 253af883b CAMEL-7754: Add QuartzConstants.QUARTZ_TRIGGER_CRON_TIMEZONE to the QuartzEndpoint if it exists Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/253af883 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/253af883 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/253af883 Branch: refs/heads/master Commit: 253af883b461ddc6b50cbbb58509eeaaf8abdcb6 Parents: 68d0f14 Author: Charles Moulliard ch0...@gmail.com Authored: Wed Aug 27 11:54:10 2014 +0200 Committer: Charles Moulliard ch0...@gmail.com Committed: Wed Aug 27 11:54:10 2014 +0200 -- .../camel/component/quartz/QuartzComponent.java | 10 +++--- .../quartz/QuartzCronTriggerRouteTest.java | 34 2 files changed, 39 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/253af883/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java -- diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java index 63f9dad..559b9fd 100644 --- a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java +++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java @@ -20,11 +20,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.URI; import java.text.ParseException; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.Properties; +import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import org.apache.camel.CamelContext; @@ -169,6 +165,10 @@ public class QuartzComponent extends UriEndpointComponent implements StartupList if (cron != null) { answer.getJobDetail().getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_TYPE, cron); answer.getJobDetail().getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_CRON_EXPRESSION, cron); +String timeZone = EndpointHelper.resloveStringParameter(getCamelContext(), (String)triggerParameters.get(timeZone), String.class); +if (timeZone != null) { + answer.getJobDetail().getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_CRON_TIMEZONE, timeZone); +} } else { answer.getJobDetail().getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_TYPE, simple); Long interval = EndpointHelper.resloveStringParameter(getCamelContext(), (String)triggerParameters.get(repeatInterval), Long.class); http://git-wip-us.apache.org/repos/asf/camel/blob/253af883/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java -- diff --git a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java new file mode 100644 index 000..2e62406 --- /dev/null +++ b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java @@ -0,0 +1,34 @@ +package org.apache.camel.component.quartz; + +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.test.junit4.CamelTestSupport; +import org.junit.Test; +import org.quartz.JobDetail; + +public class QuartzCronTriggerRouteTest extends CamelTestSupport { + +@Test +public void testQuartzCronRoute() throws Exception { +MockEndpoint mock = getMockEndpoint(mock:result); +mock.expectedMinimumMessageCount(3); + +assertMockEndpointsSatisfied(); + +JobDetail job = mock.getReceivedExchanges().get(0).getIn().getHeader(jobDetail, JobDetail.class); +assertNotNull(job); + +assertEquals(cron, job.getJobDataMap().get(QuartzConstants.QUARTZ_TRIGGER_TYPE)); +assertEquals(UTC, job.getJobDataMap().get(QuartzConstants.QUARTZ_TRIGGER_CRON_TIMEZONE)); +assertEquals(0/2 * * * * ?, job.getJobDataMap().get(QuartzConstants.QUARTZ_TRIGGER_CRON_EXPRESSION)); +} + +@Override +protected RouteBuilder createRouteBuilder() { +return new RouteBuilder() { +public void configure() { + from(quartz://myGroup/myTimerName?cron=0/2+*+*+*+*+?trigger.timeZone=UTC).to(mock:result); +} +}; +} +} \ No newline at end of file
git commit: CAMEL-7754: Add support for TimeZone
Repository: camel Updated Branches: refs/heads/master 253af883b - d4a930623 CAMEL-7754: Add support for TimeZone Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d4a93062 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d4a93062 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d4a93062 Branch: refs/heads/master Commit: d4a9306232ab633b8a38de87a56b308296c4b5a7 Parents: 253af88 Author: Charles Moulliard ch0...@gmail.com Authored: Wed Aug 27 12:27:02 2014 +0200 Committer: Charles Moulliard ch0...@gmail.com Committed: Wed Aug 27 12:27:02 2014 +0200 -- .../camel/component/quartz2/QuartzEndpoint.java | 25 ++ .../quartz2/QuartzCronTriggerRouteTest.java | 34 2 files changed, 53 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d4a93062/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java -- diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java index c4cb731..7552c4c 100644 --- a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java +++ b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java @@ -18,6 +18,7 @@ package org.apache.camel.component.quartz2; import java.util.Date; import java.util.Map; +import java.util.TimeZone; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -282,16 +283,28 @@ public class QuartzEndpoint extends DefaultEndpoint { } if (cron != null) { LOG.debug(Creating CronTrigger: {}, cron); -result = TriggerBuilder.newTrigger() -.withIdentity(triggerKey) -.startAt(startTime) - .withSchedule(cronSchedule(cron).withMisfireHandlingInstructionFireAndProceed()) -.build(); +String timeZone = (String)triggerParameters.get(timeZone); +if (timeZone != null) { +result = TriggerBuilder.newTrigger() +.withIdentity(triggerKey) +.startAt(startTime) +.withSchedule(cronSchedule(cron) +.withMisfireHandlingInstructionFireAndProceed() +.inTimeZone(TimeZone.getTimeZone(timeZone))) +.build(); + jobDetail.getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_CRON_TIMEZONE, timeZone); +} else { +result = TriggerBuilder.newTrigger() +.withIdentity(triggerKey) +.startAt(startTime) +.withSchedule(cronSchedule(cron) + .withMisfireHandlingInstructionFireAndProceed()) +.build(); +} // enrich job map with details jobDetail.getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_TYPE, cron); jobDetail.getJobDataMap().put(QuartzConstants.QUARTZ_TRIGGER_CRON_EXPRESSION, cron); - } else { LOG.debug(Creating SimpleTrigger.); int repeat = SimpleTrigger.REPEAT_INDEFINITELY; http://git-wip-us.apache.org/repos/asf/camel/blob/d4a93062/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java -- diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java new file mode 100644 index 000..bd31fec --- /dev/null +++ b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java @@ -0,0 +1,34 @@ +package org.apache.camel.component.quartz2; + +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.test.junit4.CamelTestSupport; +import org.junit.Test; +import org.quartz.JobDetail; + +public class QuartzCronTriggerRouteTest extends CamelTestSupport { + +@Test +public void testQuartzCronRoute() throws Exception { +MockEndpoint mock = getMockEndpoint(mock:result); +mock.expectedMinimumMessageCount(3); + +assertMockEndpointsSatisfied(); + +JobDetail job = mock.getReceivedExchanges().get(0).getIn().getHeader(jobDetail, JobDetail.class); +
[CONF] Apache Camel XSLT
Claus Ibsen edited the page: XSLT ... div class confluenceTableSmall Name Default Value Description converter null Option to override default XmlConverter. Will lookup for the converter in the Registry. The provided converted must be of type org.apache.camel.converter.jaxp.XmlConverter. transformerFactory null Option to override default TransformerFactory. Will lookup for the transformerFactory in the Registry. The provided transformer factory must be of type javax.xml.transform.TransformerFactory. transformerFactoryClass null Option to override default TransformerFactory. Will create a TransformerFactoryClass instance and set it to
[5/5] git commit: CAMEL-7753: xslt component - Store warning/errors etc as exchange properties so end users can get hold of those. Now works with camel-saxon also.
CAMEL-7753: xslt component - Store warning/errors etc as exchange properties so end users can get hold of those. Now works with camel-saxon also. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/adeefbc2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/adeefbc2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/adeefbc2 Branch: refs/heads/master Commit: adeefbc24c188cfe8c221a6ad457a15930622488 Parents: 6ecf83c Author: Claus Ibsen davscl...@apache.org Authored: Wed Aug 27 14:22:01 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Wed Aug 27 14:22:01 2014 +0200 -- .../osgi/saxon/SaxonXsltTerminateRouteTest.java | 103 +++ .../camel/itest/osgi/core/xslt/terminate.xsl| 34 ++ 2 files changed, 137 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/adeefbc2/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/saxon/SaxonXsltTerminateRouteTest.java -- diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/saxon/SaxonXsltTerminateRouteTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/saxon/SaxonXsltTerminateRouteTest.java new file mode 100644 index 000..8521c73 --- /dev/null +++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/saxon/SaxonXsltTerminateRouteTest.java @@ -0,0 +1,103 @@ +/** + * 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.itest.osgi.saxon; + +import org.apache.camel.Exchange; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.PaxExam; + +import static org.ops4j.pax.exam.OptionUtils.combine; + + +@RunWith(PaxExam.class) +public class SaxonXsltTerminateRouteTest extends OSGiIntegrationTestSupport { + +private String data = staff\n ++ \n ++ programmer\n ++ nameBugs Bunny/name\n ++ dob03/21/1970/dob\n ++ age31/age\n ++ address4895 Wabbit Hole Road/address\n ++ phone865-111-/phone\n ++ /programmer\n ++ \n ++ programmer\n ++ nameDaisy Duck/name\n ++ dob/dob\n ++ age/age\n ++ address748 Golden Pond/address\n ++ phone865-222-/phone\n ++ /programmer\n ++ \n ++ /staff; + +@Test +public void testXsltTerminate() throws Exception { +getMockEndpoint(mock:result).expectedMessageCount(0); +getMockEndpoint(mock:dead).expectedMessageCount(1); + +template.sendBody(direct:start, data); + +assertMockEndpointsSatisfied(); + +Exchange out = getMockEndpoint(mock:dead).getReceivedExchanges().get(0); +assertNotNull(out); +// this exception is just a generic xslt error +Exception cause = out.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); +assertNotNull(cause); + +// we have the xsl termination message as a error property on the exchange as we set terminate=true +Exception error = out.getProperty(Exchange.XSLT_ERROR, Exception.class); +assertNotNull(error); +assertEquals(Error: DOB is an empty string!, error.getMessage()); +} + +@Configuration +public static Option[] configure() { +Option[] options = combine( +getDefaultCamelKarafOptions(), +// using the features to install the other camel components +loadCamelFeatures(camel-saxon)); + +return options; +} + +@Override +protected RouteBuilder createRouteBuilder() throws Exception { +return new RouteBuilder() { +@Override +public void
[2/5] git commit: CAMEL-7753: xslt component - Store warning/errors etc as exchange properties so end users can get hold of those. Now works with camel-saxon also.
CAMEL-7753: xslt component - Store warning/errors etc as exchange properties so end users can get hold of those. Now works with camel-saxon also. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1b38aad3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1b38aad3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1b38aad3 Branch: refs/heads/master Commit: 1b38aad342529e98b5f76e11029ec50b1768949f Parents: 68d0f14 Author: Claus Ibsen davscl...@apache.org Authored: Wed Aug 27 13:52:58 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Wed Aug 27 13:52:58 2014 +0200 -- camel-core/pom.xml | 2 + .../apache/camel/builder/xml/XsltBuilder.java | 92 .../camel/component/xslt/XsltEndpoint.java | 12 ++- .../camel-saxon/src/test/data/terminate.xml | 36 .../xslt/SaxonXsltMessageTerminateTest.java | 60 + .../apache/camel/component/xslt/terminate.xsl | 34 6 files changed, 217 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/1b38aad3/camel-core/pom.xml -- diff --git a/camel-core/pom.xml b/camel-core/pom.xml index 98f6ad8..4c13e0b 100644 --- a/camel-core/pom.xml +++ b/camel-core/pom.xml @@ -49,6 +49,8 @@ javax.xml.bind.annotation.adapters;resolution:=optional, javax.xml.stream;resolution:=optional, javax.xml.transform.stax;resolution:=optional, + net.sf.saxon.event;resolution:=optional, + net.sf.saxon.serialize;resolution:=optional, * /camel.osgi.import camel.osgi.export.service http://git-wip-us.apache.org/repos/asf/camel/blob/1b38aad3/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java -- diff --git a/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java b/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java index 3803def..8ccc9b6 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java +++ b/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java @@ -19,13 +19,13 @@ package org.apache.camel.builder.xml; import java.io.File; import java.io.IOException; import java.io.InputStream; +import java.lang.reflect.Method; import java.net.URL; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; - import javax.xml.parsers.ParserConfigurationException; import javax.xml.stream.XMLStreamReader; import javax.xml.transform.ErrorListener; @@ -41,8 +41,8 @@ import javax.xml.transform.sax.SAXSource; import javax.xml.transform.stax.StAXSource; import javax.xml.transform.stream.StreamSource; -import org.w3c.dom.Node; - +import org.apache.camel.CamelContext; +import org.apache.camel.CamelContextAware; import org.apache.camel.Exchange; import org.apache.camel.ExpectedBodyTypeException; import org.apache.camel.Message; @@ -51,13 +51,15 @@ import org.apache.camel.RuntimeTransformException; import org.apache.camel.TypeConverter; import org.apache.camel.converter.jaxp.StaxSource; import org.apache.camel.converter.jaxp.XmlConverter; -import org.apache.camel.converter.jaxp.XmlErrorListener; +import org.apache.camel.support.ServiceSupport; import org.apache.camel.support.SynchronizationAdapter; import org.apache.camel.util.ExchangeHelper; import org.apache.camel.util.FileUtil; import org.apache.camel.util.IOHelper; +import org.apache.camel.util.ObjectHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.w3c.dom.Node; import static org.apache.camel.util.ObjectHelper.notNull; @@ -70,8 +72,9 @@ import static org.apache.camel.util.ObjectHelper.notNull; * * @version */ -public class XsltBuilder implements Processor { +public class XsltBuilder extends ServiceSupport implements Processor, CamelContextAware { private static final Logger LOG = LoggerFactory.getLogger(XsltBuilder.class); +private CamelContext camelContext; private MapString, Object parameters = new HashMapString, Object(); private XmlConverter converter = new XmlConverter(); private Templates template; @@ -80,8 +83,11 @@ public class XsltBuilder implements Processor { private boolean failOnNullBody = true; private URIResolver uriResolver; private boolean deleteOutputFile; -private ErrorListener errorListener = new XsltErrorListener(); +private ErrorListener errorListener; private boolean allowStAX = true; +private volatile Method setMessageEmitterMethod; +private volatile Class? saxonReceiverClass; +private
[4/5] git commit: Merge branch 'CAMEL-7756' of https://github.com/kevinearls/camel
Merge branch 'CAMEL-7756' of https://github.com/kevinearls/camel Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6ecf83c1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6ecf83c1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6ecf83c1 Branch: refs/heads/master Commit: 6ecf83c1c4491e44a7164ea0c7a23ce018a5b6d5 Parents: 01ca056 2d7a219 Author: Claus Ibsen davscl...@apache.org Authored: Wed Aug 27 14:07:27 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Wed Aug 27 14:07:27 2014 +0200 -- .../camel/issues/OnCompletionIssueTest.java | 2 +- .../camel/component/quartz/QuartzComponent.java | 10 +++--- .../quartz/QuartzCronTriggerRouteTest.java | 34 .../camel/component/quartz2/QuartzEndpoint.java | 25 ++ .../quartz2/QuartzCronTriggerRouteTest.java | 34 5 files changed, 93 insertions(+), 12 deletions(-) --
[3/5] git commit: CAMEL-7753: xslt component - Store warning/errors etc as exchange properties so end users can get hold of those. Now works with camel-saxon also.
CAMEL-7753: xslt component - Store warning/errors etc as exchange properties so end users can get hold of those. Now works with camel-saxon also. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/01ca0564 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/01ca0564 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/01ca0564 Branch: refs/heads/master Commit: 01ca0564de3b58ef9b67d4389157a0127fb4cf22 Parents: 1b38aad Author: Claus Ibsen davscl...@apache.org Authored: Wed Aug 27 14:07:07 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Wed Aug 27 14:07:07 2014 +0200 -- .../apache/camel/builder/xml/XsltBuilder.java | 8 ++- .../itest/osgi/saxon/SaxonXsltRouteTest.java| 70 2 files changed, 76 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/01ca0564/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java -- diff --git a/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java b/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java index 8ccc9b6..7fdd1cf 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java +++ b/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java @@ -339,8 +339,12 @@ public class XsltBuilder extends ServiceSupport implements Processor, CamelConte */ public void setTransformerSource(Source source) throws TransformerConfigurationException { TransformerFactory factory = converter.getTransformerFactory(); -// use a logger error listener so users can see from the logs what the error may be -factory.setErrorListener(new XsltErrorListener()); +if (errorListener != null) { +factory.setErrorListener(errorListener); +} else { +// use a logger error listener so users can see from the logs what the error may be +factory.setErrorListener(new XsltErrorListener()); +} if (getUriResolver() != null) { factory.setURIResolver(getUriResolver()); } http://git-wip-us.apache.org/repos/asf/camel/blob/01ca0564/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/saxon/SaxonXsltRouteTest.java -- diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/saxon/SaxonXsltRouteTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/saxon/SaxonXsltRouteTest.java new file mode 100644 index 000..ef5731f --- /dev/null +++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/saxon/SaxonXsltRouteTest.java @@ -0,0 +1,70 @@ +/** + * 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.itest.osgi.saxon; + +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.PaxExam; + +import static org.ops4j.pax.exam.OptionUtils.combine; + + +@RunWith(PaxExam.class) +public class SaxonXsltRouteTest extends OSGiIntegrationTestSupport { + +@Test +public void testSaxonXsltRoute() throws Exception { +MockEndpoint mock = getMockEndpoint(mock:result); +mock.expectedBodiesReceived(?xml version=\1.0\ encoding=\UTF-8\?goodbyeworld!/goodbye); +mock.message(0).body().isInstanceOf(String.class); + +template.sendBody(direct:start, helloworld!/hello); + +assertMockEndpointsSatisfied(); +} + +@Configuration +public static Option[] configure() { +Option[] options = combine( +getDefaultCamelKarafOptions(), +// using the features to install the other camel components +
git commit: Fixed CS
Repository: camel Updated Branches: refs/heads/master adeefbc24 - 39d286b80 Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/39d286b8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/39d286b8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/39d286b8 Branch: refs/heads/master Commit: 39d286b80501f4f0eecbefc8abcc4fe71d7f0045 Parents: adeefbc Author: Claus Ibsen davscl...@apache.org Authored: Wed Aug 27 14:39:35 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Wed Aug 27 14:39:35 2014 +0200 -- .../apache/camel/builder/xml/DefaultTransformErrorHandler.java | 5 +++-- .../src/main/java/org/apache/camel/builder/xml/XsltBuilder.java | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/39d286b8/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultTransformErrorHandler.java -- diff --git a/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultTransformErrorHandler.java b/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultTransformErrorHandler.java index 006545f..f2f253d 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultTransformErrorHandler.java +++ b/camel-core/src/main/java/org/apache/camel/builder/xml/DefaultTransformErrorHandler.java @@ -19,17 +19,18 @@ package org.apache.camel.builder.xml; import javax.xml.transform.ErrorListener; import javax.xml.transform.TransformerException; -import org.apache.camel.Exchange; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; +import org.apache.camel.Exchange; + /** * {@link ErrorHandler} and {@link ErrorListener} which will ignore warnings, * and throws error and fatal as exception, which ensures those can be caught by Camel and dealt-with. * p/ * Also any warning, error or fatal error is stored on the {@link Exchange} as a property with the keys - * {@link Exchange#XSLT_WARNING}, {@link Exchange#XSLT_ERROR}, and {@link Exchange#XSLT_FATAL_ERROR} which + * ttCamelXsltWarning/tt, ttCamelXsltError/tt, and ttCamelXsltFatalError/tt which * allows end users to access those information form the exchange. */ public class DefaultTransformErrorHandler implements ErrorHandler, ErrorListener { http://git-wip-us.apache.org/repos/asf/camel/blob/39d286b8/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java -- diff --git a/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java b/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java index 7fdd1cf..4a57537 100644 --- a/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java +++ b/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java @@ -41,6 +41,8 @@ import javax.xml.transform.sax.SAXSource; import javax.xml.transform.stax.StAXSource; import javax.xml.transform.stream.StreamSource; +import org.w3c.dom.Node; + import org.apache.camel.CamelContext; import org.apache.camel.CamelContextAware; import org.apache.camel.Exchange; @@ -59,7 +61,6 @@ import org.apache.camel.util.IOHelper; import org.apache.camel.util.ObjectHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.w3c.dom.Node; import static org.apache.camel.util.ObjectHelper.notNull;
[1/2] git commit: Fix all the checkstyle issues in camel-bindy
Repository: camel Updated Branches: refs/heads/master 39d286b80 - 45f0752c7 Fix all the checkstyle issues in camel-bindy Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d64d5548 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d64d5548 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d64d5548 Branch: refs/heads/master Commit: d64d5548c92d6ab310455f7349fb207787b1afe3 Parents: 39d286b Author: Daniel Kulp dk...@apache.org Authored: Wed Aug 27 10:14:47 2014 -0400 Committer: Daniel Kulp dk...@apache.org Committed: Wed Aug 27 10:14:47 2014 -0400 -- .../camel/dataformat/bindy/FormatFactory.java | 26 -- .../bindy/format/BigDecimalPatternFormat.java | 21 -- .../BindySimpleCsvBooleanFalseMarshallTest.java | 2 -- .../BindySimpleCsvBooleanTrueMarshallTest.java | 2 -- .../BindyBigDecimalGroupingUnmarshallTest.java | 28 +-- .../BindyBigDecimalRoundingUnmarshallTest.java | 29 ++-- 6 files changed, 82 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d64d5548/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java -- diff --git a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java index 794aace..48230a1 100755 --- a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java +++ b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java @@ -24,7 +24,26 @@ import java.util.Locale; import org.apache.camel.dataformat.bindy.annotation.DataField; import org.apache.camel.dataformat.bindy.annotation.KeyValuePairField; -import org.apache.camel.dataformat.bindy.format.*; +import org.apache.camel.dataformat.bindy.format.BigDecimalFormat; +import org.apache.camel.dataformat.bindy.format.BigDecimalPatternFormat; +import org.apache.camel.dataformat.bindy.format.BigIntegerFormat; +import org.apache.camel.dataformat.bindy.format.BooleanFormat; +import org.apache.camel.dataformat.bindy.format.ByteFormat; +import org.apache.camel.dataformat.bindy.format.BytePatternFormat; +import org.apache.camel.dataformat.bindy.format.CharacterFormat; +import org.apache.camel.dataformat.bindy.format.DatePatternFormat; +import org.apache.camel.dataformat.bindy.format.DoubleFormat; +import org.apache.camel.dataformat.bindy.format.DoublePatternFormat; +import org.apache.camel.dataformat.bindy.format.EnumFormat; +import org.apache.camel.dataformat.bindy.format.FloatFormat; +import org.apache.camel.dataformat.bindy.format.FloatPatternFormat; +import org.apache.camel.dataformat.bindy.format.IntegerFormat; +import org.apache.camel.dataformat.bindy.format.IntegerPatternFormat; +import org.apache.camel.dataformat.bindy.format.LongFormat; +import org.apache.camel.dataformat.bindy.format.LongPatternFormat; +import org.apache.camel.dataformat.bindy.format.ShortFormat; +import org.apache.camel.dataformat.bindy.format.ShortPatternFormat; +import org.apache.camel.dataformat.bindy.format.StringFormat; import org.apache.camel.util.ObjectHelper; @@ -50,7 +69,6 @@ public final class FormatFactory { * @return Format the formatter * @throws IllegalArgumentException if not suitable formatter is found */ -@SuppressWarnings(unchecked) private static Format? doGetFormat(Class? clazz, String pattern, String locale, String timezone, int precision, String rounding, boolean impliedDecimalSeparator, String decimalSeparator, String groupingSeparator) @@ -94,7 +112,9 @@ public final class FormatFactory { } else if (clazz == boolean.class || clazz == Boolean.class) { return new BooleanFormat(); } else if (clazz.isEnum()) { -return new EnumFormat(clazz); +@SuppressWarnings({rawtypes, unchecked}) +Format? fmt = new EnumFormat(clazz); +return fmt; } else { throw new IllegalArgumentException(Can not find a suitable formatter for the type: + clazz.getCanonicalName()); } http://git-wip-us.apache.org/repos/asf/camel/blob/d64d5548/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/format/BigDecimalPatternFormat.java -- diff --git a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/format/BigDecimalPatternFormat.java b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/format/BigDecimalPatternFormat.java
[2/2] git commit: Add missing apache headers
Add missing apache headers Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/45f0752c Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/45f0752c Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/45f0752c Branch: refs/heads/master Commit: 45f0752c72288b7f500d5fe1c2cf61ee4863bfe3 Parents: d64d554 Author: Daniel Kulp dk...@apache.org Authored: Wed Aug 27 10:15:45 2014 -0400 Committer: Daniel Kulp dk...@apache.org Committed: Wed Aug 27 10:15:45 2014 -0400 -- .../quartz/QuartzCronTriggerRouteTest.java | 16 .../quartz2/QuartzCronTriggerRouteTest.java | 16 .../itest/osgi/blueprint/BlueprintTracerTest.java | 16 3 files changed, 48 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/45f0752c/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java -- diff --git a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java index 2e62406..282c139 100644 --- a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java +++ b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzCronTriggerRouteTest.java @@ -1,3 +1,19 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.camel.component.quartz; import org.apache.camel.builder.RouteBuilder; http://git-wip-us.apache.org/repos/asf/camel/blob/45f0752c/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java -- diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java index bd31fec..c3937a1 100644 --- a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java +++ b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzCronTriggerRouteTest.java @@ -1,3 +1,19 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.apache.camel.component.quartz2; import org.apache.camel.builder.RouteBuilder; http://git-wip-us.apache.org/repos/asf/camel/blob/45f0752c/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java -- diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java index 05d0c66..3640b3b 100644 --- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java +++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/BlueprintTracerTest.java @@ -1,3 +1,19 @@ +/** + * Licensed to the Apache Software Foundation
[1/2] Fix all the checkstyle errors in camel-itest-karaf as a result of the pax-exam update
Repository: camel Updated Branches: refs/heads/master 45f0752c7 - cfa101453 http://git-wip-us.apache.org/repos/asf/camel/blob/cfa10145/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOgnlTest.java -- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOgnlTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOgnlTest.java index 9e29210..9cbdfc5 100644 --- a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOgnlTest.java +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOgnlTest.java @@ -18,8 +18,8 @@ package org.apache.camel.itest.karaf; import org.junit.Test; import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; @RunWith(PaxExam.class) http://git-wip-us.apache.org/repos/asf/camel/blob/cfa10145/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOpenshiftTest.java -- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOpenshiftTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOpenshiftTest.java index b24c6b1..0ee8cd6 100644 --- a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOpenshiftTest.java +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOpenshiftTest.java @@ -18,8 +18,8 @@ package org.apache.camel.itest.karaf; import org.junit.Test; import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; @RunWith(PaxExam.class) http://git-wip-us.apache.org/repos/asf/camel/blob/cfa10145/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOptaplannerTest.java -- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOptaplannerTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOptaplannerTest.java index b916548..1a975ba 100644 --- a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOptaplannerTest.java +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelOptaplannerTest.java @@ -18,8 +18,8 @@ package org.apache.camel.itest.karaf; import org.junit.Test; import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; @RunWith(PaxExam.class) http://git-wip-us.apache.org/repos/asf/camel/blob/cfa10145/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelPrinterTest.java -- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelPrinterTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelPrinterTest.java index 98cb42d..ff8ee68 100644 --- a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelPrinterTest.java +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelPrinterTest.java @@ -18,8 +18,8 @@ package org.apache.camel.itest.karaf; import org.junit.Test; import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; @RunWith(PaxExam.class) http://git-wip-us.apache.org/repos/asf/camel/blob/cfa10145/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelProtobufTest.java -- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelProtobufTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelProtobufTest.java index 164a457..ffa78ad 100644 --- a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelProtobufTest.java +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelProtobufTest.java @@ -20,8 +20,8 @@ import org.apache.camel.model.DataFormatDefinition; import org.apache.camel.model.dataformat.ProtobufDataFormat; import org.junit.Test; import org.junit.runner.RunWith; -import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; @RunWith(PaxExam.class) http://git-wip-us.apache.org/repos/asf/camel/blob/cfa10145/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelQuartz2Test.java
[2/2] git commit: Fix all the checkstyle errors in camel-itest-karaf as a result of the pax-exam update
Fix all the checkstyle errors in camel-itest-karaf as a result of the pax-exam update Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cfa10145 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cfa10145 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cfa10145 Branch: refs/heads/master Commit: cfa1014535eecbc1100c657ea5a672c67ad1c530 Parents: 45f0752 Author: Daniel Kulp dk...@apache.org Authored: Wed Aug 27 10:30:13 2014 -0400 Committer: Daniel Kulp dk...@apache.org Committed: Wed Aug 27 10:30:13 2014 -0400 -- .../camel/itest/karaf/AbstractFeatureTest.java | 46 ++-- .../apache/camel/itest/karaf/CamelAhcTest.java | 2 +- .../apache/camel/itest/karaf/CamelAmqpTest.java | 2 +- .../apache/camel/itest/karaf/CamelApnsTest.java | 2 +- .../apache/camel/itest/karaf/CamelAtomTest.java | 2 +- .../apache/camel/itest/karaf/CamelAvroTest.java | 2 +- .../apache/camel/itest/karaf/CamelAwsTest.java | 2 +- .../apache/camel/itest/karaf/CamelBamTest.java | 2 +- .../camel/itest/karaf/CamelBase64Test.java | 2 +- .../itest/karaf/CamelBeanValidatorTest.java | 2 +- .../camel/itest/karaf/CamelBeanioTest.java | 2 +- .../camel/itest/karaf/CamelBindyTest.java | 2 +- .../camel/itest/karaf/CamelCacheTest.java | 2 +- .../camel/itest/karaf/CamelCastorTest.java | 2 +- .../apache/camel/itest/karaf/CamelCmisTest.java | 2 +- .../camel/itest/karaf/CamelCometdTest.java | 2 +- .../camel/itest/karaf/CamelContextTest.java | 2 +- .../camel/itest/karaf/CamelCouchDBTest.java | 2 +- .../camel/itest/karaf/CamelCryptoTest.java | 2 +- .../apache/camel/itest/karaf/CamelCsvTest.java | 2 +- .../apache/camel/itest/karaf/CamelCxfTest.java | 2 +- .../camel/itest/karaf/CamelDisruptorTest.java | 2 +- .../apache/camel/itest/karaf/CamelDnsTest.java | 2 +- .../camel/itest/karaf/CamelDropboxTest.java | 2 +- .../itest/karaf/CamelElasticsearchTest.java | 2 +- .../apache/camel/itest/karaf/CamelExecTest.java | 2 +- .../camel/itest/karaf/CamelFacebookTest.java| 2 +- .../camel/itest/karaf/CamelFlatpackTest.java| 2 +- .../apache/camel/itest/karaf/CamelFopTest.java | 2 +- .../camel/itest/karaf/CamelFreemarkerTest.java | 2 +- .../apache/camel/itest/karaf/CamelFtpTest.java | 2 +- .../camel/itest/karaf/CamelGeocoderTest.java| 2 +- .../camel/itest/karaf/CamelGroovyTest.java | 2 +- .../apache/camel/itest/karaf/CamelGsonTest.java | 2 +- .../itest/karaf/CamelGuavaEventBusTest.java | 2 +- .../camel/itest/karaf/CamelGuiceTest.java | 2 +- .../camel/itest/karaf/CamelHazelcastTest.java | 2 +- .../camel/itest/karaf/CamelHbaseTest.java | 2 +- .../camel/itest/karaf/CamelHdfs2Test.java | 2 +- .../apache/camel/itest/karaf/CamelHdfsTest.java | 2 +- .../apache/camel/itest/karaf/CamelHl7Test.java | 2 +- .../camel/itest/karaf/CamelHttp4Test.java | 2 +- .../apache/camel/itest/karaf/CamelHttpTest.java | 2 +- .../camel/itest/karaf/CamelIbatisTest.java | 2 +- .../camel/itest/karaf/CamelInfinispanTest.java | 2 +- .../apache/camel/itest/karaf/CamelIrcTest.java | 2 +- .../camel/itest/karaf/CamelJacksonTest.java | 2 +- .../camel/itest/karaf/CamelJasyptTest.java | 2 +- .../apache/camel/itest/karaf/CamelJaxbTest.java | 2 +- .../camel/itest/karaf/CamelJcloudsTest.java | 2 +- .../apache/camel/itest/karaf/CamelJcrTest.java | 2 +- .../itest/karaf/CamelJdbcAggregatorTest.java| 2 +- .../apache/camel/itest/karaf/CamelJdbcTest.java | 2 +- .../camel/itest/karaf/CamelJettyTest.java | 2 +- .../camel/itest/karaf/CamelJgroupsTest.java | 2 +- .../apache/camel/itest/karaf/CamelJibxTest.java | 2 +- .../apache/camel/itest/karaf/CamelJingTest.java | 2 +- .../apache/camel/itest/karaf/CamelJmsTest.java | 2 +- .../apache/camel/itest/karaf/CamelJmxTest.java | 2 +- .../camel/itest/karaf/CamelJosqlTest.java | 2 +- .../apache/camel/itest/karaf/CamelJpaTest.java | 2 +- .../camel/itest/karaf/CamelJsonpathTest.java| 2 +- .../camel/itest/karaf/CamelJt400Test.java | 2 +- .../apache/camel/itest/karaf/CamelJuelTest.java | 2 +- .../camel/itest/karaf/CamelJxpathTest.java | 2 +- .../camel/itest/karaf/CamelKafkaTest.java | 2 +- .../camel/itest/karaf/CamelKratiTest.java | 2 +- .../apache/camel/itest/karaf/CamelLdapTest.java | 2 +- .../camel/itest/karaf/CamelLuceneTest.java | 2 +- .../apache/camel/itest/karaf/CamelMailTest.java | 2 +- .../camel/itest/karaf/CamelMetricsTest.java | 2 +- .../camel/itest/karaf/CamelMina2Test.java | 2 +- .../apache/camel/itest/karaf/CamelMinaTest.java | 2 +- .../camel/itest/karaf/CamelMongodbTest.java | 2 +- .../apache/camel/itest/karaf/CamelMqttTest.java | 2 +-
git commit: CAMEL-7403: test update to camel-hl7
Repository: camel Updated Branches: refs/heads/master cfa101453 - c8ff55bdc CAMEL-7403: test update to camel-hl7 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c8ff55bd Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c8ff55bd Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c8ff55bd Branch: refs/heads/master Commit: c8ff55bdcb027952a88a7573d1231fab722cd812 Parents: cfa1014 Author: Claus Ibsen davscl...@apache.org Authored: Wed Aug 27 17:16:59 2014 +0200 Committer: Claus Ibsen davscl...@apache.org Committed: Wed Aug 27 17:16:59 2014 +0200 -- .../apache/camel/component/hl7/MessageValidatorTest.java | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c8ff55bd/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/MessageValidatorTest.java -- diff --git a/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/MessageValidatorTest.java b/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/MessageValidatorTest.java index 050e37d..8219cd2 100644 --- a/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/MessageValidatorTest.java +++ b/components/camel-hl7/src/test/java/org/apache/camel/component/hl7/MessageValidatorTest.java @@ -69,7 +69,6 @@ public class MessageValidatorTest extends CamelTestSupport { } @Test(expected = CamelExecutionException.class) -@Ignore public void testCustomHapiContext() throws Exception { MockEndpoint mock = getMockEndpoint(mock:test5); mock.expectedMessageCount(0); @@ -78,9 +77,16 @@ public class MessageValidatorTest extends CamelTestSupport { assertMockEndpointsSatisfied(); } +@Test +public void testDefaultValidationContext() throws Exception { +MockEndpoint mock = getMockEndpoint(mock:test1); +mock.expectedMessageCount(1); +Message msg = createADT01Message(); +template.sendBody(direct:test1, msg); +assertMockEndpointsSatisfied(); +} @Test(expected = CamelExecutionException.class) -@Ignore public void testCustomValidationContext() throws Exception { MockEndpoint mock = getMockEndpoint(mock:test2); mock.expectedMessageCount(0);