This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a change to branch WillemJiang-patch-1
in repository https://gitbox.apache.org/repos/asf/camel.git
from d515d4b22e5 Fix the camel project export dir option typo
add ec4178b4a56 Update the camel export to use --directory option
No new revisions were added by this update.
Summary of changes:
docs/user-manual/modules/ROOT/pages/camel-jbang.adoc | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a change to branch WillemJiang-patch-1
in repository https://gitbox.apache.org/repos/asf/camel.git
at d515d4b22e5 Fix the camel project export dir option typo
This branch includes the following new commits:
new d515d4b22e5 Fix the camel project export dir option typo
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch WillemJiang-patch-1
in repository https://gitbox.apache.org/repos/asf/camel.git
commit d515d4b22e5108726e751506544cb5e37500a8d9
Author: Willem Jiang
AuthorDate: Tue Nov 29 11:27:02 2022 +0800
Fix the camel project export dir option typo
---
docs/user-manual/modules/ROOT/pages/camel-jbang.adoc | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
index 16dace4c5e7..643179f4519 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
@@ -1512,7 +1512,7 @@ To export to another directly (copies the files) you
execute:
[source,bash]
-camel export --runtime=camel-main --gav=com.foo:acme:1.0-SNAPSHOT
--dir=../myproject
+camel export --runtime=camel-main --gav=com.foo:acme:1.0-SNAPSHOT
-dir=../myproject
TIP: See the possible options by running: `camel export --help` for more
details.
@@ -1524,7 +1524,7 @@ specify the `--build-tool=gradle` when exporting, such as:
[source,bash]
-camel export --build-tool=gradle --runtime=spring-boot
--gav=com.foo:acme:1.0-SNAPSHOT --dir=../myproject
+camel export --build-tool=gradle --runtime=spring-boot
--gav=com.foo:acme:1.0-SNAPSHOT -dir=../myproject
=== Exporting with JMX management included
@@ -1534,7 +1534,7 @@ To include JMX, you need to add `camel:management` in the
`--deps` option, as sh
[source,bash]
-camel export --runtime=quarkus --gav=com.foo:acme:1.0-SNAPSHOT
--deps=camel:management --dir=../myproject
+camel export --runtime=quarkus --gav=com.foo:acme:1.0-SNAPSHOT
--deps=camel:management -dir=../myproject
=== Exporting with Camel CLI included
@@ -1544,7 +1544,7 @@ To be able to continue to use Camel CLI (i.e. `camel`),
you need to add `camel:c
[source,bash]
-camel export --runtime=quarkus --gav=com.foo:acme:1.0-SNAPSHOT
--deps=camel:cli-connector --dir=../myproject
+camel export --runtime=quarkus --gav=com.foo:acme:1.0-SNAPSHOT
--deps=camel:cli-connector -dir=../myproject
=== Configuring exporting
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new eac293a [CAMEL-16001] Camel component for HuaweiCloud Simple
Notification Services (SMN) se… (#4900)
eac293a is described below
commit eac293ae4e8f5472f4aea0d29994d6e65aa2fde0
Author: Reji Mathews
AuthorDate: Wed Jan 27 19:38:37 2021 -0500
[CAMEL-16001] Camel component for HuaweiCloud Simple Notification Services
(SMN) se… (#4900)
* Camel component for HuaweiCloud Simple Notification Services (SMN)
services
SMN is one among the Cloud product offering within HuaweiCloud ecosystem
which enables cloud application users to broadcast/send out notifications to
subscribers. It provides a single unified endpoint aka. topic for the
application to push data.
Multiple subscribers can be associated with a given topic. Simple Message
Notification (SMN) enables you to broadcast messages to subscribers who can
chose to receive the notifications via an email addresses, phone numbers,
serverless functions and HTTP/HTTPS servers and connect cloud services through
notifications, reducing system complexity and developmental efforts to the
publishing app.
* CAMEL-16001 Fixing typos in documentation
* CAMEL-16001 updating doc with unique identifiers returned by smn server
once api request is processed. these are mapped to exchange properties
* CAMEL-16001 - adding license headers to all test java classes
* CAMEL-16001 - updated code for SMN endpoint resolver
* CAMEL-16001 removed redundant member simpleNotificationEndpoint since its
already part of superclass
* CAMEL-16001 Moving all exchange properties to SmnProperties constants
class
* CAMEL-16001 remove lazy initialization of SmnClient
* CAMEL-16001 - Replacing wiremocks and Mockito with SmnClientMock to stub
the SmnClient method.
Replacing wiremocks and Mockito with SmnClientMock to stub the SmnClient
method.
* CAMEL-16001 - Updating logging level
* CAMEL-16001 : removed unused dependencies/imports
* CAMEL-16001 adding ASF licenses / final immutable to constants and
smnclient init to overriden doStart()
adding ASF licenses / final immutable to constants and smnclient init to
overriden doStart()
* CAMEL-16001 - removing unit tests for models
* CAMEL-16001 - adding Apache license headers
Co-authored-by: Reji Mathews 84131876
---
components/camel-huaweicloud-smn/pom.xml | 117 +++
.../src/main/docs/hwcloud-component.adoc | 148 +
.../smn/SimpleNotificationComponent.java | 32 ++
.../smn/SimpleNotificationEndpoint.java| 239 +
.../smn/SimpleNotificationProducer.java| 368 +
.../huaweicloud/smn/SimpleNotificationUtils.java | 61
.../huaweicloud/smn/constants/SmnConstants.java| 25 ++
.../huaweicloud/smn/constants/SmnOperations.java | 26 ++
.../huaweicloud/smn/constants/SmnProperties.java | 19 ++
.../huaweicloud/smn/constants/SmnServices.java | 25 ++
.../smn/models/ClientConfigurations.java | 138
.../huaweicloud/smn/models/ServiceKeys.java| 59
.../org/apache/camel/component/hwcloud-smn | 1 +
.../smn/PublishTemplatedMessageTest.java | 86 +
.../huaweicloud/smn/PublishTextMessageTest.java| 78 +
.../component/huaweicloud/smn/SmnClientMock.java | 36 ++
.../huaweicloud/smn/TestConfiguration.java | 66
.../smn/constants/SmnConstantsTest.java| 27 ++
.../smn/constants/SmnOperationsTest.java | 28 ++
.../smn/constants/SmnPropertiesTest.java | 33 ++
.../huaweicloud/smn/constants/SmnServicesTest.java | 27 ++
.../src/test/resources/log4j2.properties | 22 ++
.../test/resources/testconfiguration.properties| 22 ++
23 files changed, 1683 insertions(+)
diff --git a/components/camel-huaweicloud-smn/pom.xml
b/components/camel-huaweicloud-smn/pom.xml
new file mode 100644
index 000..c860fb5
--- /dev/null
+++ b/components/camel-huaweicloud-smn/pom.xml
@@ -0,0 +1,117 @@
+
+
+http://maven.apache.org/POM/4.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;>
+
+ 4.0.0
+
+ org.apache.camel
+ camel-huaweicloud-smn
+ jar
+ 3.8.0-SNAPSHOT
+
+ Huawei Cloud SimpleNotification Component
+
+
+UTF-8
+UTF-8
+
+
+
+
+
+
+org.apache.camel
+camel-bom
+3.8.0-SNAPSHOT
+import
+pom
+
+
+
+
+
+
+
+
+ org.apache.camel
+ camel-support
+
+
+
+ com.fasterxml.jackson.core
+
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a change to branch issue-234
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git.
was bcfe5d6 #234 Added log when starting or stoping ActiveMQ Broker failed
This change permanently discards the following revisions:
discard bcfe5d6 #234 Added log when starting or stoping ActiveMQ Broker failed
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a change to branch issue-234
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git.
at bcfe5d6 #234 Added log when starting or stoping ActiveMQ Broker failed
This branch includes the following new commits:
new bcfe5d6 #234 Added log when starting or stoping ActiveMQ Broker failed
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 2331a41 CAMEL-13605 Support setup proxy host and port on Telegram.
2331a41 is described below
commit 2331a41fc7628b123762c57b92940913782033da
Author: Willem Jiang
AuthorDate: Mon Jun 3 20:07:01 2019 +0800
CAMEL-13605 Support setup proxy host and port on Telegram.
---
.../src/main/docs/telegram-component.adoc | 18 +---
.../component/telegram/TelegramConfiguration.java | 25 +-
.../camel/component/telegram/TelegramEndpoint.java | 10 -
.../camel/component/telegram/TelegramService.java | 2 ++
.../service/TelegramServiceRestBotAPIAdapter.java | 13 +--
.../telegram/TelegramConfigurationTest.java| 4 +++-
6 files changed, 59 insertions(+), 13 deletions(-)
diff --git a/components/camel-telegram/src/main/docs/telegram-component.adoc
b/components/camel-telegram/src/main/docs/telegram-component.adoc
index 13939b0..4439707 100644
--- a/components/camel-telegram/src/main/docs/telegram-component.adoc
+++ b/components/camel-telegram/src/main/docs/telegram-component.adoc
@@ -79,12 +79,14 @@ with the following path and query parameters:
|===
- Query Parameters (23 parameters):
+ Query Parameters (25 parameters):
[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
+| *proxyHost* (common) | The proxyHost which could be used when sending out
the message. | | String
+| *proxyPort* (common) | The proxyPort which could be used when sending out
the message. | | Integer
| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the
Camel routing Error Handler, which mean any exceptions occurred while the
consumer is trying to pickup incoming messages, or the likes, will now be
processed as a message and handled by the routing Error Handler. By default the
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with
exceptions, that will be logged at WARN or ERROR level and ignored. | false |
boolean
| *limit* (consumer) | Limit on the number of updates that can be received in
a single polling request. | 100 | Integer
| *sendEmptyMessageWhenIdle* (consumer) | If the polling consumer did not poll
any files, you can enable this option to send an empty message (no body)
instead. | false | boolean
@@ -358,16 +360,16 @@
from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
OutgoingTextMessage msg = new OutgoingTextMessage();
msg.setText("Choose one option!");
-
+
InlineKeyboardButton buttonOptionOneI = InlineKeyboardButton.builder()
.text("Option One - I").build();
-
+
InlineKeyboardButton buttonOptionOneII = InlineKeyboardButton.builder()
.text("Option One - II").build();
-
+
InlineKeyboardButton buttonOptionTwoI = InlineKeyboardButton.builder()
.text("Option Two - I").build();
-
+
ReplyKeyboardMarkup replyMarkup = ReplyKeyboardMarkup.builder()
.keyboard()
.addRow(Arrays.asList(buttonOptionOneI, buttonOptionOneII))
@@ -375,7 +377,7 @@
from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
.close()
.oneTimeKeyboard(true)
.build();
-
+
msg.setReplyKeyboardMarkup(replyMarkup);
exchange.getIn().setBody(msg);
@@ -392,11 +394,11 @@
from("telegram:bots/123456789:insertYourAuthorizationTokenHere")
OutgoingTextMessage msg = new OutgoingTextMessage();
msg.setText("Your answer was accepted!");
-
+
ReplyKeyboardMarkup replyMarkup = ReplyKeyboardMarkup.builder()
.removeKeyboard(true)
.build();
-
+
msg.setReplyKeyboardMarkup(replyMarkup);
exchange.getIn().setBody(msg);
diff --git
a/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/TelegramConfiguration.java
b/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/TelegramConfiguration.java
index aafc73f..52f94dd 100644
---
a/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/TelegramConfiguration.java
+++
b/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/TelegramConfiguration.java
@@ -37,6 +37,12 @@ public class TelegramConfiguration {
@Metadata(required = true)
private String authorizationToken;
+@UriParam(description = "The proxyHost which could be used when sending
out the message.")
+private String proxyHost;
+
+@UriParam(description = "Th
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.x by this push:
new 7058333 CAMEL-13605 Support setup proxy host and port on Telegram.
7058333 is described below
commit 7058333018644b56f424fb33fbc74d512c283ade
Author: Willem Jiang
AuthorDate: Mon Jun 3 20:07:01 2019 +0800
CAMEL-13605 Support setup proxy host and port on Telegram.
---
.../src/main/docs/telegram-component.adoc | 4 +++-
.../component/telegram/TelegramConfiguration.java | 25 +-
.../camel/component/telegram/TelegramEndpoint.java | 9
.../camel/component/telegram/TelegramService.java | 3 ++-
.../service/TelegramServiceRestBotAPIAdapter.java | 13 +--
.../telegram/TelegramConfigurationTest.java| 4 +++-
6 files changed, 52 insertions(+), 6 deletions(-)
diff --git a/components/camel-telegram/src/main/docs/telegram-component.adoc
b/components/camel-telegram/src/main/docs/telegram-component.adoc
index 83a4461..270d13d 100644
--- a/components/camel-telegram/src/main/docs/telegram-component.adoc
+++ b/components/camel-telegram/src/main/docs/telegram-component.adoc
@@ -78,12 +78,14 @@ with the following path and query parameters:
|===
- Query Parameters (22 parameters):
+ Query Parameters (24 parameters):
[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
+| *proxyHost* (common) | The proxyHost which could be used when sending out
the message. | | String
+| *proxyPort* (common) | The proxyPort which could be used when sending out
the message. | | Integer
| *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the
Camel routing Error Handler, which mean any exceptions occurred while the
consumer is trying to pickup incoming messages, or the likes, will now be
processed as a message and handled by the routing Error Handler. By default the
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with
exceptions, that will be logged at WARN or ERROR level and ignored. | false |
boolean
| *limit* (consumer) | Limit on the number of updates that can be received in
a single polling request. | 100 | Integer
| *sendEmptyMessageWhenIdle* (consumer) | If the polling consumer did not poll
any files, you can enable this option to send an empty message (no body)
instead. | false | boolean
diff --git
a/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/TelegramConfiguration.java
b/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/TelegramConfiguration.java
index 6e52fd4..98d309c 100644
---
a/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/TelegramConfiguration.java
+++
b/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/TelegramConfiguration.java
@@ -37,6 +37,12 @@ public class TelegramConfiguration {
@Metadata(required = "true")
private String authorizationToken;
+@UriParam(description = "The proxyHost which could be used when sending
out the message.")
+private String proxyHost;
+
+@UriParam(description = "The proxyPort which could be used when sending
out the message.")
+private Integer proxyPort;
+
@UriParam(description = "The identifier of the chat that will receive the
produced messages. Chat ids can be first obtained from incoming messages "
+ "(eg. when a telegram user starts a conversation with a bot, its
client sends automatically a '/start' message containing the chat id). "
+ "It is an optional parameter, as the chat id can be set
dynamically for each outgoing message (using body or headers).", label =
"producer")
@@ -98,7 +104,24 @@ public class TelegramConfiguration {
this.authorizationToken = authorizationToken;
}
-public String getChatId() {
+public String getProxyHost() {
+ return proxyHost;
+}
+
+public void setProxyHost(String proxyHost) {
+ this.proxyHost = proxyHost;
+}
+
+public Integer getProxyPort() {
+ return proxyPort;
+}
+
+public void setProxyPort(Integer proxyPort) {
+ this.proxyPort = proxyPort;
+}
+
+
+ public String getChatId() {
return chatId;
}
diff --git
a/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/TelegramEndpoint.java
b/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/TelegramEndpoint.java
index d901acf..1765392 100644
---
a/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/TelegramEndpoint.java
+++
b/components/camel-telegram/src/main/java/org/apache/camel/component/telegram/Telegr
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 7c882e0 Added source code into using-propertyplaceholder.adoc
7c882e0 is described below
commit 7c882e0bc938308f9f79753f422bc3305722d249
Author: Willem Jiang
AuthorDate: Wed Mar 27 09:27:52 2019 +0800
Added source code into using-propertyplaceholder.adoc
---
.../ROOT/pages/using-propertyplaceholder.adoc | 199 +++--
1 file changed, 189 insertions(+), 10 deletions(-)
diff --git a/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
b/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
index 6dc99a9..5741588 100644
--- a/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
+++ b/docs/user-manual/modules/ROOT/pages/using-propertyplaceholder.adoc
@@ -651,7 +651,31 @@ Each location is separated by comma.
When using Blueprint property placeholder in the Blueprint XML file, you
can declare the properties directly in the XML file as shown below:
-include::../../../components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-outside.xml[]
+[source,xml]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+http://camel.apache.org/schema/blueprint;>
+
+
+
+
+
+
+
+
+---
Notice that we have a `` which refers to one of the properties. And in
the Camel route we refer to the other using the `{{ }}` notation.
@@ -659,7 +683,16 @@ the Camel route we refer to the other using the `{{ }}`
notation.
Now if you want to override these Blueprint properties from an unit
test, you can do this as shown below:
-include::../../../components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminOverridePropertiesOutsideCamelContextTest.java[]
+[source,java]
+
+protected String useOverridePropertiesWithConfigAdmin(Dictionary props) {
+// add the properties we want to override
+props.put("greeting", "Bye");
+
+// return the PID of the config-admin we are using in the blueprint xml
file
+return "my-placeholders";
+}
+
To do this we override and implement the
`useOverridePropertiesWithConfigAdmin` method. We can then put the
@@ -683,14 +716,47 @@ For example in the blueprint XML file we have the
`persistence-id="stuff"`, which mean it will load the configuration
file as `etc/stuff.cfg`.
-include::../../../components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfile.xml[]
+[source,xml]
+
+http://www.osgi.org/xmlns/blueprint/v1.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0;
+ xsi:schemaLocation="
+ http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
+ http://www.osgi.org/xmlns/blueprint/v1.0.0
https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd;>
+
+
+
+
+
+
+
+
+
+http://camel.apache.org/schema/blueprint;>
+
+
+
+
+
+
+
+
+
Now if you want to unit test this blueprint XML file, then you can override
the `loadConfigAdminConfigurationFile` and tell Camel which file to
load as shown below:
-include::../../../components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadConfigurationFileTest.java[]
-
+[source,java]
+
+@Override
+protected String[] loadConfigAdminConfigurationFile() {
+// String[0] = tell Camel the path of the .cfg file to use for OSGi
ConfigAdmin in the blueprint XML file
+// String[1] = tell Camel the persistence-id of the
cm:property-placeholder in the blueprint XML file
+return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"};
+}
+
Notice that this method requires to return a `String[]` with 2 values. The
1st value is the path for the configuration file to load. The second
value is the persistence-id of the `` tag.
@@ -711,11 +777,92 @@ greeting=Bye
You can do both as well. Here is a complete example. First we have the
Blueprint XML file:
-include::../../../components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/configadmin-loadfileoverride.xml[]
+[source,xml]
+
+http://www.osgi.org/xmlns/blueprint/v1.0.0;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0;
+ xsi:schemaLocation="
+ http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd
+ ht
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a change to branch camel-2.23.x
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 9f10c0b CAMEL-13340: Invalid swagger json/yaml generated for Rest DSL
new 9ce70ff CAMEL-13348 support to do the elasticsearch without
specifying the indexName and indexType
new 3d331e8 CAMEL-13352 Updated the document of HostAddresses option
The 34221 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../src/main/docs/elasticsearch-rest-component.adoc| 2 +-
.../elasticsearch/ElasticsearchConfiguration.java | 3 +--
.../converter/ElasticsearchActionRequestConverter.java | 18 ++
.../ElasticsearchGetSearchDeleteExistsUpdateTest.java | 18 +-
4 files changed, 29 insertions(+), 12 deletions(-)
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a change to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 670488a CAMEL-13340: Invalid swagger json/yaml generated for Rest DSL
new 317c886 CAMEL-13348 support to do the elasticsearch without
specifying the indexName and indexType
new ddec085 CAMEL-13352 Updated the document of HostAddresses option
new 717c73f CAMEL-13352 Update the elasticsearch-rest-component
The 34403 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../src/main/docs/elasticsearch-rest-component.adoc| 2 +-
.../elasticsearch/ElasticsearchConfiguration.java | 3 +--
.../converter/ElasticsearchActionRequestConverter.java | 18 ++
.../ElasticsearchGetSearchDeleteExistsUpdateTest.java | 18 +-
4 files changed, 29 insertions(+), 12 deletions(-)
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new b3290ed CAMEL-13352 Updated the document of HostAddresses option
b3290ed is described below
commit b3290ed0638bc751edc27a99791dce60e26ec0eb
Author: Willem Jiang
AuthorDate: Thu Mar 21 09:45:08 2019 +0800
CAMEL-13352 Updated the document of HostAddresses option
---
.../camel/component/elasticsearch/ElasticsearchConfiguration.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
index c8639cf..ffe47c9 100644
---
a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
+++
b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/ElasticsearchConfiguration.java
@@ -108,7 +108,6 @@ public class ElasticsearchConfiguration {
/**
* Comma separated list with ip:port formatted remote transport addresses
to use.
- * The ip and port options must be left blank for hostAddresses to be
considered instead.
*/
public String getHostAddresses() {
return hostAddresses;
@@ -269,4 +268,4 @@ public class ElasticsearchConfiguration {
public void setScrollKeepAliveMs(int scrollKeepAliveMs) {
this.scrollKeepAliveMs = scrollKeepAliveMs;
}
-}
\ No newline at end of file
+}
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 30203d6 CAMEL-13348 support to do the elasticsearch without
specifying the indexName and indexType
30203d6 is described below
commit 30203d69cc67f92313845bd26a063247bb4d7ea4
Author: Willem Jiang
AuthorDate: Wed Mar 20 19:47:39 2019 +0800
CAMEL-13348 support to do the elasticsearch without specifying the
indexName and indexType
---
.../converter/ElasticsearchActionRequestConverter.java | 18 ++
.../ElasticsearchGetSearchDeleteExistsUpdateTest.java | 18 +-
2 files changed, 27 insertions(+), 9 deletions(-)
diff --git
a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/converter/ElasticsearchActionRequestConverter.java
b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/converter/ElasticsearchActionRequestConverter.java
index fbb3c43..0262821 100644
---
a/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/converter/ElasticsearchActionRequestConverter.java
+++
b/components/camel-elasticsearch-rest/src/main/java/org/apache/camel/component/elasticsearch/converter/ElasticsearchActionRequestConverter.java
@@ -24,6 +24,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.camel.Converter;
import org.apache.camel.Exchange;
import org.apache.camel.component.elasticsearch.ElasticsearchConstants;
+import org.apache.camel.util.ObjectHelper;
import org.elasticsearch.action.bulk.BulkRequest;
import org.elasticsearch.action.delete.DeleteRequest;
import org.elasticsearch.action.get.GetRequest;
@@ -157,9 +158,17 @@ public final class ElasticsearchActionRequestConverter {
if (queryObject instanceof SearchRequest) {
return (SearchRequest) queryObject;
}
-SearchRequest searchRequest = new SearchRequest(exchange.getIn()
-.getHeader(ElasticsearchConstants.PARAM_INDEX_NAME, String.class))
-
.types(exchange.getIn().getHeader(ElasticsearchConstants.PARAM_INDEX_TYPE,
String.class));
+SearchRequest searchRequest = new SearchRequest();
+
+// Only setup the indexName and indexType if the message header has
the setting
+String indexName =
exchange.getIn().getHeader(ElasticsearchConstants.PARAM_INDEX_NAME,
String.class);
+String indexType =
exchange.getIn().getHeader(ElasticsearchConstants.PARAM_INDEX_TYPE,
String.class);
+if (ObjectHelper.isNotEmpty(indexName)) {
+searchRequest.indices(indexName);
+}
+if (ObjectHelper.isNotEmpty(indexType)) {
+searchRequest.types(indexType);
+}
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
String queryText = null;
@@ -174,7 +183,7 @@ public final class ElasticsearchActionRequestConverter {
XContentBuilder contentBuilder =
XContentFactory.contentBuilder(XContentType.JSON);
queryText = Strings.toString(contentBuilder.map(mapQuery));
} catch (IOException e) {
-LOG.error(e.getMessage());
+LOG.error("Cannot build the QueryText from the map.", e);
}
} else if (queryObject instanceof String) {
queryText = (String) queryObject;
@@ -186,6 +195,7 @@ public final class ElasticsearchActionRequestConverter {
}
} else {
// Cannot convert the queryObject into SearchRequest
+LOG.info("Cannot convert queryObject into SearchRequest object");
return null;
}
diff --git
a/components/camel-elasticsearch-rest/src/test/java/org/apache/camel/component/elasticsearch/ElasticsearchGetSearchDeleteExistsUpdateTest.java
b/components/camel-elasticsearch-rest/src/test/java/org/apache/camel/component/elasticsearch/ElasticsearchGetSearchDeleteExistsUpdateTest.java
index 8b31644..15b0ce5 100644
---
a/components/camel-elasticsearch-rest/src/test/java/org/apache/camel/component/elasticsearch/ElasticsearchGetSearchDeleteExistsUpdateTest.java
+++
b/components/camel-elasticsearch-rest/src/test/java/org/apache/camel/component/elasticsearch/ElasticsearchGetSearchDeleteExistsUpdateTest.java
@@ -92,7 +92,7 @@ public class ElasticsearchGetSearchDeleteExistsUpdateTest
extends ElasticsearchB
match.put("match", actualQuery);
Map query = new HashMap<>();
query.put("query", match);
-SearchHits response = template.requestBody("direct:search", match,
SearchHits.class);
+SearchHits response = template.requestBody("direct:search", query,
SearchHits.class);
assertNotNull("response should not be nu
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 9d64288 Fixed the digitalocean link format issue.
9d64288 is described below
commit 9d64288178b5ffe6e6f73da078421aaabee0d210
Author: Willem Jiang
AuthorDate: Fri Mar 8 09:01:55 2019 +0800
Fixed the digitalocean link format issue.
---
.../camel-digitalocean/src/main/docs/digitalocean-component.adoc| 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/components/camel-digitalocean/src/main/docs/digitalocean-component.adoc
b/components/camel-digitalocean/src/main/docs/digitalocean-component.adoc
index e063a4a..a6e0f02 100644
--- a/components/camel-digitalocean/src/main/docs/digitalocean-component.adoc
+++ b/components/camel-digitalocean/src/main/docs/digitalocean-component.adoc
@@ -3,11 +3,11 @@
*Available as of Camel version 2.19*
-The **DigitalOcean** component allows you to manage Droplets and resources
within the DigitalOcean cloud with **Camel** by encapsulating
[digitalocean-api-java](https://www.digitalocean.com/community/projects/api-client-in-java).
All of the functionality that you are familiar with in the DigitalOcean
control panel is also available through this Camel component.
+The **DigitalOcean** component allows you to manage Droplets and resources
within the DigitalOcean cloud with **Camel** by encapsulating
https://www.digitalocean.com/community/projects/api-client-in-java[digitalocean-api-java].
All of the functionality that you are familiar with in the DigitalOcean
control panel is also available through this Camel component.
=== Prerequisites
-You must have a valid DigitalOcean account and a valid OAuth token. You can
generate an OAuth token by visiting the [Apps &
API](https://cloud.digitalocean.com/settings/applications) section of the
DigitalOcean control panel for your account.
+You must have a valid DigitalOcean account and a valid OAuth token. You can
generate an OAuth token by visiting the [Apps & API] section of the
DigitalOcean control panel for your account.
=== URI format
@@ -115,7 +115,7 @@ All message bodies returned are using objects provided by
the **digitalocean-api
=== API Rate Limits
-DigitalOcean REST API encapsulated by camel-digitalocean component is
subjected to API Rate Limiting. You can find the per method limits in the [API
Rate Limits
documentation](https://developers.digitalocean.com/documentation/v2/#rate-limit).
+DigitalOcean REST API encapsulated by camel-digitalocean component is
subjected to API Rate Limiting. You can find the per method limits in the
https://developers.digitalocean.com/documentation/v2/#rate-limit[API Rate
Limits documentation].
=== Account endpoint
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git
The following commit(s) were added to refs/heads/master by this push:
new e01360f Using the maven-remote-resources-plugin to avoid creating
LICENSE and NOTICE file by hand
e01360f is described below
commit e01360f882ff8573710bebf26d4c237ebc996b7e
Author: Willem Jiang
AuthorDate: Sat Mar 2 21:21:00 2019 +0800
Using the maven-remote-resources-plugin to avoid creating LICENSE and
NOTICE file by hand
---
.../src/main/resources/META-INF/LICENSE.txt| 203 -
.../src/main/resources/META-INF/NOTICE.txt | 11 --
.../src/main/resources/META-INF/LICENSE.txt| 203 -
.../src/main/resources/META-INF/NOTICE.txt | 11 --
.../src/main/resources/META-INF/LICENSE.txt| 203 -
.../src/main/resources/META-INF/NOTICE.txt | 11 --
.../src/main/resources/META-INF/LICENSE.txt| 203 -
.../src/main/resources/META-INF/NOTICE.txt | 11 --
.../src/main/resources/META-INF/LICENSE.txt| 203 -
.../src/main/resources/META-INF/NOTICE.txt | 11 --
.../src/main/resources/META-INF/LICENSE.txt| 203 -
.../src/main/resources/META-INF/NOTICE.txt | 11 --
.../src/main/resources/META-INF/LICENSE.txt| 203 -
.../src/main/resources/META-INF/NOTICE.txt | 11 --
.../src/main/resources/META-INF/LICENSE.txt| 203 -
.../src/main/resources/META-INF/NOTICE.txt | 11 --
.../src/main/resources/META-INF/LICENSE.txt| 203 -
.../src/main/resources/META-INF/NOTICE.txt | 11 --
.../src/main/resources/META-INF/LICENSE.txt| 203 -
.../src/main/resources/META-INF/NOTICE.txt | 11 --
.../src/main/resources/META-INF/LICENSE.txt| 203 -
.../src/main/resources/META-INF/NOTICE.txt | 11 --
pom.xml| 23 ++-
23 files changed, 20 insertions(+), 2357 deletions(-)
diff --git a/camel-k-maven-plugin/src/main/resources/META-INF/LICENSE.txt
b/camel-k-maven-plugin/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..000
--- a/camel-k-maven-plugin/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
-http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the inte
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 8b16b96 CAMEL-13249 Fixed the build of camel-http4
new 34cc9aa CAMEL-13240 Removed the camel-validator-test-resources jar
new 0328ceb CAMEL-13240 Removed the test jars from camel-spring components
The 35649 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
components/camel-spring/pom.xml| 16 ++
.../camel-spring/src/test/java/a/b/c/Test.java | 24 +
.../scan/DefaultPackageScanClassResolverTest.java | 6 ++-
.../src/test/resources/package+scan+test.jar | Bin 1041 -> 0 bytes
.../src/test/resources/package_scan_test.jar | Bin 1041 -> 0 bytes
.../1.0.0/camel-validator-test-resources-1.0.0.jar | Bin 17660 -> 0 bytes
.../1.0.0/camel-validator-test-resources-1.0.0.pom | 25 --
tests/camel-itest/pom.xml | 14 +-
.../camel-validator-test-resources/pom.xml | 55 +
.../camel/component/validator/dotslash/child.xsd | 33 +
.../camel/component/validator/dotslash/parent.xsd | 34 +
.../component/validator/doubleslash/child.xsd | 33 +
.../component/validator/doubleslash/parent.xsd | 34 +
.../validator/relativeparent/child/child.xsd | 33 +
.../component/validator/relativeparent/parent.xsd | 34 +
tests/test-bundles/pom.xml | 3 +-
16 files changed, 305 insertions(+), 39 deletions(-)
create mode 100644 components/camel-spring/src/test/java/a/b/c/Test.java
delete mode 100644
components/camel-spring/src/test/resources/package+scan+test.jar
delete mode 100644
components/camel-spring/src/test/resources/package_scan_test.jar
delete mode 100644
tests/camel-itest/lib/org/apache/camel/camel-validator-test-resources/1.0.0/camel-validator-test-resources-1.0.0.jar
delete mode 100644
tests/camel-itest/lib/org/apache/camel/camel-validator-test-resources/1.0.0/camel-validator-test-resources-1.0.0.pom
create mode 100644 tests/test-bundles/camel-validator-test-resources/pom.xml
create mode 100644
tests/test-bundles/camel-validator-test-resources/src/main/resources/org/apache/camel/component/validator/dotslash/child.xsd
create mode 100644
tests/test-bundles/camel-validator-test-resources/src/main/resources/org/apache/camel/component/validator/dotslash/parent.xsd
create mode 100644
tests/test-bundles/camel-validator-test-resources/src/main/resources/org/apache/camel/component/validator/doubleslash/child.xsd
create mode 100644
tests/test-bundles/camel-validator-test-resources/src/main/resources/org/apache/camel/component/validator/doubleslash/parent.xsd
create mode 100644
tests/test-bundles/camel-validator-test-resources/src/main/resources/org/apache/camel/component/validator/relativeparent/child/child.xsd
create mode 100644
tests/test-bundles/camel-validator-test-resources/src/main/resources/org/apache/camel/component/validator/relativeparent/parent.xsd
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 8b16b96 CAMEL-13249 Fixed the build of camel-http4
8b16b96 is described below
commit 8b16b960670d9abc2a1b755f502db6afcf03ac52
Author: Willem Jiang
AuthorDate: Tue Feb 26 12:13:43 2019 +0800
CAMEL-13249 Fixed the build of camel-http4
---
.../java/org/apache/camel/component/http4/HeaderFilteringTest.java| 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HeaderFilteringTest.java
b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HeaderFilteringTest.java
index 3815a25..8772952 100644
---
a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HeaderFilteringTest.java
+++
b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HeaderFilteringTest.java
@@ -32,8 +32,8 @@ import com.sun.net.httpserver.HttpServer;
import org.apache.camel.Producer;
import org.apache.camel.http.common.HttpOperationFailedException;
import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.impl.DefaultExchange;
-import org.apache.camel.impl.DefaultMessage;
+import org.apache.camel.support.DefaultExchange;
+import org.apache.camel.support.DefaultMessage;
import org.apache.camel.spi.RestConfiguration;
import org.junit.After;
import org.junit.Before;
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 5ba5e94 Fix the example document error
5ba5e94 is described below
commit 5ba5e9426c278aba34de90e183f8e7e8a74556e5
Author: Willem Jiang
AuthorDate: Wed Jan 30 14:41:46 2019 +0800
Fix the example document error
Fixed the document error of
camel-example-spring-boot-supervising-route-controller
---
.../readme.adoc | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
a/examples/camel-example-spring-boot-supervising-route-controller/readme.adoc
b/examples/camel-example-spring-boot-supervising-route-controller/readme.adoc
index 2c5aa35..7aa325c 100644
---
a/examples/camel-example-spring-boot-supervising-route-controller/readme.adoc
+++
b/examples/camel-example-spring-boot-supervising-route-controller/readme.adoc
@@ -16,13 +16,13 @@ Beside JMX you can use Spring Boot Endpoints to interact
with the routes:
curl -XGET -s http://localhost:8080/actuator/camelroutes
+
+* To get details about a route
+
-+* To get details about a route
-++
-+[source]
-+
-+curl -XGET -s http://localhost:8080/actuator/camelroutes/{id}/detail
-+
+[source]
+
+curl -XGET -s http://localhost:8080/actuator/camelroutes/{id}/detail
+
* To get info about a route
+
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 39b1708 Updated the cxf-component document links
39b1708 is described below
commit 39b17083f56bc2e3bb74c62af6fe383fa4879fb7
Author: Willem Jiang
AuthorDate: Tue Jan 22 18:16:20 2019 +0800
Updated the cxf-component document links
---
.../camel-cxf/src/main/docs/cxf-component.adoc | 97 +++---
1 file changed, 48 insertions(+), 49 deletions(-)
diff --git a/components/camel-cxf/src/main/docs/cxf-component.adoc
b/components/camel-cxf/src/main/docs/cxf-component.adoc
index 0410e6b..f9f1c34 100644
--- a/components/camel-cxf/src/main/docs/cxf-component.adoc
+++ b/components/camel-cxf/src/main/docs/cxf-component.adoc
@@ -17,50 +17,50 @@ The *cxf:* component provides integration with
http://cxf.apache.org[Apache CXF] for connecting to
http://cxf.apache.org/docs/jax-ws.html[JAX-WS] services
hosted in CXF.
-* link:#CXF-CXFComponent[CXF Component]
-** link:#CXF-URIformat[URI format]
-** link:#CXF-Options[Options]
-*** link:#CXF-Descriptionsofthedataformats[Descriptions of the
+* link:#cxf-component[CXF Component]
+** link:#uri-format[URI format]
+** link:#options[Options]
+*** link:#descriptions-of-the-dataformats[Descriptions of the
dataformats]
- link:#CXF-HowtoenableCXFLoggingOutInterceptorinMESSAGEmode[How to
+ link:#how-to-enable-cxfs-loggingoutinterceptor-in-message-mode[How to
enable CXF's LoggingOutInterceptor in MESSAGE mode]
-*** link:#CXF-DescriptionofrelayHeadersoption[Description of
+*** link:#description-of-relayheaders-option[Description of
relayHeaders option]
- link:#CXF-AvailableonlyinPOJOmode[Available only in POJO mode]
- link:#CXF-ChangessinceRelease2.0[Changes since Release 2.0]
-** link:#CXF-ConfiguretheCXFendpointswithSpring[Configure the CXF
+ link:#available-only-in-pojo-mode[Available only in POJO mode]
+ link:#changes-since-release20[Changes since Release 2.0]
+** link:#configure-the-cxf-endpoints-with-spring[Configure the CXF
endpoints with Spring]
-** link:#CXF-ConfiguringtheCXFEndpointswithApacheAriesBlueprint.[Configuring
+** link:#configuring-the-cxf-endpoints-with-apache-aries-blueprint[Configuring
the CXF Endpoints with Apache Aries Blueprint.]
-**
link:#CXF-Howtomakethecamel-cxfcomponentuselog4jinsteadofjava.util.logging[How
+**
link:#how-to-make-the-camel-cxf-component-use-log4j-instead-of-javautillogging[How
to make the camel-cxf component use log4j instead of java.util.logging]
-** link:#CXF-Howtoletcamel-cxfresponsemessagewithxmlstartdocument[How to
+** link:#how-to-let-camel-cxf-response-message-with-xml-start-document[How to
let camel-cxf response message with xml start document]
-** link:#CXF-HowtooverridetheCXFproduceraddressfrommessageheader[How to
+** link:#how-to-override-the-cxf-producer-address-from-message-header[How to
override the CXF producer address from message header]
-** link:#CXF-Howtoconsumeamessagefromacamel-cxfendpointinPOJOdataformat[How
+**
link:#how-to-consume-a-message-from-a-camel-cxf-endpoint-in-pojo-data-format[How
to consume a message from a camel-cxf endpoint in POJO data format]
-** link:#CXF-Howtopreparethemessageforthecamel-cxfendpointinPOJOdataformat[How
+**
link:#how-to-prepare-the-message-for-the-camel-cxf-endpoint-in-pojo-data-format[How
to prepare the message for the camel-cxf endpoint in POJO data format]
-**
link:#CXF-Howtodealwiththemessageforacamel-cxfendpointinPAYLOADdataformat[How
+**
link:#how-to-deal-with-the-message-for-a-camel-cxf-endpoint-in-payload-dataformat[How
to deal with the message for a camel-cxf endpoint in PAYLOAD data
format]
-** link:#CXF-HowtogetandsetSOAPheadersinPOJOmode[How to get and set SOAP
+** link:#how-to-get-and-set-soap-headers-in-pojo-mode[How to get and set SOAP
headers in POJO mode]
-** link:#CXF-HowtogetandsetSOAPheadersinPAYLOADmode[How to get and set
+** link:#how-to-get-and-set-soap-headers-in-payload-mode[How to get and set
SOAP headers in PAYLOAD mode]
-** link:#CXF-SOAPheadersarenotavailableinMESSAGEmode[SOAP headers are
+** link:#soap-headers-are-not-available-in-message-mode[SOAP headers are
not available in MESSAGE mode]
-** link:#CXF-HowtothrowaSOAPFaultfromCamel[How to throw a SOAP Fault
+** link:#how-to-throw-a-soap-fault-from-camel[How to throw a SOAP Fault
from Camel]
-** link:#CXF-Howtopropagateacamel-cxfendpointrequestandresponsecontext[How
+**
link:#how-to-propagate-a-camel-cxf-endpoints-request-and-response-context[How
to propagate a camel-cxf endpoint's request and response context]
-** link:#CXF-AttachmentSupport[Attachment Support]
-** link:#CXF-StreamingSupportinPAYLOADmode[Streaming Support in PAYLOAD
+** link:#attachment-support[Attachment Support]
+** link:#streaming-support-in-payload-mode[Streaming Support in PAYLOAD
mode]
-** link:#CXF
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 0786c68 Added the code snippet back to the transactional-client.adoc
0786c68 is described below
commit 0786c6859016e400d2f5e908cad4b349ec7e4fcf
Author: Willem Jiang
AuthorDate: Fri Nov 2 10:28:41 2018 +0800
Added the code snippet back to the transactional-client.adoc
---
.../src/main/docs/eips/transactional-client.adoc | 152 +++--
1 file changed, 140 insertions(+), 12 deletions(-)
diff --git a/camel-core/src/main/docs/eips/transactional-client.adoc
b/camel-core/src/main/docs/eips/transactional-client.adoc
index aad20c7..31bb8c1 100644
--- a/camel-core/src/main/docs/eips/transactional-client.adoc
+++ b/camel-core/src/main/docs/eips/transactional-client.adoc
@@ -47,11 +47,11 @@ Then you look them up and use them to create the
JmsComponent.
[source,java]
-PlatformTransactionManager transactionManager = (PlatformTransactionManager)
spring.getBean("jmsTransactionManager");
-ConnectionFactory connectionFactory = (ConnectionFactory)
spring.getBean("jmsConnectionFactory");
-JmsComponent component =
JmsComponent.jmsComponentTransacted(connectionFactory, transactionManager);
-component.getConfiguration().setConcurrentConsumers(1);
-ctx.addComponent("activemq", component);
+ PlatformTransactionManager transactionManager = (PlatformTransactionManager)
spring.getBean("jmsTransactionManager");
+ ConnectionFactory connectionFactory = (ConnectionFactory)
spring.getBean("jmsConnectionFactory");
+ JmsComponent component =
JmsComponent.jmsComponentTransacted(connectionFactory, transactionManager);
+ component.getConfiguration().setConcurrentConsumers(1);
+ ctx.addComponent("activemq", component);
[[TransactionalClient-TransactionPolicies]]
@@ -154,8 +154,24 @@ 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.
-
-/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/springTransactionalClientDataSourceMinimalConfiguration.xml
+[source,xml]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Then we are ready to define our Camel routes. We have two routes: 1 for
success conditions, and 1 for a forced rollback condition.
@@ -163,7 +179,42 @@ 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.
-/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/springTransactionalClientDataSourceMinimalConfiguration.xml
+[source,xml]
+
+http://camel.apache.org/schema/spring;>
+
+
+
+
+
+Tiger in Action
+
+
+
+Elephant in Action
+
+
+
+
+
+
+
+
+
+Tiger in Action
+
+
+
+Donkey in Action
+
+
+
+
+
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
@@ -182,12 +233,57 @@ 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.
-/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.xml
+[source,xml]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
And then we configure our routes. Notice that all we have to do is mark the
route as transacted using the *transacted* tag.
-/components/camel-jms/src/test/resources/org/apache/camel/component/jms/tx/TransactionMinimalConfigurationTest.xml
+[source,xml]
+
+http://camel.apache.org/schema/spring;>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
= Transaction error handler
@@ -243,12 +339,44 @@ propagation behaviors for that where you configure it as
follows:
This is configured in the Spring XML file:
-/components/camel-spring/src/test/resources/org/apache/camel/spring/interceptor/MixedTransactionPropagationTest.xml
+[source,xml]
+
+
+
+
+
+
+
+
+
+
+
Then in the routes you use transacted DSL to indicate which of these tw
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new c8f8212 CAMEL-12625 Add ASF header to the component file fhir
c8f8212 is described below
commit c8f821297beb0a8e8d876c20b681acb74fdfa950
Author: Willem Jiang
AuthorDate: Sun Jul 15 15:16:12 2018 +0800
CAMEL-12625 Add ASF header to the component file fhir
---
.../META-INF/services/org/apache/camel/component/fhir | 17 +
1 file changed, 17 insertions(+)
diff --git
a/components/camel-fhir/camel-fhir-component/src/main/resources/META-INF/services/org/apache/camel/component/fhir
b/components/camel-fhir/camel-fhir-component/src/main/resources/META-INF/services/org/apache/camel/component/fhir
index ae8e6e0..da70c09 100644
---
a/components/camel-fhir/camel-fhir-component/src/main/resources/META-INF/services/org/apache/camel/component/fhir
+++
b/components/camel-fhir/camel-fhir-component/src/main/resources/META-INF/services/org/apache/camel/component/fhir
@@ -1 +1,18 @@
+#
+# 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.
+#
+
class=org.apache.camel.component.fhir.FhirComponent
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.22.x by this push:
new 63cf5f9 CAMEL-12610 Fixed the issue of camel bean always invokes
cached instance
63cf5f9 is described below
commit 63cf5f9555cf852884d53607519dcd7ac6cea29f
Author: Willem Jiang
AuthorDate: Sun Jul 8 10:48:22 2018 +0800
CAMEL-12610 Fixed the issue of camel bean always invokes cached instance
---
.../component/bean/AbstractBeanProcessor.java | 3 +-
.../org/apache/camel/processor/BeanCachedTest.java | 104 +
2 files changed, 106 insertions(+), 1 deletion(-)
diff --git
a/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
b/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
index 063ccf9..173f89d 100644
---
a/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
+++
b/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
@@ -92,7 +92,8 @@ public abstract class AbstractBeanProcessor implements
AsyncProcessor {
// do we have a custom adapter for this POJO to a Processor
// but only do this if allowed
-if (allowProcessor(explicitMethodName, beanInfo)) {
+// we need to check beanHolder is Processor is support, to avoid the
bean cached issue
+if (allowProcessor(explicitMethodName, beanInfo) &&
beanHolder.supportProcessor()) {
processor = getProcessor();
if (processor == null && !lookupProcessorDone) {
// only attempt to lookup the processor once or nearly once
diff --git
a/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
b/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
new file mode 100644
index 000..f9cfcb4
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.naming.Context;
+
+import org.apache.camel.CamelExecutionException;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.impl.JndiRegistry;
+import org.junit.Test;
+
+public class BeanCachedTest extends ContextTestSupport {
+
+private Context context;
+
+private JndiRegistry registry;
+
+@Override
+protected RouteBuilder createRouteBuilder() {
+return new RouteBuilder() {
+@Override
+public void configure() {
+from("direct:noCache")
+.to("bean:something?cache=false");
+from("direct:cached")
+.to("bean:something?cache=true");
+
+}
+};
+}
+
+@Override
+protected JndiRegistry createRegistry() throws Exception {
+JndiRegistry registry = super.createRegistry();
+registry.bind("something", new MyBean());
+this.context = registry.getContext();
+this.registry = registry;
+return registry;
+}
+
+@Test
+public void testFreshBeanInContext() throws Exception {
+// Just make sure the bean processor doesn't work if the cached is
false
+MyBean originalInstance = registry.lookup("something", MyBean.class);
+template.sendBody("direct:noCache", null);
+context.unbind("something");
+context.bind("something", new MyBean());
+// Make sure we can get the object from the registry
+assertNotSame(registry.lookup("something"), originalInstance);
+template.sendBody("direct:noCache", null);
+}
+
+@Test
+public void testBeanWithCached() throws Exception {
+// Just make sure the bean proces
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 3a7f436 CAMEL-12610 Fixed the issue of camel bean always invokes
cached instance
3a7f436 is described below
commit 3a7f436de13e07b0c964e3677974150b5c84ec04
Author: Willem Jiang
AuthorDate: Sun Jul 8 10:48:22 2018 +0800
CAMEL-12610 Fixed the issue of camel bean always invokes cached instance
---
.../component/bean/AbstractBeanProcessor.java | 3 +-
.../org/apache/camel/processor/BeanCachedTest.java | 104 +
2 files changed, 106 insertions(+), 1 deletion(-)
diff --git
a/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
b/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
index 063ccf9..173f89d 100644
---
a/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
+++
b/camel-core/src/main/java/org/apache/camel/component/bean/AbstractBeanProcessor.java
@@ -92,7 +92,8 @@ public abstract class AbstractBeanProcessor implements
AsyncProcessor {
// do we have a custom adapter for this POJO to a Processor
// but only do this if allowed
-if (allowProcessor(explicitMethodName, beanInfo)) {
+// we need to check beanHolder is Processor is support, to avoid the
bean cached issue
+if (allowProcessor(explicitMethodName, beanInfo) &&
beanHolder.supportProcessor()) {
processor = getProcessor();
if (processor == null && !lookupProcessorDone) {
// only attempt to lookup the processor once or nearly once
diff --git
a/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
b/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
new file mode 100644
index 000..f9cfcb4
--- /dev/null
+++ b/camel-core/src/test/java/org/apache/camel/processor/BeanCachedTest.java
@@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.processor;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import javax.naming.Context;
+
+import org.apache.camel.CamelExecutionException;
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.impl.JndiRegistry;
+import org.junit.Test;
+
+public class BeanCachedTest extends ContextTestSupport {
+
+private Context context;
+
+private JndiRegistry registry;
+
+@Override
+protected RouteBuilder createRouteBuilder() {
+return new RouteBuilder() {
+@Override
+public void configure() {
+from("direct:noCache")
+.to("bean:something?cache=false");
+from("direct:cached")
+.to("bean:something?cache=true");
+
+}
+};
+}
+
+@Override
+protected JndiRegistry createRegistry() throws Exception {
+JndiRegistry registry = super.createRegistry();
+registry.bind("something", new MyBean());
+this.context = registry.getContext();
+this.registry = registry;
+return registry;
+}
+
+@Test
+public void testFreshBeanInContext() throws Exception {
+// Just make sure the bean processor doesn't work if the cached is
false
+MyBean originalInstance = registry.lookup("something", MyBean.class);
+template.sendBody("direct:noCache", null);
+context.unbind("something");
+context.bind("something", new MyBean());
+// Make sure we can get the object from the registry
+assertNotSame(registry.lookup("something"), originalInstance);
+template.sendBody("direct:noCache", null);
+}
+
+@Test
+public void testBeanWithCached() throws Exception {
+// Just make sure the bean proces
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new a9342af Updated the first version of camel-as2
a9342af is described below
commit a9342af301c00b81ff99211c8cc6dffd254390c0
Author: Willem Jiang
AuthorDate: Tue Jun 12 12:35:19 2018 +0800
Updated the first version of camel-as2
---
.../src/main/java/org/apache/camel/component/as2/AS2Endpoint.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
index 5fbed2c..b03d0a5 100644
---
a/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
+++
b/components/camel-as2/camel-as2-component/src/main/java/org/apache/camel/component/as2/AS2Endpoint.java
@@ -43,7 +43,7 @@ import
org.apache.camel.util.component.ApiMethodPropertiesHelper;
/**
* Component used for transferring data secure and reliable over the internet
using the AS2 protocol.
*/
-@UriEndpoint(scheme = "as2", firstVersion = "2.20.0", title = "AS2", syntax =
"as2:name", consumerClass = AS2Consumer.class, label = "AS2")
+@UriEndpoint(scheme = "as2", firstVersion = "2.22.0", title = "AS2", syntax =
"as2:name", consumerClass = AS2Consumer.class, label = "AS2")
public class AS2Endpoint extends AbstractApiEndpoint {
@UriPath @Metadata(required = "true")
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 510700b Remove multiple duplicated lines from web3j-component
510700b is described below
commit 510700bf3c07647d1ba9339fa64648dd96083b36
Author: Willem Jiang
AuthorDate: Mon Jun 11 17:27:41 2018 +0800
Remove multiple duplicated lines from web3j-component
---
components/camel-web3j/src/main/docs/web3j-component.adoc | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/components/camel-web3j/src/main/docs/web3j-component.adoc
b/components/camel-web3j/src/main/docs/web3j-component.adoc
index a259d18..d63c0a3 100644
--- a/components/camel-web3j/src/main/docs/web3j-component.adoc
+++ b/components/camel-web3j/src/main/docs/web3j-component.adoc
@@ -3,12 +3,6 @@
*Available as of Camel version 2.22*
-*Available as of Camel version 2.22*
-
-
-*Available as of Camel version 2.22*
-
-
The *Ethereum* blockchain component uses the
https://github.com/web3j/web3j[web3j] client
API and allows you to interact with Ethereum compatible nodes such as
https://github.com/ethereum/go-ethereum/wiki/geth[Geth],
https://github.com/paritytech/parity[Parity],
https://github.com/jpmorganchase/quorum/wiki[Quorum],
https://infura.io[Infura], etc.
@@ -156,4 +150,4 @@ Read the balance of an address at a specific block number:
from("direct:start")
.to("web3j://http://127.0.0.1:7545?operation=ETH_GET_BALANCE=0xc8CDceCE5d006dAB638029EBCf6Dd666efF5A952=10;);
-
\ No newline at end of file
+
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new e17c3bf Update the camel version of camel-as2 to 2.22.
e17c3bf is described below
commit e17c3bf6f0c92e6fc7ec5405ba4362d66dceed45
Author: Willem Jiang
AuthorDate: Mon Jun 11 17:19:22 2018 +0800
Update the camel version of camel-as2 to 2.22.
---
.../camel-as2/camel-as2-component/src/main/docs/as2-component.adoc| 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
b/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
index 6869634..fed637e 100644
--- a/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
+++ b/components/camel-as2/camel-as2-component/src/main/docs/as2-component.adoc
@@ -1,7 +1,7 @@
[[as2-component]]
== AS2 Component
-*Available as of Camel version 2.20*
+*Available as of Camel version 2.22*
[source,xml]
@@ -61,4 +61,4 @@ with the following path and query parameters:
| *exchangePattern* (consumer) | Sets the exchange pattern when the consumer
creates an exchange. | | ExchangePattern
| *synchronous* (advanced) | Sets whether synchronous processing should be
strictly used, or Camel is allowed to use asynchronous processing (if
supported). | false | boolean
|===
-// endpoint options: END
\ No newline at end of file
+// endpoint options: END
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch camel-2.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.20.x by this push:
new cc38f2a CAMEL-12541: Use configured bean instead of creating a new
bean
cc38f2a is described below
commit cc38f2a6b5358a399906296a40870e1619ea4637
Author: Willian Antunes
AuthorDate: Sun May 27 13:20:53 2018 -0300
CAMEL-12541: Use configured bean instead of creating a new bean
When the endpoint is created the bean is always available and is used
for the consumer approach (newJAXRSServerFactoryBean). Now the same
behavior is used for producer approach (newJAXRSClientFactoryBean).
CAMEL-12541: In order to make CxfRsProducer cache works properly
CAMEL-12541: Test object reference and no need for version check anymore
Version check was removed as we already move to 2.6.x
CAMEL-12541 Fixed the build error
---
.../component/cxf/jaxrs/CxfRsSpringEndpoint.java | 16 +-
.../cxf/jaxrs/CxfRsSpringEndpointTest.java | 61 +-
.../cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml | 57
.../cxf/jaxrs/CxfRsSpringEndpointBeans.xml | 17 --
4 files changed, 76 insertions(+), 75 deletions(-)
diff --git
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
index d10d6c5..94ebae2 100644
---
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
+++
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
@@ -25,6 +25,7 @@ import org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
import org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean;
import org.springframework.context.ApplicationContext;
+import org.springframework.util.ReflectionUtils;
public class CxfRsSpringEndpoint extends CxfRsEndpoint implements BeanIdAware {
private AbstractJAXRSFactoryBean bean;
@@ -69,7 +70,8 @@ public class CxfRsSpringEndpoint extends CxfRsEndpoint
implements BeanIdAware {
@Override
protected JAXRSClientFactoryBean newJAXRSClientFactoryBean() {
-return new SpringJAXRSClientFactoryBean();
+checkBeanType(bean, JAXRSClientFactoryBean.class);
+return newInstanceWithCommonProperties();
}
@Override
@@ -86,4 +88,14 @@ public class CxfRsSpringEndpoint extends CxfRsEndpoint
implements BeanIdAware {
public void setBeanId(String id) {
this.beanId = id;
}
-}
+
+private JAXRSClientFactoryBean newInstanceWithCommonProperties() {
+SpringJAXRSClientFactoryBean cfb = new SpringJAXRSClientFactoryBean();
+
+if (bean instanceof SpringJAXRSClientFactoryBean) {
+ReflectionUtils.shallowCopyFieldState(bean, cfb);
+}
+
+return cfb;
+}
+}
\ No newline at end of file
diff --git
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java
index b5a4354..55bbc25 100644
---
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java
+++
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointTest.java
@@ -22,18 +22,24 @@ import
org.apache.camel.component.cxf.jaxrs.testbean.CustomerService;
import org.apache.camel.component.cxf.spring.SpringJAXRSClientFactoryBean;
import org.apache.camel.component.cxf.spring.SpringJAXRSServerFactoryBean;
import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.apache.cxf.version.Version;
import org.junit.Test;
+import org.springframework.beans.factory.support.BeanDefinitionBuilder;
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.support.AbstractXmlApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class CxfRsSpringEndpointTest extends CamelSpringTestSupport {
-
+
+private static final String BEAN_SERVICE_ENDPOINT_NAME = "serviceEndpoint";
+private static final String BEAN_SERVICE_ADDRESS =
"http://localhost/programmatically;;
+private static final String BEAN_SERVICE_USERNAME =
"BEAN_SERVICE_USERNAME";
+private static final String BEAN_SERVICE_PASSWORD =
"BEAN_SERVICE_PASSWORD";
+
@Test
public void testCreateCxfRsServerFactoryBean() {
CxfRsEndpoint endpoint =
resolveMandatoryEndpoint("cxfrs://bean://rsServer", CxfRsEndpoint.class);
SpringJAXRSServerFac
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from edaa076 Upgrade Batik to version 1.10
new c798d64 CAMEL-12541: Use configured bean instead of creating a new
new c12137f CAMEL-12541: In order to make CxfRsProducer cache works
properly
new 574f39c CAMEL-12541: Test object reference and no need for version
check anymore
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../component/cxf/jaxrs/CxfRsSpringEndpoint.java | 16 +-
.../cxf/jaxrs/CxfRsSpringEndpointTest.java | 53 +---
.../cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml | 57 --
.../cxf/jaxrs/CxfRsSpringEndpointBeans.xml | 17 +--
4 files changed, 72 insertions(+), 71 deletions(-)
delete mode 100644
components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpointBeans-2.6.xml
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 39c0d63 Updated the code snipet for camel-cxfrs component
39c0d63 is described below
commit 39c0d63d923bfe9236834ecb1c4470bb7e9e7eaa
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Sun May 27 15:23:11 2018 +0800
Updated the code snipet for camel-cxfrs component
---
.../camel-cxf/src/main/docs/cxfrs-component.adoc | 143 ++---
1 file changed, 128 insertions(+), 15 deletions(-)
diff --git a/components/camel-cxf/src/main/docs/cxfrs-component.adoc
b/components/camel-cxf/src/main/docs/cxfrs-component.adoc
index 31af57c..1307bde 100644
--- a/components/camel-cxf/src/main/docs/cxfrs-component.adoc
+++ b/components/camel-cxf/src/main/docs/cxfrs-component.adoc
@@ -244,21 +244,21 @@ Given a JAX-RS resource class with this method:
[source,java]
-@POST @Path("/customers/{type}")
-public Response newCustomer(Customer customer, @PathParam("type") String
type, @QueryParam("active") @DefaultValue("true") boolean active) {
-return null;
-}
+@POST @Path("/customers/{type}")
+public Response newCustomer(Customer customer, @PathParam("type") String type,
@QueryParam("active") @DefaultValue("true") boolean active) {
+return null;
+}
Serviced by the following route:
[source,java]
-from("cxfrs:bean:rsServer?bindingStyle=SimpleConsumer")
-.recipientList(simple("direct:${header.operationName}"));
+from("cxfrs:bean:rsServer?bindingStyle=SimpleConsumer")
+.recipientList(simple("direct:${header.operationName}"));
-from("direct:newCustomer")
-.log("Request: type=${header.type}, active=${header.active},
customerData=${body}");
+from("direct:newCustomer")
+.log("Request: type=${header.type}, active=${header.active},
customerData=${body}");
The following HTTP request with XML payload (given that the Customer DTO
@@ -294,7 +294,7 @@ implements the https://javaee.github.io/jsr311/[JAX-RS
(JSR-311) API], so we can
export the resources classes as a REST service. And we leverage the
http://cxf.apache.org/docs/invokers.html[CXF Invoker
API] to turn a REST request into a normal Java object method
-invocation. +
+invocation.
Unlike the <<restlet-component,Camel Restlet>> component, you don't need
to specify the URI template within your endpoint, CXF takes care of the
REST request URI to resource class method mapping according to the
@@ -302,6 +302,39 @@ JSR-311 specification. All you need to do in Camel is
delegate this
method request to a right processor or endpoint.
Here is an example of a CXFRS route...
+[source,java]
+
+private static final String CXF_RS_ENDPOINT_URI =
+"cxfrs://http://localhost:; + CXT +
"/rest?resourceClasses=org.apache.camel.component.cxf.jaxrs.testbean.CustomerServiceResource";
+private static final String CXF_RS_ENDPOINT_URI2 =
+"cxfrs://http://localhost:; + CXT +
"/rest2?resourceClasses=org.apache.camel.component.cxf.jaxrs.testbean.CustomerService";
+private static final String CXF_RS_ENDPOINT_URI3 =
+"cxfrs://http://localhost:; + CXT + "/rest3?"
++
"resourceClasses=org.apache.camel.component.cxf.jaxrs.testbean.CustomerServiceNoAnnotations&"
++
"modelRef=classpath:/org/apache/camel/component/cxf/jaxrs/CustomerServiceModel.xml";
+private static final String CXF_RS_ENDPOINT_URI4 =
+"cxfrs://http://localhost:; + CXT + "/rest4?"
++
"modelRef=classpath:/org/apache/camel/component/cxf/jaxrs/CustomerServiceDefaultHandlerModel.xml";
+private static final String CXF_RS_ENDPOINT_URI5 =
+"cxfrs://http://localhost:; + CXT + "/rest5?"
++ "propagateContexts=true&"
++
"modelRef=classpath:/org/apache/camel/component/cxf/jaxrs/CustomerServiceDefaultHandlerModel.xml";
+protected RouteBuilder createRouteBuilder() throws Exception {
+final Processor testProcessor = new TestProcessor();
+final Processor testProcessor2 = new TestProcessor2();
+final Processor testProcessor3 = new TestP
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch camel-2.21.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.21.x by this push:
new 2efdb01 CAMEL-12540 Avoid the address setting of
CxfRsEndpointConfigurer
2efdb01 is described below
commit 2efdb0149f0e9eb39ac605f57dbae06650c3cd36
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Sun May 27 13:58:47 2018 +0800
CAMEL-12540 Avoid the address setting of CxfRsEndpointConfigurer
---
.../camel/component/cxf/jaxrs/CxfRsBlueprintEndpoint.java | 1 +
.../org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java| 10 +-
.../apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java | 2 ++
.../cxf/jaxrs/CxfRsProducerEndpointConfigurerTest.java | 4
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsBlueprintEndpoint.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsBlueprintEndpoint.java
index e9cd9b9..d6a3d50 100644
---
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsBlueprintEndpoint.java
+++
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsBlueprintEndpoint.java
@@ -91,6 +91,7 @@ public class CxfRsBlueprintEndpoint extends CxfRsEndpoint {
@Override
protected JAXRSClientFactoryBean newJAXRSClientFactoryBean() {
checkBeanType(bean, JAXRSClientFactoryBean.class);
+// TODO Need to find a way to setup the JAXRSClientFactory Bean, as
the JAXRSClientFactoryBean properties could be changed by the configurer
return (RsClientBlueprintBean)bean;
}
diff --git
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
index 015918a..69e2471 100644
---
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
+++
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
@@ -266,7 +266,7 @@ public class CxfRsEndpoint extends DefaultEndpoint
implements HeaderFilterStrate
getNullSafeCxfRsEndpointConfigurer().configure(sfb);
}
-private CxfRsEndpointConfigurer getNullSafeCxfRsEndpointConfigurer() {
+protected CxfRsEndpointConfigurer getNullSafeCxfRsEndpointConfigurer() {
if (cxfRsEndpointConfigurer == null) {
return new
ChainedCxfRsEndpointConfigurer.NullCxfRsEndpointConfigurer();
}
@@ -304,10 +304,6 @@ public class CxfRsEndpoint extends DefaultEndpoint
implements HeaderFilterStrate
}
protected void setupJAXRSClientFactoryBean(JAXRSClientFactoryBean cfb,
String address) {
-// address
-if (address != null) {
-cfb.setAddress(address);
-}
if (modelRef != null) {
cfb.setModelRef(modelRef);
}
@@ -318,6 +314,10 @@ public class CxfRsEndpoint extends DefaultEndpoint
implements HeaderFilterStrate
setupCommonFactoryProperties(cfb);
cfb.setThreadSafe(true);
getNullSafeCxfRsEndpointConfigurer().configure(cfb);
+// Add the address could be override by message header
+if (address != null) {
+cfb.setAddress(address);
+}
}
protected void setupCommonFactoryProperties(AbstractJAXRSFactoryBean
factory) {
diff --git
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
index d10d6c5..954d984 100644
---
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
+++
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
@@ -75,6 +75,8 @@ public class CxfRsSpringEndpoint extends CxfRsEndpoint
implements BeanIdAware {
@Override
protected void setupJAXRSClientFactoryBean(JAXRSClientFactoryBean cfb,
String address) {
configurer.configureBean(beanId, cfb);
+// support to call the configurer here
+getNullSafeCxfRsEndpointConfigurer().configure(cfb);
cfb.setAddress(address);
cfb.setThreadSafe(true);
}
diff --git
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerEndpointConfigurerTest.java
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerEndpointConfigurerTest.java
index dbca65a..46dbc2f 100644
---
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerEndpointConfigurerTest.java
+++
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerEndpointConfigurerTes
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new fad1385 CAMEL-12540 Avoid the address setting of
CxfRsEndpointConfigurer
fad1385 is described below
commit fad138527a0e4dd7947c7cc7ee1ae1861cd4bc59
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Sun May 27 13:58:47 2018 +0800
CAMEL-12540 Avoid the address setting of CxfRsEndpointConfigurer
---
.../camel/component/cxf/jaxrs/CxfRsBlueprintEndpoint.java | 1 +
.../org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java| 10 +-
.../apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java | 2 ++
.../cxf/jaxrs/CxfRsProducerEndpointConfigurerTest.java | 4
4 files changed, 12 insertions(+), 5 deletions(-)
diff --git
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsBlueprintEndpoint.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsBlueprintEndpoint.java
index e9cd9b9..d6a3d50 100644
---
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsBlueprintEndpoint.java
+++
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsBlueprintEndpoint.java
@@ -91,6 +91,7 @@ public class CxfRsBlueprintEndpoint extends CxfRsEndpoint {
@Override
protected JAXRSClientFactoryBean newJAXRSClientFactoryBean() {
checkBeanType(bean, JAXRSClientFactoryBean.class);
+// TODO Need to find a way to setup the JAXRSClientFactory Bean, as
the JAXRSClientFactoryBean properties could be changed by the configurer
return (RsClientBlueprintBean)bean;
}
diff --git
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
index 1daa8d1..803b8f3 100644
---
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
+++
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpoint.java
@@ -266,7 +266,7 @@ public class CxfRsEndpoint extends DefaultEndpoint
implements HeaderFilterStrate
getNullSafeCxfRsEndpointConfigurer().configure(sfb);
}
-private CxfRsEndpointConfigurer getNullSafeCxfRsEndpointConfigurer() {
+protected CxfRsEndpointConfigurer getNullSafeCxfRsEndpointConfigurer() {
if (cxfRsEndpointConfigurer == null) {
return new
ChainedCxfRsEndpointConfigurer.NullCxfRsEndpointConfigurer();
}
@@ -304,10 +304,6 @@ public class CxfRsEndpoint extends DefaultEndpoint
implements HeaderFilterStrate
}
protected void setupJAXRSClientFactoryBean(JAXRSClientFactoryBean cfb,
String address) {
-// address
-if (address != null) {
-cfb.setAddress(address);
-}
if (modelRef != null) {
cfb.setModelRef(modelRef);
}
@@ -318,6 +314,10 @@ public class CxfRsEndpoint extends DefaultEndpoint
implements HeaderFilterStrate
setupCommonFactoryProperties(cfb);
cfb.setThreadSafe(true);
getNullSafeCxfRsEndpointConfigurer().configure(cfb);
+// Add the address could be override by message header
+if (address != null) {
+cfb.setAddress(address);
+}
}
protected void setupCommonFactoryProperties(AbstractJAXRSFactoryBean
factory) {
diff --git
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
index d10d6c5..954d984 100644
---
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
+++
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
@@ -75,6 +75,8 @@ public class CxfRsSpringEndpoint extends CxfRsEndpoint
implements BeanIdAware {
@Override
protected void setupJAXRSClientFactoryBean(JAXRSClientFactoryBean cfb,
String address) {
configurer.configureBean(beanId, cfb);
+// support to call the configurer here
+getNullSafeCxfRsEndpointConfigurer().configure(cfb);
cfb.setAddress(address);
cfb.setThreadSafe(true);
}
diff --git
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerEndpointConfigurerTest.java
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerEndpointConfigurerTest.java
index 7f821f5..94c26d4 100644
---
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerEndpointConfigurerTest.java
+++
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerEndpointConfigurerTest.java
@@
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 5c804dd Polish the docuement of karfak
5c804dd is described below
commit 5c804dde83fc8986f79119e8951d1afc97083826
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Mon May 14 09:20:42 2018 +0800
Polish the docuement of karfak
---
.../camel-kafka/src/main/docs/kafka-component.adoc | 26 +++---
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc
b/components/camel-kafka/src/main/docs/kafka-component.adoc
index ac32dca..7d89604 100644
--- a/components/camel-kafka/src/main/docs/kafka-component.adoc
+++ b/components/camel-kafka/src/main/docs/kafka-component.adoc
@@ -247,9 +247,13 @@ camelContext.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("kafka:" + TOPIC + "?brokers=localhost:{{kafkaPort}}" +
- "=A" +//
- "=earliest" + // Ask to start
from the beginning if we have unknown offset
- "=#offsetRepo") // Keep the
offsets in the previously configured repository
+ // Setup the topic and broker address
+ "=A" +
+ // The consumer processor group ID
+ "=earliest" +
+ // Ask to start from the beginning if we have unknown
offset
+ "=#offsetRepo")
+ // Keep the offsets in the previously configured
repository
.to("mock:result");
}
});
@@ -308,8 +312,11 @@ camelContext.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("kafka:" + TOPIC + "?brokers=localhost:{{kafkaPort}}" +
- "=A" +//
- "=#ssl") // Reference
the SSL configuration
+ // Setup the topic and broker address
+ "=A" +
+ // The consumer processor group ID
+ "=#ssl")
+ // Reference the SSL configuration
.to("mock:result");
}
});
@@ -365,13 +372,15 @@ In XML:
[source,xml]
-
+
-
+
@@ -408,7 +417,8 @@ You can then use the `KafkaManualCommit` from Java code
such as a Camel `Process
[source,java]
public void process(Exchange exchange) {
-KafkaManualCommit manual =
exchange.getIn().getHeader(KafkaConstants.MANUAL_COMMIT,
KafkaManualCommit.class);
+KafkaManualCommit manual =
+exchange.getIn().getHeader(KafkaConstants.MANUAL_COMMIT,
KafkaManualCommit.class);
manual.commitSync();
}
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 1bf64ab51306d5d4cf286d6c0582bc2e710f294e
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Sun May 13 19:43:11 2018 +0800
Add spring.adoc into user-manual
---
docs/user-manual/en/dsl.adoc| 2 +-
docs/user-manual/en/spring.adoc | 301
2 files changed, 302 insertions(+), 1 deletion(-)
diff --git a/docs/user-manual/en/dsl.adoc b/docs/user-manual/en/dsl.adoc
index b72742e..91b4b80 100644
--- a/docs/user-manual/en/dsl.adoc
+++ b/docs/user-manual/en/dsl.adoc
@@ -9,7 +9,7 @@ languages (DSL) as listed below.
* link:java-dsl.adoc[Java DSL] - A Java based DSL using the fluent
builder style.
-* Spring XML - A XML based DSL in Spring XML files
+* link:spring.adoc[Spring XML] - A XML based DSL in Spring XML files
* Blueprint XML - A XML based
DSL in OSGi Blueprint XML files
* Rest DSL - A DSL to define REST services using a
diff --git a/docs/user-manual/en/spring.adoc b/docs/user-manual/en/spring.adoc
new file mode 100644
index 000..bb10b6a
--- /dev/null
+++ b/docs/user-manual/en/spring.adoc
@@ -0,0 +1,301 @@
+Spring Support
+~~
+Apache Camel is designed to work nicely with the Spring Framework in a number
of ways.
+
+* Camel uses Spring Transactions as the default transaction handling in
components like JMS and JPA
+* Camel works with Spring 2 XML processing with the Xml Configuration
+* Camel Spring XML Schema's is defined at Xml Reference
+* Camel supports a powerful version of Spring Remoting which can use powerful
routing between the client and server side along with using all of the
available Components for the transport
+* Camel provides powerful Bean Integration with any bean defined in a Spring
ApplicationContext.
+* Camel integrates with various Spring helper classes; such as providing Type
Converter support for Spring Resources etc
+* Allows Spring to dependency inject Component instances or the
link:camelcontext.adoc[CamelContext] instance itself and auto-expose Spring
beans as components and endpoints.
+* Allows you to reuse the Spring Testing framework to simplify your unit and
integration testing using Enterprise Integration Patterns and Camel's powerful
Mock and Test endpoints
+* From Camel 2.15: Camel supports Spring Boot using the camel-spring-boot
component.
+* From Camel 2.17.1: Camel supports Spring Cache based Idempotent repository
+
+
+Using Spring to configure the CamelContext
+~~
+
+You can configure a CamelContext inside any spring.xml using the
CamelContextFactoryBean. This will automatically start the CamelContext along
with any referenced Routes along any referenced Component and Endpoint
instances.
+
+* Adding Camel schema
+* Configure Routes in two ways:
+** Using Java Code
+** Using Spring XML
+
+[[Spring-AddingCamelSchema]]
+Adding Camel Schema
+~~~
+For Camel 1.x you need to use the following namespace:
+
+http://activemq.apache.org/camel/schema/spring
+
+
+with the following schema location:
+
+http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
+
+
+You need to add Camel to the schemaLocation declaration
+
+http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
+
+
+So the XML file looks like this:
+
+[source,xml]
+--
+http://www.springframework.org/schema/beans;
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
+">
+--
+
+Using `camel:` Namespace
+
+Or you can refer to the camel XSD in the XML declaration:
+
+xmlns:camel="http://camel.apache.org/schema/spring;
+
+
+... so the declaration is:
+
+xsi:schemaLocation="
+http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
+
+[source,xml]
+--
+http://www.springframework.org/schema/beans;
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+xmlns:camel="http://camel.apache.org/schema/spring;
+xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://camel.apache.org/schema/spring
http:
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 2c27df3 [CAMEL-11257] Fixed checkstyle warnings
new 6e48953 Added route-builder and routes to the user-manual, and update
the see also links
new 1bf64ab Add spring.adoc into user-manual
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
docs/user-manual/en/camelcontext.adoc | 6 +-
docs/user-manual/en/dsl.adoc | 14 +-
docs/user-manual/en/route-builder.adoc | 9 +
docs/user-manual/en/routes.adoc| 112
docs/user-manual/en/spring.adoc| 301 +
5 files changed, 432 insertions(+), 10 deletions(-)
create mode 100644 docs/user-manual/en/route-builder.adoc
create mode 100644 docs/user-manual/en/routes.adoc
create mode 100644 docs/user-manual/en/spring.adoc
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6e48953d28975aba82b77631bdfdc7fa94b3818e
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Sun May 13 14:25:56 2018 +0800
Added route-builder and routes to the user-manual, and update the see also
links
---
docs/user-manual/en/camelcontext.adoc | 6 +-
docs/user-manual/en/dsl.adoc | 12 ++--
docs/user-manual/en/route-builder.adoc | 9 +++
docs/user-manual/en/routes.adoc| 112 +
4 files changed, 130 insertions(+), 9 deletions(-)
diff --git a/docs/user-manual/en/camelcontext.adoc
b/docs/user-manual/en/camelcontext.adoc
index 10da00b..2eadb51 100644
--- a/docs/user-manual/en/camelcontext.adoc
+++ b/docs/user-manual/en/camelcontext.adoc
@@ -8,15 +8,15 @@ represents a single Camel routing rulebase. You use the
CamelContext in
a similar way to the Spring
http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/context/ApplicationContext.html[ApplicationContext].
-See Lifecycle to understand the overall lifecycle
+See link:lifecycle.adoc[Lifecycle] to understand the overall lifecycle
of the CamelContext.
[[CamelContext-SeeAlso]]
See Also
-* RouteBuilder
-* Routes
+* link:route-builder.adoc[RouteBuilder]
+* link:routes.adoc[Routes]
* link:lifecycle.adoc[Lifecycle]
* link:architecture.adoc[Architecture]
diff --git a/docs/user-manual/en/dsl.adoc b/docs/user-manual/en/dsl.adoc
index 3e1c224..b72742e 100644
--- a/docs/user-manual/en/dsl.adoc
+++ b/docs/user-manual/en/dsl.adoc
@@ -7,18 +7,18 @@ link:enterprise-integration-patterns.html[Enterprise
Integration
Patterns] or Routes in a variety of domain-specific
languages (DSL) as listed below.
-* Java DSL - A Java based DSL using the fluent
+* link:java-dsl.adoc[Java DSL] - A Java based DSL using the fluent
builder style.
* Spring XML - A XML based DSL in Spring XML files
* Blueprint XML - A XML based
DSL in OSGi Blueprint XML files
* Rest DSL - A DSL to define REST services using a
REST style in either Java or XML.
-* Groovy DSL - A Groovy based DSL using Groovy
+* link:groovy-dsl.adoc[Groovy DSL] - A Groovy based DSL using Groovy
programming language
-* Scala DSL - A Scala based DSL using Scala
+* link:scala-dsl.adoc[Scala DSL] - A Scala based DSL using Scala
programming language
-* Annotation DSL - Use annotations in Java
+* link:bean-integration.adoc[Annotation DSL] - Use annotations in Java
beans.
* https://github.com/koolio/kool/tree/master/kool-camel[Kotlin DSL] -
*Work in progress* - Currently developed outside ASF, but will we
@@ -26,7 +26,7 @@ included later in Camel when Kotlin and the DSL is ready.
The main entry points for the DSL are
-* CamelContext for creating a Camel routing
+* link:camelcontext.adoc[CamelContext] for creating a Camel routing
rulebase
* RouteBuilder for creating a collection of
routes using the routing DSL
@@ -39,6 +39,6 @@ For more examples of the DSL in action see
* link:enterprise-integration-patterns.adoc[Enterprise Integration
Patterns]
+* link:routes.adoc[Routes]
* Examples
-* Routes
diff --git a/docs/user-manual/en/route-builder.adoc
b/docs/user-manual/en/route-builder.adoc
new file mode 100644
index 000..a021f9d
--- /dev/null
+++ b/docs/user-manual/en/route-builder.adoc
@@ -0,0 +1,9 @@
+[[RouteBuilder-RouteBuilder]]
+RouteBuilder
+
+The RouteBuilder is a base class which is derived from to create routing rules
using the DSL. Instances of RouteBuilder are then added to the CamelContext.
+
+See Also
+* link:camelcontext.adoc[CamelContext]
+* link:routes.adoc[Routes]
+* link:architecture.adoc[Architecture]
diff --git a/docs/user-manual/en/routes.adoc b/docs/user-manual/en/routes.adoc
new file mode 100644
index 000..75c238b
--- /dev/null
+++ b/docs/user-manual/en/routes.adoc
@@ -0,0 +1,112 @@
+[[Routes-Routes]]
+Routes
+~~
+
+Camel supports the definition of routing rules using a Java DSL (domain
specific language) which avoids the need for cumbersome XML using a
RouteBuilder.
+
+For example a simple route can be created as follows.
+[source,java]
+--
+RouteBuilder builder = new RouteBuilder() {
+public void configure() {
+errorHandler(deadLetterChannel("mock:error"));
+
+from("direct:a").to("direct:b");
+}
+};
+--
+
+As you can see from the above Camel uses URIs to wire endpoints together.
+
+[[Routes-URI-String-Formatting]]
+URI String formatting
+^^
+Available as of Camel 2.0
+
+If you have endpoint URIs that accept options and you want to be able to
substitute the value, e.g. build the URI by concat the strings together, then
you can use the java.lang.String.format method. But in Camel 2.0 w
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new e0f11a1 Duplicated component name
e0f11a1 is described below
commit e0f11a180a21359dc0023bc923485f4061cff958
Author: Pablo Marambio Cathalifaud <y...@pablomarambio.cl>
AuthorDate: Wed May 9 16:51:57 2018 -0300
Duplicated component name
---
components/readme.adoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/readme.adoc b/components/readme.adoc
index 892f43c..fff152f 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -27,7 +27,7 @@ Number of Components: 293 in 200 JAR artifacts (20 deprecated)
`apns:name` | 2.8 | For sending notifications to Apple iOS devices.
| link:camel-asterisk/src/main/docs/asterisk-component.adoc[Asterisk]
(camel-asterisk) +
-`asterisk:name` | 2.18 | The asterisk component is used to interact with
Asterisk PBX Server Asterisk PBX Server.
+`asterisk:name` | 2.18 | The asterisk component is used to interact with
Asterisk PBX Server.
| link:camel-atmos/src/main/docs/atmos-component.adoc[Atmos] (camel-atmos) +
`atmos:name/operation` | 2.15 | The atmos component is used for integrating
with EMC's Atomos Storage.
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 010de1f Updated the See Also links
010de1f is described below
commit 010de1f7fbc64c82578b0bd219fcd35eca917df6
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Sun May 6 20:58:41 2018 +0800
Updated the See Also links
---
docs/user-manual/en/SUMMARY.md | 2 --
docs/user-manual/en/backlogdebugger.adoc | 2 +-
docs/user-manual/en/camelcontext.adoc| 4 ++--
docs/user-manual/en/debugger.adoc| 2 +-
docs/user-manual/en/delay-interceptor.adoc | 2 +-
docs/user-manual/en/dsl.adoc | 2 +-
docs/user-manual/en/groovy-dsl.adoc | 6 ++
docs/user-manual/en/intercept.adoc | 4 ++--
docs/user-manual/en/java-dsl.adoc| 4 ++--
docs/user-manual/en/lifecycle.adoc | 4 ++--
docs/user-manual/en/scripting-languages.adoc | 2 +-
11 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index e961fd6..33153e4 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -40,7 +40,6 @@
* [Lifecycle](lifecycle.adoc)
* [OnCompletion](oncompletion.adoc)
* [Registry](registry.adoc)
-* [RX](rx.adoc)
* [Scala DSL](scala-dsl.adoc)
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 03e57c3 CAMEL-10671 Fixed the CI build by introducing the maven
dependencies into Ceylon module
03e57c3 is described below
commit 03e57c355f5ddeb48af51e9e066dcfd60c2bd62f
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Fri May 4 13:37:12 2018 +0800
CAMEL-10671 Fixed the CI build by introducing the maven dependencies into
Ceylon module
---
examples/camel-example-ceylon/pom.xml | 22 ++
1 file changed, 22 insertions(+)
diff --git a/examples/camel-example-ceylon/pom.xml
b/examples/camel-example-ceylon/pom.xml
index 4ec21f1..4f9bbcf 100644
--- a/examples/camel-example-ceylon/pom.xml
+++ b/examples/camel-example-ceylon/pom.xml
@@ -111,6 +111,28 @@
+dependency
+
+ import-dependency
+
+
+
+
+
+
+org.apache.camel
+camel-core
+
+
+org.apache.camel
+camel-jetty
+
+
+
+
+
+
+compile
compile
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 89c4b65 Updated the enterprise integration pattern document
89c4b65 is described below
commit 89c4b650788dc8551fb680407b2842ff0b95f0d5
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Thu May 3 16:39:29 2018 +0800
Updated the enterprise integration pattern document
---
docs/user-manual/en/enterprise-integration-patterns.adoc | 12
1 file changed, 12 insertions(+)
diff --git a/docs/user-manual/en/enterprise-integration-patterns.adoc
b/docs/user-manual/en/enterprise-integration-patterns.adoc
index cd8cc80..037707c 100644
--- a/docs/user-manual/en/enterprise-integration-patterns.adoc
+++ b/docs/user-manual/en/enterprise-integration-patterns.adoc
@@ -184,6 +184,18 @@ in a given period to avoid downstream route does not get
overloaded?
number of endpoints?
|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image]
+|Hystrix |How can I stop to call an external service if the service is broken?
+
+|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image]
+|Service Call |How can I call a remote service in a distributed system
+where the service is looked up from a service registry of some sorts?
+
+|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image]
+|Saga |How can I define a series of related actions in a Camel route
+that should be either completed successfully (all of them) or
not-executed/compensated?
+
+
+|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image]
|Multicast |How can I route a message to a number
of endpoints at the same time?
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch camel-2.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.20.x by this push:
new 4a070d0 CAMEL-12475 Fix the NPE error of camel-undertow component by
adding the converter from InputStream into ByteBuffer
4a070d0 is described below
commit 4a070d0849812cac85eafb99345b3a27ebeb6c82
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Thu May 3 10:18:33 2018 +0800
CAMEL-12475 Fix the NPE error of camel-undertow component by adding the
converter from InputStream into ByteBuffer
---
.../java/org/apache/camel/converter/IOConverter.java | 7 +++
.../component/undertow/UndertowProducerTest.java | 19 +++
2 files changed, 26 insertions(+)
diff --git
a/camel-core/src/main/java/org/apache/camel/converter/IOConverter.java
b/camel-core/src/main/java/org/apache/camel/converter/IOConverter.java
index 72dab06..efb52cc 100644
--- a/camel-core/src/main/java/org/apache/camel/converter/IOConverter.java
+++ b/camel-core/src/main/java/org/apache/camel/converter/IOConverter.java
@@ -424,6 +424,13 @@ public final class IOConverter {
return os.toByteArray();
}
+@Converter
+public static ByteBuffer covertToByteBuffer(InputStream is) throws
IOException {
+ByteArrayOutputStream os = new ByteArrayOutputStream();
+IOHelper.copyAndCloseInput(is, os);
+return ByteBuffer.wrap(os.toByteArray());
+}
+
/**
* @deprecated will be removed in Camel 3.0. Use the method which has 2
parameters.
*/
diff --git
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowProducerTest.java
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowProducerTest.java
index ed6f2a4..91dd1a9 100644
---
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowProducerTest.java
+++
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowProducerTest.java
@@ -16,6 +16,9 @@
*/
package org.apache.camel.component.undertow;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.junit.Test;
@@ -75,14 +78,30 @@ public class UndertowProducerTest extends BaseUndertowTest {
assertMockEndpointsSatisfied();
}
+@Test
+public void testHttpInputStream() throws Exception {
+getMockEndpoint("mock:input").expectedBodiesReceived("Hello World");
+
getMockEndpoint("mock:input").expectedHeaderReceived(Exchange.HTTP_METHOD,
"POST");
+
+String out =
template.requestBodyAndHeader("undertow:http://localhost:{{port2}}/bar;, "Hello
World", Exchange.HTTP_METHOD, "POST", String.class);
+assertEquals("This is the InputStream", out);
+
+assertMockEndpointsSatisfied();
+}
+
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
+private InputStream is = new ByteArrayInputStream("This is the
InputStream".getBytes());
@Override
public void configure() throws Exception {
from("undertow:http://localhost:{{port}}/foo;)
.to("mock:input")
.transform().constant("Bye World");
+
+from("undertow:http://localhost:{{port2}}/bar;)
+.to("mock:input")
+.transform().constant(is);
}
};
}
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.
from 5de9a6c CAMEL-10671: Adding camel example project for the Ceylon JVM
language
new 6991d32 Updated the new generated component document
new a9c376f CAMEL-12475 Fix the NPE error of camel-undertow component by
adding the converter from InputStream into ByteBuffer
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/camel/converter/IOConverter.java| 7 +++
.../processor/ValidatingProcessorSchemaTest.java | 55 ++
...Processor.xsd => ValidatingProcessorFailed.xsd} | 14 --
.../component/undertow/UndertowProducerTest.java | 19
components/readme.adoc | 5 +-
docs/user-manual/en/SUMMARY.md | 1 +
6 files changed, 96 insertions(+), 5 deletions(-)
create mode 100644
camel-core/src/test/java/org/apache/camel/processor/ValidatingProcessorSchemaTest.java
copy
camel-core/src/test/resources/org/apache/camel/processor/{ValidatingProcessor.xsd
=> ValidatingProcessorFailed.xsd} (83%)
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 6991d32760aa0f9042e0137a9ed9d7458949c9f9
Author: Willem Jiang <jiangni...@huawei.com>
AuthorDate: Thu May 3 10:08:33 2018 +0800
Updated the new generated component document
---
components/readme.adoc | 5 -
docs/user-manual/en/SUMMARY.md | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/components/readme.adoc b/components/readme.adoc
index 4683b03..63c41d0 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -2,7 +2,7 @@ Components
^^
// components: START
-Number of Components: 293 in 200 JAR artifacts (20 deprecated)
+Number of Components: 294 in 201 JAR artifacts (20 deprecated)
[width="100%",cols="4,1,5",options="header"]
|===
@@ -236,6 +236,9 @@ Number of Components: 293 in 200 JAR artifacts (20
deprecated)
|
link:camel-elasticsearch-rest/src/main/docs/elasticsearch-rest-component.adoc[Elastichsearch
Rest] (camel-elasticsearch-rest) +
`elasticsearch-rest:clusterName` | 2.21 | The elasticsearch component is used
for interfacing with ElasticSearch server using REST API.
+|
link:camel-elasticsearch5-rest/src/main/docs/elasticsearch5-rest-component.adoc[Elastichsearch5
Rest] (camel-elasticsearch5-rest) +
+`elasticsearch5-rest:clusterName` | 2.21 | The elasticsearch component is used
for interfacing with ElasticSearch server using 5.x REST API.
+
|
link:camel-elasticsearch/src/main/docs/elasticsearch-component.adoc[Elasticsearch]
(camel-elasticsearch) +
`elasticsearch:clusterName` | 2.11 | *deprecated* The elasticsearch component
is used for interfacing with ElasticSearch server.
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index e961fd6..92a77a1 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -192,6 +192,7 @@
* [Ehcache](ehcache-component.adoc)
* [EJB](ejb-component.adoc)
* [Elastichsearch Rest](elasticsearch-rest-component.adoc)
+ * [Elastichsearch5 Rest](elasticsearch5-rest-component.adoc)
* [Elasticsearch](elasticsearch-component.adoc)
* [Elasticsearch5](elasticsearch5-component.adoc)
* [ElSQL](elsql-component.adoc)
--
To stop receiving notification emails like this one, please contact
ningji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 5de9a6c CAMEL-10671: Adding camel example project for the Ceylon JVM
language
5de9a6c is described below
commit 5de9a6cf77914897b8d127922377bf6edbfa1614
Author: Dimitrios Liapis <dimitri...@gmail.com>
AuthorDate: Mon Apr 23 11:59:29 2018 +0100
CAMEL-10671: Adding camel example project for the Ceylon JVM language
---
examples/camel-example-ceylon/.gitignore | 1 +
examples/camel-example-ceylon/ReadMe.md| 29 +
examples/camel-example-ceylon/pom.xml | 124 +
.../org/apache/camel/example/MyRouteBuilder.ceylon | 25 +
.../ceylon/org/apache/camel/example/package.ceylon | 17 +++
.../ceylon/org/apache/camel/example/run.ceylon | 35 ++
.../src/main/resources/log4j2.properties | 23
.../src/main/resources/module/module.ceylon| 23
examples/pom.xml | 1 +
9 files changed, 278 insertions(+)
diff --git a/examples/camel-example-ceylon/.gitignore
b/examples/camel-example-ceylon/.gitignore
new file mode 100644
index 000..a2583f2
--- /dev/null
+++ b/examples/camel-example-ceylon/.gitignore
@@ -0,0 +1 @@
+module.ceylon
\ No newline at end of file
diff --git a/examples/camel-example-ceylon/ReadMe.md
b/examples/camel-example-ceylon/ReadMe.md
new file mode 100644
index 000..c7f1e63
--- /dev/null
+++ b/examples/camel-example-ceylon/ReadMe.md
@@ -0,0 +1,29 @@
+# Camel Router with Ceylon Project
+
+A simple example that uses Ceylon programming language to define a little
Camel route.
+
+The Camel route listen on HTTP port 8080 and return back a constant response.
+
+### How to run
+
+To build this project use
+
+mvn clean install
+
+To run this project
+
+mvn resources:resources ceylon:run
+
+You can then open the following url from a web browser: <http://localhost:8080>
+
+
+### Forum, Help, etc
+
+If you hit an problems please let us know on the Camel Forums
+ <http://camel.apache.org/discussion-forums.html>
+
+Please help us make Apache Camel better - we appreciate any feedback you may
+have. Enjoy!
+
+
+The Camel riders!
\ No newline at end of file
diff --git a/examples/camel-example-ceylon/pom.xml
b/examples/camel-example-ceylon/pom.xml
new file mode 100644
index 000..4ec21f1
--- /dev/null
+++ b/examples/camel-example-ceylon/pom.xml
@@ -0,0 +1,124 @@
+
+
+http://maven.apache.org/POM/4.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd;>
+
+ 4.0.0
+
+
+org.apache.camel.example
+examples
+2.22.0-SNAPSHOT
+
+
+ camel-example-ceylon
+ jar
+ Camel :: Example :: Ceylon
+ A Camel route using Ceylon
+
+
+Other Languages
+1.3.3
+
+
+
+
+
+ org.apache.camel
+ camel-core
+
+
+
+
+ org.apache.camel
+ camel-jetty
+
+
+
+
+ org.apache.logging.log4j
+ log4j-api
+
+
+ org.apache.logging.log4j
+ log4j-core
+
+
+ org.apache.logging.log4j
+ log4j-slf4j-impl
+
+
+
+
+
+
+
+
+src/main/resources/module
+true
+
+ **/module.ceylon
+
+
+
+
+${project.basedir}/src/main/ceylon
+
+
+
+
+maven-antrun-plugin
+
+
+process-resources
+
+
+
+
+
+
+ run
+
+
+
+
+
+
+org.ceylon-lang
+ceylon-maven-plugin
+${ceylon.version}
+
+ true
+ org.apache.camel.example/${project.version}
+
+
+
+
+ compile
+
+
+
+
+
+
+
+
+
diff --git
a/examples/camel-example-ceylon/src/main/ceylon/org/apache/camel/example/MyRouteBuilder.ceylon
b/examples/camel-example-ceylon/src/main/ceylon/org/apache/camel/example/MyRouteBuilder.ceylon
new file mode 100644
index 000..db0f2a3
--- /dev/null
+++
b/examples/camel-example-ceylon/src/main/ceylon/org/apache/camel/example/MyRouteBuilder.ceylon
@@ -0,0 +1,25 @@
+/**
+ * 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-
Repository: camel
Updated Branches:
refs/heads/master df077dc6b -> 34c9a9bf1
Fixed wrong issue tracker links on CONTRIBUTING.md
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/34c9a9bf
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/34c9a9bf
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/34c9a9bf
Branch: refs/heads/master
Commit: 34c9a9bf19f6dda624af8b5c3c3f6203efb53b24
Parents: df077dc
Author: Marco Collovati <(none)>
Authored: Mon Jan 16 21:20:49 2017 +0100
Committer: Willem Jiang
Committed: Tue Jan 17 13:45:13 2017 +0800
--
CONTRIBUTING.md | 16
1 file changed, 8 insertions(+), 8 deletions(-)
--
http://git-wip-us.apache.org/repos/asf/camel/blob/34c9a9bf/CONTRIBUTING.md
--
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d08ddb7..097deea 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,11 +1,11 @@
## Contributing to Apache Camel
There are many ways you can help make Camel a better piece of software -
please dive in and help!
-- Try surf the documentation - if somethings confusing or not clear, let us
know.
-- Download the code & try it out and see what you think.
+- Try surf the documentation - if somethings confusing or not clear, let us
know.
+- Download the code & try it out and see what you think.
- Browse the source code. Got an itch to scratch, want to tune some operation
or add some feature?
-- Want to do some hacking on Camel? Try surfing the our [issue
tracker](http://issues.apache.org/activemq/browse/CAMEL) for open issues or
features that need to be implemented, take ownership of an issue and try fix it.
-- If you are a new Camel rider and would like to help us, you can also find
[some easy to resolve
issues.](https://issues.apache.org/jira/secure/IssueNavigator.jspa?mode=hide=12316782)
+- Want to do some hacking on Camel? Try surfing the our [issue
tracker](https://issues.apache.org/jira/browse/CAMEL) for open issues or
features that need to be implemented, take ownership of an issue and try fix it.
+- If you are a new Camel rider and would like to help us, you can also find
[some easy to resolve
issues.](https://issues.apache.org/jira/secure/IssueNavigator.jspa?mode=hide=12316782)
- Leave a comment on the issue to let us know you are working on it and add
yourself as a watcher to get informed about all modifications.
@@ -49,7 +49,7 @@ To be able to edit the wiki you need
## If you find a bug or problem
-Please raise a new issue in our [issue
tracker](http://issues.apache.org/activemq/browse/CAMEL)
+Please raise a new issue in our [issue
tracker](https://issues.apache.org/jira/browse/CAMEL)
If you can create a JUnit test case then your issue is more likely to be
resolved quicker.
e.g. take a look at some of the existing [unit tests
cases](https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/)
Then we can add your issue to Subversion and then we'll know when its really
fixed and we can ensure that the problem stays fixed in future releases.
@@ -105,8 +105,8 @@ We recommend you create patches as github PRs which is much
easier for us to acc
## Pull request at Github
There is also a Git repository at Github which you could fork. Then you submit
patches as any other github project - eg work on a new feature branch and send
a pull request. One of the committers then needs to accept your pull request to
bring the code to the ASF codebase. After the code has been included into the
ASF codebase, you need to close the pull request because we can't do that...
-
-When providing code patches then please include the Camel JIRA ticket number
in the commit messages.
+
+When providing code patches then please include the Camel JIRA ticket number
in the commit messages.
We favor using the syntax:
CAMEL-: Some message goes here
@@ -137,7 +137,7 @@ We prefer patches has unit tests as well and that these
unit tests have proper a
## Using the issue tracker
-Before you can raise an issue in the [issue
tracker](http://issues.apache.org/activemq/browse/CAMEL) you need to register
with it. This is quick & painless.
+Before you can raise an issue in the [issue
tracker](https://issues.apache.org/jira/browse/CAMEL) you need to register with
it. This is quick & painless.
If you want to have a go at fixing an issue you need to be in the list of
camel-developers on the issue tracker. To join the group, please mail the
`d...@camel.apache.org` mail list with the email address you used to register
with the issue tracker and we'll add you to the group.
Repository: camel
Updated Branches:
refs/heads/camel-2.18.x 738839fd0 -> 73416c7c9
refs/heads/master f5dccb880 -> ced3b4b7f
CAMEL-10409 Removed the run-test-leak.sh, as the unit test is enable the memory
leak detect by default
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ced3b4b7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ced3b4b7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ced3b4b7
Branch: refs/heads/master
Commit: ced3b4b7f4ccadfc1ca673edfc5014cb669a8f84
Parents: f5dccb8
Author: Willem Jiang
Authored: Tue Nov 15 17:23:13 2016 +0800
Committer: Willem Jiang
Committed: Tue Nov 15 17:23:13 2016 +0800
--
components/camel-netty4-http/run-test-leak.sh | 31 --
components/camel-netty4/run-test-leak.sh | 31 --
2 files changed, 62 deletions(-)
--
http://git-wip-us.apache.org/repos/asf/camel/blob/ced3b4b7/components/camel-netty4-http/run-test-leak.sh
--
diff --git a/components/camel-netty4-http/run-test-leak.sh
b/components/camel-netty4-http/run-test-leak.sh
deleted file mode 100755
index 409a814..000
--- a/components/camel-netty4-http/run-test-leak.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-## ---
-## 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.
-## ---
-
-echo 'Running tests with Netty leak detection ...'
-mvn clean install -Dio.netty.leakDetectionLevel=paranoid
-Dio.netty.leakDetection.maxRecords=20
-
-echo 'Checking log file if there is any leaks ...'
-
-if grep LEAK target/camel-netty4-http-test.log; then
-echo 'LEAK found'
-exit 1
-else
-echo 'No LEAK found'
-exit 0
-fi
http://git-wip-us.apache.org/repos/asf/camel/blob/ced3b4b7/components/camel-netty4/run-test-leak.sh
--
diff --git a/components/camel-netty4/run-test-leak.sh
b/components/camel-netty4/run-test-leak.sh
deleted file mode 100755
index 409a814..000
--- a/components/camel-netty4/run-test-leak.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-## ---
-## 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.
-## ---
-
-echo 'Running tests with Netty leak detection ...'
-mvn clean install -Dio.netty.leakDetectionLevel=paranoid
-Dio.netty.leakDetection.maxRecords=20
-
-echo 'Checking log file if there is any leaks ...'
-
-if grep LEAK target/camel-netty4-http-test.log; then
-echo 'LEAK found'
-exit 1
-else
-echo 'No LEAK found'
-exit 0
-fi
CAMEL-10409 Removed the run-test-leak.sh, as the unit test is enable the memory
leak detect by default
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/73416c7c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/73416c7c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/73416c7c
Branch: refs/heads/camel-2.18.x
Commit: 73416c7c980bda6c0a89f48f98c185fe594c5b53
Parents: 738839f
Author: Willem Jiang
Authored: Tue Nov 15 17:23:13 2016 +0800
Committer: Willem Jiang
Committed: Tue Nov 15 17:23:34 2016 +0800
--
components/camel-netty4-http/run-test-leak.sh | 31 --
components/camel-netty4/run-test-leak.sh | 31 --
2 files changed, 62 deletions(-)
--
http://git-wip-us.apache.org/repos/asf/camel/blob/73416c7c/components/camel-netty4-http/run-test-leak.sh
--
diff --git a/components/camel-netty4-http/run-test-leak.sh
b/components/camel-netty4-http/run-test-leak.sh
deleted file mode 100755
index 409a814..000
--- a/components/camel-netty4-http/run-test-leak.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-## ---
-## 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.
-## ---
-
-echo 'Running tests with Netty leak detection ...'
-mvn clean install -Dio.netty.leakDetectionLevel=paranoid
-Dio.netty.leakDetection.maxRecords=20
-
-echo 'Checking log file if there is any leaks ...'
-
-if grep LEAK target/camel-netty4-http-test.log; then
-echo 'LEAK found'
-exit 1
-else
-echo 'No LEAK found'
-exit 0
-fi
http://git-wip-us.apache.org/repos/asf/camel/blob/73416c7c/components/camel-netty4/run-test-leak.sh
--
diff --git a/components/camel-netty4/run-test-leak.sh
b/components/camel-netty4/run-test-leak.sh
deleted file mode 100755
index 409a814..000
--- a/components/camel-netty4/run-test-leak.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-## ---
-## 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.
-## ---
-
-echo 'Running tests with Netty leak detection ...'
-mvn clean install -Dio.netty.leakDetectionLevel=paranoid
-Dio.netty.leakDetection.maxRecords=20
-
-echo 'Checking log file if there is any leaks ...'
-
-if grep LEAK target/camel-netty4-http-test.log; then
-echo 'LEAK found'
-exit 1
-else
-echo 'No LEAK found'
-exit 0
-fi
Repository: camel
Updated Branches:
refs/heads/camel-2.18.x 3869c28fc -> 738839fd0
CAMEL-10409
Double release of netty buffer: Addedtest
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/778ae84f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/778ae84f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/778ae84f
Branch: refs/heads/camel-2.18.x
Commit: 778ae84f393e767970b1016b51584a353b7d7547
Parents: 3869c28
Author: Vitalii Tymchyshyn
Authored: Mon Nov 14 22:10:15 2016 -0500
Committer: Willem Jiang
Committed: Tue Nov 15 17:10:57 2016 +0800
--
.../netty4/http/NettyRequestManagementTest.java | 57
1 file changed, 57 insertions(+)
--
http://git-wip-us.apache.org/repos/asf/camel/blob/778ae84f/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyRequestManagementTest.java
--
diff --git
a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyRequestManagementTest.java
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyRequestManagementTest.java
new file mode 100644
index 000..eec5537
--- /dev/null
+++
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyRequestManagementTest.java
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.netty4.http;
+
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.PooledByteBufAllocator;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests https://issues.apache.org/jira/browse/CAMEL-10409
+ */
+public class NettyRequestManagementTest extends BaseNettyTest {
+
+@Test
+public void testBufferManagement() {
+Exchange exchange = template.send("direct:start", e ->
e.getIn().setBody("World"));
+Assert.assertEquals("Bye World",
exchange.getIn().getBody(String.class));
+exchange.getProperty("buffer", ByteBuf.class).release();
+}
+
+private static void requestBuffer(Exchange exchange) {
+exchange.setProperty("buffer",
PooledByteBufAllocator.DEFAULT.directBuffer());
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws Exception {
+from("netty4-http:http://0.0.0.0:{{port}}/foo;)
+.transform(body().prepend("Bye "));
+
+from("direct:start")
+
.to("netty4-http:http://localhost:{{port}}/foo?synchronous=true;)
+.process(NettyRequestManagementTest::requestBuffer);
+}
+};
+}
+}
CAMEL-10409 Added memory leak check to camel-netty4 component
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c63d756a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c63d756a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c63d756a
Branch: refs/heads/camel-2.18.x
Commit: c63d756ace3b2eb709e398e1c880bbb161729858
Parents: 778ae84
Author: Willem Jiang
Authored: Tue Nov 15 12:46:54 2016 +0800
Committer: Willem Jiang
Committed: Tue Nov 15 17:11:07 2016 +0800
--
.../camel/component/netty4/BaseNettyTest.java | 25
.../component/netty4/LogCaptureAppender.java| 65
.../camel/component/netty4/LogCaptureTest.java | 35 +++
.../src/test/resources/log4j2.properties| 6 ++
4 files changed, 131 insertions(+)
--
http://git-wip-us.apache.org/repos/asf/camel/blob/c63d756a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/BaseNettyTest.java
--
diff --git
a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/BaseNettyTest.java
b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/BaseNettyTest.java
index c64465e..aeb5378 100644
---
a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/BaseNettyTest.java
+++
b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/BaseNettyTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.netty4;
import java.io.File;
import java.io.FileOutputStream;
+import java.util.Collection;
import java.util.Properties;
import org.apache.camel.CamelContext;
@@ -26,9 +27,13 @@ import org.apache.camel.converter.IOConverter;
import org.apache.camel.impl.JndiRegistry;
import org.apache.camel.test.AvailablePortFinder;
import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.logging.log4j.core.LogEvent;
import org.junit.AfterClass;
import org.junit.BeforeClass;
+import io.netty.buffer.ByteBufAllocator;
+import io.netty.util.ResourceLeakDetector;
+
/**
*
*/
@@ -65,6 +70,26 @@ public class BaseNettyTest extends CamelTestSupport {
}
}
+@BeforeClass
+public static void startLeakDetection() {
+System.setProperty("io.netty.leakDetection.maxRecords", "100");
+ResourceLeakDetector.setLevel(ResourceLeakDetector.Level.PARANOID);
+}
+
+@AfterClass
+public static void verifyNoLeaks() throws Exception {
+//Force GC to bring up leaks
+System.gc();
+//Kick leak detection logging
+ByteBufAllocator.DEFAULT.buffer(1).release();
+Collection events = LogCaptureAppender.getEvents();
+if (!events.isEmpty()) {
+String message = "Leaks detected while running tests: " + events;
+LogCaptureAppender.reset();
+throw new AssertionError(message);
+}
+}
+
@Override
protected CamelContext createCamelContext() throws Exception {
CamelContext context = super.createCamelContext();
http://git-wip-us.apache.org/repos/asf/camel/blob/c63d756a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/LogCaptureAppender.java
--
diff --git
a/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/LogCaptureAppender.java
b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/LogCaptureAppender.java
new file mode 100644
index 000..e53fb32
--- /dev/null
+++
b/components/camel-netty4/src/test/java/org/apache/camel/component/netty4/LogCaptureAppender.java
@@ -0,0 +1,65 @@
+/**
+ * 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.netty4;
+
+import java.io.Serializable;
+import java.util.ArrayDeque;
+import java.util.Collection;
+import java.util.Deque;
+
+import org.apache.logging.log4j.core.Filter;
+import
CAMEL-10409
Double release of netty buffer: Addedtest
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d17d59b2
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d17d59b2
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d17d59b2
Branch: refs/heads/master
Commit: d17d59b2b28c796b7e978e8642c8c31a59b4e08d
Parents: 7a93699
Author: Vitalii Tymchyshyn
Authored: Mon Nov 14 22:10:15 2016 -0500
Committer: Willem Jiang
Committed: Tue Nov 15 14:05:10 2016 +0800
--
.../netty4/http/NettyRequestManagementTest.java | 57
1 file changed, 57 insertions(+)
--
http://git-wip-us.apache.org/repos/asf/camel/blob/d17d59b2/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyRequestManagementTest.java
--
diff --git
a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyRequestManagementTest.java
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyRequestManagementTest.java
new file mode 100644
index 000..eec5537
--- /dev/null
+++
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyRequestManagementTest.java
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.netty4.http;
+
+import io.netty.buffer.ByteBuf;
+import io.netty.buffer.PooledByteBufAllocator;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests https://issues.apache.org/jira/browse/CAMEL-10409
+ */
+public class NettyRequestManagementTest extends BaseNettyTest {
+
+@Test
+public void testBufferManagement() {
+Exchange exchange = template.send("direct:start", e ->
e.getIn().setBody("World"));
+Assert.assertEquals("Bye World",
exchange.getIn().getBody(String.class));
+exchange.getProperty("buffer", ByteBuf.class).release();
+}
+
+private static void requestBuffer(Exchange exchange) {
+exchange.setProperty("buffer",
PooledByteBufAllocator.DEFAULT.directBuffer());
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws Exception {
+from("netty4-http:http://0.0.0.0:{{port}}/foo;)
+.transform(body().prepend("Bye "));
+
+from("direct:start")
+
.to("netty4-http:http://localhost:{{port}}/foo?synchronous=true;)
+.process(NettyRequestManagementTest::requestBuffer);
+}
+};
+}
+}
Repository: camel
Updated Branches:
refs/heads/camel-2.18.x 8351873ee -> c5a8c6778
CAMEL-10441 Updated the documentation of WorkerGroup option in camel-netty4
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c5a8c677
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c5a8c677
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c5a8c677
Branch: refs/heads/camel-2.18.x
Commit: c5a8c6778a5ebb6fda957427160d57602c0bac3e
Parents: 8351873
Author: Willem Jiang
Authored: Thu Nov 3 18:34:29 2016 +0800
Committer: Willem Jiang
Committed: Thu Nov 3 19:09:59 2016 +0800
--
.../netty4/springboot/NettyComponentConfiguration.java | 5 +++--
.../camel-netty4-http/src/main/docs/netty4-http-component.adoc | 4 ++--
components/camel-netty4/src/main/docs/netty4-component.adoc| 4 ++--
.../component/netty4/NettyServerBootstrapConfiguration.java| 6 +++---
4 files changed, 10 insertions(+), 9 deletions(-)
--
http://git-wip-us.apache.org/repos/asf/camel/blob/c5a8c677/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java
--
diff --git
a/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java
b/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java
index 2c6ffe0..fb5f59d 100644
---
a/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java
+++
b/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java
@@ -449,8 +449,9 @@ public class NettyComponentConfiguration {
private EventLoopGroup bossGroup;
/**
* To use a explicit EventLoopGroup as the boss thread pool. For
example
- * to share a thread pool with multiple consumers. By default each
- * consumer has their own boss pool with 1 core thread.
+ * to share a thread pool with multiple consumers or producers. By
+ * default each consumer or producer has their own worker pool with 2 x
+ * cpu count core threads.
*/
private EventLoopGroup workerGroup;
/**
http://git-wip-us.apache.org/repos/asf/camel/blob/c5a8c677/components/camel-netty4-http/src/main/docs/netty4-http-component.adoc
--
diff --git
a/components/camel-netty4-http/src/main/docs/netty4-http-component.adoc
b/components/camel-netty4-http/src/main/docs/netty4-http-component.adoc
index 21d994a..b3265bc 100644
--- a/components/camel-netty4-http/src/main/docs/netty4-http-component.adoc
+++ b/components/camel-netty4-http/src/main/docs/netty4-http-component.adoc
@@ -148,8 +148,6 @@ The Netty4 HTTP component supports 82 endpoint options
which are listed below:
| traceEnabled | consumer (advanced) | false | boolean | Specifies whether to
enable HTTP TRACE for this Netty HTTP consumer. By default TRACE is turned off.
| urlDecodeHeaders | consumer (advanced) | false | boolean | If this option is
enabled then during binding from Netty to Camel Message then the header values
will be URL decoded (eg 20 will be a space character. Notice this option is
used by the default org.apache.camel.component.netty.http.NettyHttpBinding and
therefore if you implement a custom
org.apache.camel.component.netty4.http.NettyHttpBinding then you would need to
decode the headers accordingly to this option.
| usingExecutorService | consumer (advanced) | true | boolean | Whether to use
ordered thread pool to ensure events are processed orderly on the same channel.
-| workerCount | consumer (advanced) | | int | When netty works on nio mode it
uses default workerCount parameter from Netty which is cpu_core_threads2. User
can use this operation to override the default workerCount from Netty
-| workerGroup | consumer (advanced) | | EventLoopGroup | To use a explicit
EventLoopGroup as the boss thread pool. For example to share a thread pool with
multiple consumers. By default each consumer has their own boss pool with 1
core thread.
| connectTimeout | producer | 1 | int | Time to wait for a socket
connection to be available. Value is in millis.
| requestTimeout | producer | | long | Allows to use a timeout for the Netty
producer when calling a remote server. By default no timeout is in use. The
value is in milli seconds so eg 3 is 30 seconds. The requestTimeout is
using Netty's ReadTimeoutHandler to trigger the timeout.
| reuseChannel |
Repository: camel
Updated Branches:
refs/heads/master 9b0b25886 -> 200e097d9
CAMEL-10441 Updated the documentation of WorkerGroup option in camel-netty4
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/200e097d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/200e097d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/200e097d
Branch: refs/heads/master
Commit: 200e097d9df501724b4e7681768562daef3e4359
Parents: 9b0b258
Author: Willem Jiang
Authored: Thu Nov 3 18:34:29 2016 +0800
Committer: Willem Jiang
Committed: Thu Nov 3 18:34:29 2016 +0800
--
.../netty4/springboot/NettyComponentConfiguration.java | 5 +++--
.../camel-netty4-http/src/main/docs/netty4-http-component.adoc | 4 ++--
components/camel-netty4/src/main/docs/netty4-component.adoc| 4 ++--
.../component/netty4/NettyServerBootstrapConfiguration.java| 6 +++---
4 files changed, 10 insertions(+), 9 deletions(-)
--
http://git-wip-us.apache.org/repos/asf/camel/blob/200e097d/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java
--
diff --git
a/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java
b/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java
index 2c6ffe0..fb5f59d 100644
---
a/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java
+++
b/components-starter/camel-netty4-starter/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java
@@ -449,8 +449,9 @@ public class NettyComponentConfiguration {
private EventLoopGroup bossGroup;
/**
* To use a explicit EventLoopGroup as the boss thread pool. For
example
- * to share a thread pool with multiple consumers. By default each
- * consumer has their own boss pool with 1 core thread.
+ * to share a thread pool with multiple consumers or producers. By
+ * default each consumer or producer has their own worker pool with 2 x
+ * cpu count core threads.
*/
private EventLoopGroup workerGroup;
/**
http://git-wip-us.apache.org/repos/asf/camel/blob/200e097d/components/camel-netty4-http/src/main/docs/netty4-http-component.adoc
--
diff --git
a/components/camel-netty4-http/src/main/docs/netty4-http-component.adoc
b/components/camel-netty4-http/src/main/docs/netty4-http-component.adoc
index f122836..382e090 100644
--- a/components/camel-netty4-http/src/main/docs/netty4-http-component.adoc
+++ b/components/camel-netty4-http/src/main/docs/netty4-http-component.adoc
@@ -148,8 +148,6 @@ The Netty4 HTTP component supports 83 endpoint options
which are listed below:
| traceEnabled | consumer (advanced) | false | boolean | Specifies whether to
enable HTTP TRACE for this Netty HTTP consumer. By default TRACE is turned off.
| urlDecodeHeaders | consumer (advanced) | false | boolean | If this option is
enabled then during binding from Netty to Camel Message then the header values
will be URL decoded (eg 20 will be a space character. Notice this option is
used by the default org.apache.camel.component.netty.http.NettyHttpBinding and
therefore if you implement a custom
org.apache.camel.component.netty4.http.NettyHttpBinding then you would need to
decode the headers accordingly to this option.
| usingExecutorService | consumer (advanced) | true | boolean | Whether to use
ordered thread pool to ensure events are processed orderly on the same channel.
-| workerCount | consumer (advanced) | | int | When netty works on nio mode it
uses default workerCount parameter from Netty which is cpu_core_threads2. User
can use this operation to override the default workerCount from Netty
-| workerGroup | consumer (advanced) | | EventLoopGroup | To use a explicit
EventLoopGroup as the boss thread pool. For example to share a thread pool with
multiple consumers. By default each consumer has their own boss pool with 1
core thread.
| connectTimeout | producer | 1 | int | Time to wait for a socket
connection to be available. Value is in millis.
| cookieHandler | producer | | CookieHandler | Configure a cookie handler to
maintain a HTTP session
| requestTimeout | producer | | long | Allows to use a timeout for the Netty
producer when calling a remote server. By default no timeout is in use. The
value is in milli seconds so eg 3 is 30 seconds. The