This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit d5061f4864a1408fcbd594148fac9365cf749673 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Wed Apr 21 09:08:25 2021 +0200 Moving from master branch to main branch --- .../modules/eips/pages/content-based-router-eip.adoc | 2 +- .../docs/modules/eips/pages/content-enricher.adoc | 8 ++++---- .../docs/modules/eips/pages/content-filter-eip.adoc | 4 ++-- .../docs/modules/eips/pages/polling-consumer.adoc | 20 ++++++++++---------- .../main/docs/modules/eips/pages/return-address.adoc | 2 +- .../main/docs/modules/eips/pages/rollback-eip.adoc | 16 ++++++++-------- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-based-router-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-based-router-eip.adoc index a6ff7e0..ae6ffb0 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-based-router-eip.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-based-router-eip.adoc @@ -66,7 +66,7 @@ problems with the Java DSL, accepting using `when` or `otherwise`. ---- For further examples of this pattern in use you could look at the -https://github.com/apache/camel/blob/master/core/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java[junit test case]. +https://github.com/apache/camel/blob/main/core/camel-core/src/test/java/org/apache/camel/processor/ChoiceTest.java[junit test case]. [[ContentBasedRouter-UsingThisPattern]] == Using This Pattern diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc index 2a483b2..10be36a 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-enricher.adoc @@ -78,8 +78,8 @@ from("activemq:My.Queue") For further examples of this pattern in use you could look at one of the JUnit tests -* https://github.com/apache/camel/blob/master/core/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java[TransformTest] -* https://github.com/apache/camel/blob/master/core/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java[TransformViaDSLTest] +* https://github.com/apache/camel/blob/main/core/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java[TransformTest] +* https://github.com/apache/camel/blob/main/core/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java[TransformViaDSLTest] *Using Spring XML* @@ -164,7 +164,7 @@ dynamic language that can compute the uri dynamically using values from the current xref:latest@manual:ROOT:exchange.adoc[Exchange]. |`strategyRef` | |Refers to an -https://github.com/apache/camel/blob/master/core/camel-api/src/main/java/org/apache/camel/AggregationStrategy.java[AggregationStrategy] +https://github.com/apache/camel/blob/main/core/camel-api/src/main/java/org/apache/camel/AggregationStrategy.java[AggregationStrategy] to be used to merge the reply from the external service, into a single outgoing message. By default Camel will use the reply from the external service as outgoing message. From *Camel 2.12* onwards you can also use @@ -377,7 +377,7 @@ dynamic language that can compute the uri dynamically using values from the current xref:latest@manual:ROOT:exchange.adoc[Exchange]. |`strategyRef` | |Refers to an -https://github.com/apache/camel/blob/master/core/camel-api/src/main/java/org/apache/camel/AggregationStrategy.java[AggregationStrategy] +https://github.com/apache/camel/blob/main/core/camel-api/src/main/java/org/apache/camel/AggregationStrategy.java[AggregationStrategy] to be used to merge the reply from the external service, into a single outgoing message. By default Camel will use the reply from the external service as outgoing message. From *Camel 2.12* onwards you can also use diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-filter-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-filter-eip.adoc index eccdbcc..89a23d9 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/content-filter-eip.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/content-filter-eip.adoc @@ -27,8 +27,8 @@ In this example we add our own xref:latest@manual:ROOT:processor.adoc[Processor] For further examples of this pattern in use you could look at one of the JUnit tests -* https://github.com/apache/camel/blob/master/core/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java[TransformTest] -* https://github.com/apache/camel/blob/master/core/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java[TransformViaDSLTest] +* https://github.com/apache/camel/blob/main/core/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java[TransformTest] +* https://github.com/apache/camel/blob/main/core/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java[TransformViaDSLTest] == Using Spring XML diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/polling-consumer.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/polling-consumer.adoc index b43c5a9..8522266 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/polling-consumer.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/polling-consumer.adoc @@ -5,9 +5,9 @@ Camel supports implementing the http://www.enterpriseintegrationpatterns.com/PollingConsumer.html[Polling Consumer] from the xref:enterprise-integration-patterns.adoc[EIP patterns] using the -https://github.com/apache/camel/blob/master/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer] +https://github.com/apache/camel/blob/main/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer] interface which can be created via the -https://github.com/apache/camel/blob/master/core/camel-api/src/main/java/org/apache/camel/Endpoint.java[Endpoint.createPollingConsumer()] +https://github.com/apache/camel/blob/main/core/camel-api/src/main/java/org/apache/camel/Endpoint.java[Endpoint.createPollingConsumer()] method. image::eip/PollingConsumerSolution.gif[image] @@ -24,21 +24,21 @@ Exchange exchange = consumer.receive(); The *`ConsumerTemplate`* (discussed below) is also available. There are three main polling methods on -https://github.com/apache/camel/blob/master/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer] +https://github.com/apache/camel/blob/main/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer] [width="100%",cols="50%,50%",options="header",] |======================================================================= |Method name |Description -|https://github.com/apache/camel/blob/master/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer.receive()] +|https://github.com/apache/camel/blob/main/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer.receive()] |Waits until a message is available and then returns it; potentially blocking forever -|https://github.com/apache/camel/blob/master/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer.receive(long)] +|https://github.com/apache/camel/blob/main/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer.receive(long)] |Attempts to receive a message exchange, waiting up to the given timeout and returning null if no message exchange could be received within the time available -|https://github.com/apache/camel/blob/master/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer.receiveNoWait()] +|https://github.com/apache/camel/blob/main/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer.receiveNoWait()] |Attempts to receive a message exchange immediately without waiting and returning null if a message exchange is not available yet |======================================================================= @@ -163,16 +163,16 @@ scheduled poll is used to monitor some kind of state or resource and then fire message exchanges. Since this a such a common pattern, polling components can extend the -https://github.com/apache/camel/blob/master/core/camel-support/src/main/java/org/apache/camel/support/ScheduledPollConsumer.java[ScheduledPollConsumer] +https://github.com/apache/camel/blob/main/core/camel-support/src/main/java/org/apache/camel/support/ScheduledPollConsumer.java[ScheduledPollConsumer] base class which makes it simpler to implement this pattern. There is also the xref:components::quartz-component.adoc[Quartz Component] which provides scheduled delivery of messages using the Quartz enterprise scheduler. For more details see: -* https://github.com/apache/camel/blob/master/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer] +* https://github.com/apache/camel/blob/main/core/camel-api/src/main/java/org/apache/camel/PollingConsumer.java[PollingConsumer] * Scheduled Polling Components -** https://github.com/apache/camel/blob/master/core/camel-support/src/main/java/org/apache/camel/support/ScheduledPollConsumer.java[ScheduledPollConsumer] +** https://github.com/apache/camel/blob/main/core/camel-support/src/main/java/org/apache/camel/support/ScheduledPollConsumer.java[ScheduledPollConsumer] ** xref:components::scheduler-component.adoc[Scheduler] ** xref:components::atom-component.adoc[Atom] ** xref:components::beanstalk-component.adoc[Beanstalk] @@ -316,7 +316,7 @@ kicking-in. [[PollingConsumer-AboutErrorHandlingandScheduledPollingConsumers]] === About Error Handling and Scheduled Polling Consumers -https://github.com/apache/camel/blob/master/core/camel-support/src/main/java/org/apache/camel/support/ScheduledPollConsumer.java[ScheduledPollConsumer] +https://github.com/apache/camel/blob/main/core/camel-support/src/main/java/org/apache/camel/support/ScheduledPollConsumer.java[ScheduledPollConsumer] is scheduled based and its *`run`* method is invoked periodically based on schedule settings. But errors can also occur when a poll is being executed. For instance if Camel should poll a file network, and this diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/return-address.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/return-address.adoc index 45ee442..fa35d98 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/return-address.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/return-address.adoc @@ -53,6 +53,6 @@ from("activemq:queue:bar?disableReplyTo=true").to("mock:bar"); ---- For a complete example of this pattern, see this -https://github.com/apache/camel/blob/master/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsInOnlyWithReplyToAsHeaderTest.java[junit +https://github.com/apache/camel/blob/main/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsInOnlyWithReplyToAsHeaderTest.java[junit test case] diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc index 28fa95d..dd54a8a 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/rollback-eip.adoc @@ -146,7 +146,7 @@ And then refer to "required" from the route: In this sample we want to ensure that two endpoints is under transaction control. These two endpoints inserts data into a database. + The sample is in its full as a -https://github.com/apache/camel/blob/master/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/TransactionalClientDataSourceMinimalConfigurationTest.java[unit +https://github.com/apache/camel/blob/main/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/TransactionalClientDataSourceMinimalConfigurationTest.java[unit test]. First of all we setup the usual spring stuff in its configuration file. @@ -162,12 +162,12 @@ configure a transaction policy bean, so we do not have any `PROPAGATION_REQUIRED` beans. All the beans needed to be configured is *standard* Spring beans only, eg. there are no Camel specific configuration at -all.https://github.com/apache/camel/blob/master/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/springTransactionalClientDataSourceMinimalConfiguration.xml[springTransactionalClientDataSourceMinimalConfiguration]Then +all.https://github.com/apache/camel/blob/main/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/springTransactionalClientDataSourceMinimalConfiguration.xml[springTransactionalClientDataSourceMinimalConfiguration]Then we are ready to define our Camel routes. We have two routes: 1 for success conditions, and 1 for a forced rollback condition. + This is after all based on a unit test. Notice that we mark each route as transacted using the *transacted* -tag.https://github.com/apache/camel/blob/master/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/springTransactionalClientDataSourceMinimalConfiguration.xml[springTransactionalClientDataSourceMinimalConfiguration]That +tag.https://github.com/apache/camel/blob/main/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/springTransactionalClientDataSourceMinimalConfiguration.xml[springTransactionalClientDataSourceMinimalConfiguration]That is all that is needed to configure a Camel route as being transacted. Just remember to use the *transacted* DSL. The rest is standard Spring XML to setup the transaction manager. @@ -176,15 +176,15 @@ XML to setup the transaction manager. In this sample we want to listen for messages on a queue and process the messages with our business logic java code and send them along. Since -its based on a https://github.com/apache/camel/blob/master/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.java[TransactionMinimalConfigurationTest.java] the destination is a mock endpoint. +its based on a https://github.com/apache/camel/blob/main/components/camel-jms/src/test/java/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.java[TransactionMinimalConfigurationTest.java] the destination is a mock endpoint. First we configure the standard Spring XML to declare a JMS connection factory, a JMS transaction manager and our ActiveMQ component that we use in our -routing.https://github.com/apache/camel/blob/master/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.xml[TransactionMinimalConfigurationTest.xml]And +routing.https://github.com/apache/camel/blob/main/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.xml[TransactionMinimalConfigurationTest.xml]And then we configure our routes. Notice that all we have to do is mark the route as transacted using the *transacted* -tag.https://github.com/apache/camel/blob/master/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.xml[TransactionMinimalConfigurationTest.xml] +tag.https://github.com/apache/camel/blob/main/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.xml[TransactionMinimalConfigurationTest.xml] Transaction error handler @@ -233,10 +233,10 @@ propagation behaviors for that where you configure it as follows: * The second route use `PROPAGATION_REQUIRES_NEW` This is configured in the Spring XML -file.https://github.com/apache/camel/blob/master/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/MixedTransactionPropagationTest.xml[MixedTransactionPropagationTest.xml]Then +file.https://github.com/apache/camel/blob/main/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/MixedTransactionPropagationTest.xml[MixedTransactionPropagationTest.xml]Then in the routes you use transacted DSL to indicate which of these two propagations it -uses.https://github.com/apache/camel/blob/master/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedTransactionPropagationTest.java[MixedTransactionPropagationTest.java]Notice +uses.https://github.com/apache/camel/blob/main/components/camel-spring/src/test/java/org/apache/camel/spring/interceptor/MixedTransactionPropagationTest.java[MixedTransactionPropagationTest.java]Notice how we have configured the `onException` in the 2nd route to indicate in case of any exceptions we should handle it and just rollback this transaction. This is done using the `markRollbackOnlyLast` which tells