[1/4] camel git commit: CAMEL-9925: Updated Salesforce component to use Jetty9 and cometd3
Repository: camel Updated Branches: refs/heads/camel-2.17.x 7aa181a4d -> b69ab33a7 http://git-wip-us.apache.org/repos/asf/camel/blob/8dfd66bd/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java -- diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java index 9fdadb8..995a810 100644 --- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java +++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java @@ -21,6 +21,7 @@ import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.lang.reflect.Field; +import java.net.URI; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.Collections; @@ -37,6 +38,7 @@ import java.util.concurrent.TimeUnit; import java.util.regex.Pattern; import org.apache.camel.component.salesforce.SalesforceEndpointConfig; +import org.apache.camel.component.salesforce.SalesforceHttpClient; import org.apache.camel.component.salesforce.SalesforceLoginConfig; import org.apache.camel.component.salesforce.api.SalesforceException; import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase; @@ -66,10 +68,13 @@ import org.apache.velocity.runtime.RuntimeConstants; import org.apache.velocity.runtime.log.Log4JLogChute; import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader; import org.codehaus.jackson.map.ObjectMapper; -import org.eclipse.jetty.client.Address; -import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.client.RedirectListener; -import org.eclipse.jetty.client.security.ProxyAuthorization; +import org.eclipse.jetty.client.HttpProxy; +import org.eclipse.jetty.client.Origin; +import org.eclipse.jetty.client.ProxyConfiguration; +import org.eclipse.jetty.client.Socks4Proxy; +import org.eclipse.jetty.client.api.Authentication; +import org.eclipse.jetty.client.util.BasicAuthentication; +import org.eclipse.jetty.client.util.DigestAuthentication; import org.eclipse.jetty.util.ssl.SslContextFactory; /** @@ -116,6 +121,30 @@ public class CamelSalesforceMojo extends AbstractMojo { protected Integer httpProxyPort; /** + * Is it a SOCKS4 Proxy? + */ +@Parameter(property = "camelSalesforce.isHttpProxySocks4") +private boolean isHttpProxySocks4; + +/** + * Is HTTP Proxy secure, i.e. using secure sockets, true by default. + */ +@Parameter(property = "camelSalesforce.isHttpProxySecure") +private boolean isHttpProxySecure = true; + +/** + * Addresses to Proxy. + */ +@Parameter(property = "camelSalesforce.httpProxyIncludedAddresses") +private Set httpProxyIncludedAddresses; + +/** + * Addresses to NOT Proxy. + */ +@Parameter(property = "camelSalesforce.httpProxyIncludedAddresses") +private Set httpProxyExcludedAddresses; + +/** * Proxy authentication username. */ @Parameter(property = "camelSalesforce.httpProxyUsername") @@ -128,6 +157,24 @@ public class CamelSalesforceMojo extends AbstractMojo { protected String httpProxyPassword; /** + * Proxy authentication URI. + */ +@Parameter(property = "camelSalesforce.httpProxyAuthUri") +protected String httpProxyAuthUri; + +/** + * Proxy authentication realm. + */ +@Parameter(property = "camelSalesforce.httpProxyRealm") +protected String httpProxyRealm; + +/** + * Proxy uses Digest authentication. + */ +@Parameter(property = "camelSalesforce.httpProxyUseDigestAuth") +protected boolean httpProxyUseDigestAuth; + +/** * Salesforce client id. */ @Parameter(property = "camelSalesforce.clientId", required = true) @@ -224,10 +271,8 @@ public class CamelSalesforceMojo extends AbstractMojo { } // connect to Salesforce -final HttpClient httpClient = createHttpClient(); - -final SalesforceSession session = new SalesforceSession(httpClient, -new SalesforceLoginConfig(loginUrl, clientId, clientSecret, userName, password, false)); +final SalesforceHttpClient httpClient = createHttpClient(); +final SalesforceSession session = httpClient.getSession(); getLog().info("Salesforce login..."); try { @@ -417,28 +462,33 @@ public class CamelSalesforceMojo extends AbstractMojo { getLog().info(String.format("Found %s matching Objects", objectNames.size())); } -protected HttpClient createHttpClient() throws MojoExecutionException { +protected SalesforceHttpClient createHttpClient()
[4/4] camel git commit: CAMEL-9925: Fixed CS errors
CAMEL-9925: Fixed CS errors Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b69ab33a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b69ab33a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b69ab33a Branch: refs/heads/camel-2.17.x Commit: b69ab33a7c9dded49b97a0bd0e295110a66c6697 Parents: 8dfd66b Author: Dhiraj BokdeAuthored: Thu Apr 28 22:49:01 2016 -0700 Committer: Dhiraj Bokde Committed: Thu Apr 28 22:49:29 2016 -0700 -- .../client/DefaultAnalyticsApiClient.java | 48 ++-- .../internal/client/DefaultRestClient.java | 2 +- .../client/SalesforceSecurityHandler.java | 9 ++-- .../processor/AbstractSalesforceProcessor.java | 2 +- .../internal/streaming/SubscriptionHelper.java | 5 +- .../apache/camel/maven/CamelSalesforceMojo.java | 8 ++-- 6 files changed, 38 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b69ab33a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultAnalyticsApiClient.java -- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultAnalyticsApiClient.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultAnalyticsApiClient.java index f6e72dc..29c7c70 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultAnalyticsApiClient.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultAnalyticsApiClient.java @@ -61,16 +61,16 @@ public class DefaultAnalyticsApiClient extends AbstractClientBase implements Ana @Override public void getRecentReports(final RecentReportsResponseCallback callback) { -final Request Request = getRequest(HttpMethod.GET, reportsUrl()); +final Request request = getRequest(HttpMethod.GET, reportsUrl()); -doHttpRequest(Request, new ClientResponseCallback() { +doHttpRequest(request, new ClientResponseCallback() { @Override @SuppressWarnings("unchecked") public void onResponse(InputStream response, SalesforceException ex) { List recentReports = null; if (response != null) { try { -recentReports = unmarshalResponse(response, Request, +recentReports = unmarshalResponse(response, request, new TypeReference () { } ); @@ -86,14 +86,14 @@ public class DefaultAnalyticsApiClient extends AbstractClientBase implements Ana @Override public void getReportDescription(String reportId, final ReportDescriptionResponseCallback callback) { -final Request Request = getRequest(HttpMethod.GET, reportsDescribeUrl(reportId)); +final Request request = getRequest(HttpMethod.GET, reportsDescribeUrl(reportId)); -doHttpRequest(Request, new ClientResponseCallback() { +doHttpRequest(request, new ClientResponseCallback() { @Override public void onResponse(InputStream response, SalesforceException ex) { ReportDescription reportDescription = null; try { -reportDescription = unmarshalResponse(response, Request, ReportDescription.class); +reportDescription = unmarshalResponse(response, request, ReportDescription.class); } catch (SalesforceException e) { ex = e; } @@ -107,28 +107,28 @@ public class DefaultAnalyticsApiClient extends AbstractClientBase implements Ana final ReportResultsResponseCallback callback) { final boolean useGet = reportMetadata == null; -final Request Request = getRequest( +final Request request = getRequest( useGet ? HttpMethod.GET : HttpMethod.POST, reportsUrl(reportId, includeDetails)); // set POST data if (!useGet) { try { // wrap reportMetadata in a map -final HashMap
request = new HashMap (); -request.put("reportMetadata", reportMetadata); -marshalRequest(request, Request); +final HashMap input = new HashMap (); +
[2/4] camel git commit: CAMEL-9925: Updated Salesforce component to use Jetty9 and cometd3
http://git-wip-us.apache.org/repos/asf/camel/blob/8dfd66bd/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java -- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java index 2dade18..9eb6e0c 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java @@ -26,6 +26,7 @@ import java.util.Map; import com.thoughtworks.xstream.XStream; +import org.apache.camel.component.salesforce.SalesforceHttpClient; import org.apache.camel.component.salesforce.api.SalesforceException; import org.apache.camel.component.salesforce.api.SalesforceMultipleChoicesException; import org.apache.camel.component.salesforce.api.dto.RestError; @@ -37,11 +38,11 @@ import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.URISupport; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.type.TypeReference; -import org.eclipse.jetty.client.ContentExchange; -import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.client.HttpExchange; -import org.eclipse.jetty.http.HttpHeaders; -import org.eclipse.jetty.http.HttpMethods; +import org.eclipse.jetty.client.api.Request; +import org.eclipse.jetty.client.api.Response; +import org.eclipse.jetty.client.util.InputStreamContentProvider; +import org.eclipse.jetty.http.HttpHeader; +import org.eclipse.jetty.http.HttpMethod; import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.util.StringUtil; @@ -56,7 +57,7 @@ public class DefaultRestClient extends AbstractClientBase implements RestClient private ObjectMapper objectMapper; private XStream xStream; -public DefaultRestClient(HttpClient httpClient, String version, PayloadFormat format, SalesforceSession session) +public DefaultRestClient(SalesforceHttpClient httpClient, String version, PayloadFormat format, SalesforceSession session) throws SalesforceException { super(version, session, httpClient); @@ -72,36 +73,32 @@ public class DefaultRestClient extends AbstractClientBase implements RestClient } @Override -protected void doHttpRequest(ContentExchange request, ClientResponseCallback callback) { +protected void doHttpRequest(Request request, ClientResponseCallback callback) { // set standard headers for all requests final String contentType = PayloadFormat.JSON.equals(format) ? APPLICATION_JSON_UTF8 : APPLICATION_XML_UTF8; -request.setRequestHeader(HttpHeaders.ACCEPT, contentType); -request.setRequestHeader(HttpHeaders.ACCEPT_CHARSET, StringUtil.__UTF8); +request.header(HttpHeader.ACCEPT, contentType); +request.header(HttpHeader.ACCEPT_CHARSET, StringUtil.__UTF8); // request content type and charset is set by the request entity super.doHttpRequest(request, callback); } @Override -protected SalesforceException createRestException(ContentExchange httpExchange, String reason) { +protected SalesforceException createRestException(Response response, InputStream responseContent) { // get status code and reason phrase -final int statusCode = httpExchange.getResponseStatus(); +final int statusCode = response.getStatus(); +String reason = response.getReason(); if (reason == null || reason.isEmpty()) { reason = HttpStatus.getMessage(statusCode); } // try parsing response according to format -String responseContent = null; try { -responseContent = httpExchange.getResponseContent(); -if (responseContent != null && !responseContent.isEmpty()) { +if (responseContent != null && responseContent.available() > 0) { final List choices; // return list of choices as error message for 300 if (statusCode == HttpStatus.MULTIPLE_CHOICES_300) { if (PayloadFormat.JSON.equals(format)) { -choices = objectMapper.readValue( -responseContent, new TypeReference() { -} -); +choices = objectMapper.readValue(responseContent, new TypeReference
() {}); } else { RestChoices restChoices = new RestChoices();
[3/4] camel git commit: CAMEL-9925: Updated Salesforce component to use Jetty9 and cometd3
CAMEL-9925: Updated Salesforce component to use Jetty9 and cometd3 Conflicts: components/camel-salesforce/camel-salesforce-component/pom.xml components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8dfd66bd Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8dfd66bd Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8dfd66bd Branch: refs/heads/camel-2.17.x Commit: 8dfd66bd731c6cea0885481f06e817dac0284b41 Parents: 7aa181a Author: Dhiraj BokdeAuthored: Thu Apr 28 19:20:18 2016 -0700 Committer: Dhiraj Bokde Committed: Thu Apr 28 22:13:34 2016 -0700 -- .../camel-salesforce-component/pom.xml | 31 +- .../salesforce/SalesforceComponent.java | 165 --- .../salesforce/SalesforceEndpointConfig.java| 12 +- .../salesforce/SalesforceHttpClient.java| 111 +++ .../component/salesforce/api/dto/Address.java | 10 + .../salesforce/api/dto/RestResources.java | 24 ++ .../salesforce/internal/SalesforceSession.java | 287 --- .../internal/client/AbstractClientBase.java | 195 +++-- .../client/DefaultAnalyticsApiClient.java | 95 +++--- .../internal/client/DefaultBulkApiClient.java | 93 +++--- .../internal/client/DefaultRestClient.java | 100 --- .../internal/client/SalesforceExchange.java | 36 --- .../internal/client/SalesforceHttpRequest.java | 38 +++ .../client/SalesforceSecurityHandler.java | 262 + .../client/SalesforceSecurityListener.java | 192 - .../internal/client/XStreamUtils.java | 2 +- .../processor/AbstractRestProcessor.java| 3 +- .../processor/AbstractSalesforceProcessor.java | 4 +- .../processor/AnalyticsApiProcessor.java| 3 +- .../internal/processor/JsonRestProcessor.java | 2 +- .../internal/processor/XmlRestProcessor.java| 8 +- .../internal/streaming/SubscriptionHelper.java | 38 +-- .../salesforce/AbstractBulkApiTestBase.java | 4 +- .../salesforce/AbstractSalesforceTestBase.java | 9 + .../salesforce/BulkApiIntegrationTest.java | 24 +- .../salesforce/HttpProxyIntegrationTest.java| 44 ++- .../salesforce/RestApiIntegrationTest.java | 79 +++-- .../internal/SessionIntegrationTest.java| 12 +- .../camel-salesforce-maven-plugin/pom.xml | 20 +- .../apache/camel/maven/CamelSalesforceMojo.java | 128 +++-- .../maven/HttpProxyMojoIntegrationTest.java | 43 ++- components/camel-salesforce/pom.xml | 1 + parent/pom.xml | 2 +- 33 files changed, 1263 insertions(+), 814 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/8dfd66bd/components/camel-salesforce/camel-salesforce-component/pom.xml -- diff --git a/components/camel-salesforce/camel-salesforce-component/pom.xml b/components/camel-salesforce/camel-salesforce-component/pom.xml index 83c5a0a..b15fea8 100644 --- a/components/camel-salesforce/camel-salesforce-component/pom.xml +++ b/components/camel-salesforce/camel-salesforce-component/pom.xml @@ -50,17 +50,22 @@ org.eclipse.jetty jetty-client - ${jetty-version} + ${jetty9-version} org.eclipse.jetty jetty-util - ${jetty-version} + ${jetty9-version} + + + org.eclipse.jetty + jetty-util-ajax + ${jetty9-version} org.eclipse.jetty jetty-io - ${jetty-version} + ${jetty9-version} org.codehaus.jackson @@ -78,11 +83,11 @@ org.eclipse.jetty - jetty-util + * - org.eclipse.jetty - jetty-io + org.slf4j + slf4j-api @@ -122,7 +127,19 @@ org.eclipse.jetty jetty-server - ${jetty-version} + ${jetty9-version} + test + + + org.eclipse.jetty + jetty-servlet + ${jetty9-version} + test + + + org.eclipse.jetty + jetty-proxy + ${jetty9-version} test http://git-wip-us.apache.org/repos/asf/camel/blob/8dfd66bd/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java -- diff --git
camel git commit: CAMEL-9925: Fixed CS errors
Repository: camel Updated Branches: refs/heads/master ec90c0b4b -> 09ff7ed1a CAMEL-9925: Fixed CS errors Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/09ff7ed1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/09ff7ed1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/09ff7ed1 Branch: refs/heads/master Commit: 09ff7ed1a5203eb7bfe1d404dc7454e1cae6bbe2 Parents: ec90c0b Author: Dhiraj BokdeAuthored: Thu Apr 28 22:49:01 2016 -0700 Committer: Dhiraj Bokde Committed: Thu Apr 28 22:49:01 2016 -0700 -- .../client/DefaultAnalyticsApiClient.java | 48 ++-- .../internal/client/DefaultRestClient.java | 2 +- .../client/SalesforceSecurityHandler.java | 9 ++-- .../processor/AbstractSalesforceProcessor.java | 2 +- .../internal/streaming/SubscriptionHelper.java | 5 +- .../apache/camel/maven/CamelSalesforceMojo.java | 8 ++-- 6 files changed, 38 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/09ff7ed1/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultAnalyticsApiClient.java -- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultAnalyticsApiClient.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultAnalyticsApiClient.java index f6e72dc..29c7c70 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultAnalyticsApiClient.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultAnalyticsApiClient.java @@ -61,16 +61,16 @@ public class DefaultAnalyticsApiClient extends AbstractClientBase implements Ana @Override public void getRecentReports(final RecentReportsResponseCallback callback) { -final Request Request = getRequest(HttpMethod.GET, reportsUrl()); +final Request request = getRequest(HttpMethod.GET, reportsUrl()); -doHttpRequest(Request, new ClientResponseCallback() { +doHttpRequest(request, new ClientResponseCallback() { @Override @SuppressWarnings("unchecked") public void onResponse(InputStream response, SalesforceException ex) { List recentReports = null; if (response != null) { try { -recentReports = unmarshalResponse(response, Request, +recentReports = unmarshalResponse(response, request, new TypeReference () { } ); @@ -86,14 +86,14 @@ public class DefaultAnalyticsApiClient extends AbstractClientBase implements Ana @Override public void getReportDescription(String reportId, final ReportDescriptionResponseCallback callback) { -final Request Request = getRequest(HttpMethod.GET, reportsDescribeUrl(reportId)); +final Request request = getRequest(HttpMethod.GET, reportsDescribeUrl(reportId)); -doHttpRequest(Request, new ClientResponseCallback() { +doHttpRequest(request, new ClientResponseCallback() { @Override public void onResponse(InputStream response, SalesforceException ex) { ReportDescription reportDescription = null; try { -reportDescription = unmarshalResponse(response, Request, ReportDescription.class); +reportDescription = unmarshalResponse(response, request, ReportDescription.class); } catch (SalesforceException e) { ex = e; } @@ -107,28 +107,28 @@ public class DefaultAnalyticsApiClient extends AbstractClientBase implements Ana final ReportResultsResponseCallback callback) { final boolean useGet = reportMetadata == null; -final Request Request = getRequest( +final Request request = getRequest( useGet ? HttpMethod.GET : HttpMethod.POST, reportsUrl(reportId, includeDetails)); // set POST data if (!useGet) { try { // wrap reportMetadata in a map -final HashMap
request = new HashMap (); -request.put("reportMetadata", reportMetadata); -marshalRequest(request, Request); +final
[1/3] camel git commit: CAMEL-9925: Updated Salesforce component to use Jetty9 and cometd3
Repository: camel Updated Branches: refs/heads/master ff713bd48 -> ec90c0b4b http://git-wip-us.apache.org/repos/asf/camel/blob/ec90c0b4/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java -- diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java index 9fdadb8..995a810 100644 --- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java +++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/main/java/org/apache/camel/maven/CamelSalesforceMojo.java @@ -21,6 +21,7 @@ import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.lang.reflect.Field; +import java.net.URI; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.Collections; @@ -37,6 +38,7 @@ import java.util.concurrent.TimeUnit; import java.util.regex.Pattern; import org.apache.camel.component.salesforce.SalesforceEndpointConfig; +import org.apache.camel.component.salesforce.SalesforceHttpClient; import org.apache.camel.component.salesforce.SalesforceLoginConfig; import org.apache.camel.component.salesforce.api.SalesforceException; import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase; @@ -66,10 +68,13 @@ import org.apache.velocity.runtime.RuntimeConstants; import org.apache.velocity.runtime.log.Log4JLogChute; import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader; import org.codehaus.jackson.map.ObjectMapper; -import org.eclipse.jetty.client.Address; -import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.client.RedirectListener; -import org.eclipse.jetty.client.security.ProxyAuthorization; +import org.eclipse.jetty.client.HttpProxy; +import org.eclipse.jetty.client.Origin; +import org.eclipse.jetty.client.ProxyConfiguration; +import org.eclipse.jetty.client.Socks4Proxy; +import org.eclipse.jetty.client.api.Authentication; +import org.eclipse.jetty.client.util.BasicAuthentication; +import org.eclipse.jetty.client.util.DigestAuthentication; import org.eclipse.jetty.util.ssl.SslContextFactory; /** @@ -116,6 +121,30 @@ public class CamelSalesforceMojo extends AbstractMojo { protected Integer httpProxyPort; /** + * Is it a SOCKS4 Proxy? + */ +@Parameter(property = "camelSalesforce.isHttpProxySocks4") +private boolean isHttpProxySocks4; + +/** + * Is HTTP Proxy secure, i.e. using secure sockets, true by default. + */ +@Parameter(property = "camelSalesforce.isHttpProxySecure") +private boolean isHttpProxySecure = true; + +/** + * Addresses to Proxy. + */ +@Parameter(property = "camelSalesforce.httpProxyIncludedAddresses") +private Set httpProxyIncludedAddresses; + +/** + * Addresses to NOT Proxy. + */ +@Parameter(property = "camelSalesforce.httpProxyIncludedAddresses") +private Set httpProxyExcludedAddresses; + +/** * Proxy authentication username. */ @Parameter(property = "camelSalesforce.httpProxyUsername") @@ -128,6 +157,24 @@ public class CamelSalesforceMojo extends AbstractMojo { protected String httpProxyPassword; /** + * Proxy authentication URI. + */ +@Parameter(property = "camelSalesforce.httpProxyAuthUri") +protected String httpProxyAuthUri; + +/** + * Proxy authentication realm. + */ +@Parameter(property = "camelSalesforce.httpProxyRealm") +protected String httpProxyRealm; + +/** + * Proxy uses Digest authentication. + */ +@Parameter(property = "camelSalesforce.httpProxyUseDigestAuth") +protected boolean httpProxyUseDigestAuth; + +/** * Salesforce client id. */ @Parameter(property = "camelSalesforce.clientId", required = true) @@ -224,10 +271,8 @@ public class CamelSalesforceMojo extends AbstractMojo { } // connect to Salesforce -final HttpClient httpClient = createHttpClient(); - -final SalesforceSession session = new SalesforceSession(httpClient, -new SalesforceLoginConfig(loginUrl, clientId, clientSecret, userName, password, false)); +final SalesforceHttpClient httpClient = createHttpClient(); +final SalesforceSession session = httpClient.getSession(); getLog().info("Salesforce login..."); try { @@ -417,28 +462,33 @@ public class CamelSalesforceMojo extends AbstractMojo { getLog().info(String.format("Found %s matching Objects", objectNames.size())); } -protected HttpClient createHttpClient() throws MojoExecutionException { +protected SalesforceHttpClient createHttpClient() throws
[3/3] camel git commit: CAMEL-9925: Updated Salesforce component to use Jetty9 and cometd3
CAMEL-9925: Updated Salesforce component to use Jetty9 and cometd3 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ec90c0b4 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ec90c0b4 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ec90c0b4 Branch: refs/heads/master Commit: ec90c0b4b2c73f6323e1c320327cffa00d3e4b98 Parents: ff713bd Author: Dhiraj BokdeAuthored: Thu Apr 28 19:20:18 2016 -0700 Committer: Dhiraj Bokde Committed: Thu Apr 28 19:47:05 2016 -0700 -- .../camel-salesforce-component/pom.xml | 34 ++- .../salesforce/SalesforceComponent.java | 165 --- .../salesforce/SalesforceEndpointConfig.java| 12 +- .../salesforce/SalesforceHttpClient.java| 111 +++ .../component/salesforce/api/dto/Address.java | 10 + .../salesforce/api/dto/RestResources.java | 24 ++ .../salesforce/internal/SalesforceSession.java | 287 --- .../internal/client/AbstractClientBase.java | 195 +++-- .../client/DefaultAnalyticsApiClient.java | 95 +++--- .../internal/client/DefaultBulkApiClient.java | 93 +++--- .../internal/client/DefaultRestClient.java | 100 --- .../internal/client/SalesforceExchange.java | 36 --- .../internal/client/SalesforceHttpRequest.java | 38 +++ .../client/SalesforceSecurityHandler.java | 262 + .../client/SalesforceSecurityListener.java | 192 - .../internal/client/XStreamUtils.java | 2 +- .../processor/AbstractRestProcessor.java| 3 +- .../processor/AbstractSalesforceProcessor.java | 4 +- .../processor/AnalyticsApiProcessor.java| 3 +- .../internal/processor/JsonRestProcessor.java | 2 +- .../internal/processor/XmlRestProcessor.java| 8 +- .../internal/streaming/SubscriptionHelper.java | 38 +-- .../salesforce/AbstractBulkApiTestBase.java | 4 +- .../salesforce/AbstractSalesforceTestBase.java | 9 + .../salesforce/BulkApiIntegrationTest.java | 24 +- .../salesforce/HttpProxyIntegrationTest.java| 44 ++- .../salesforce/RestApiIntegrationTest.java | 79 +++-- .../internal/SessionIntegrationTest.java| 12 +- .../camel-salesforce-maven-plugin/pom.xml | 25 +- .../apache/camel/maven/CamelSalesforceMojo.java | 128 +++-- .../maven/HttpProxyMojoIntegrationTest.java | 43 ++- components/camel-salesforce/pom.xml | 1 + parent/pom.xml | 2 +- 33 files changed, 1263 insertions(+), 822 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/ec90c0b4/components/camel-salesforce/camel-salesforce-component/pom.xml -- diff --git a/components/camel-salesforce/camel-salesforce-component/pom.xml b/components/camel-salesforce/camel-salesforce-component/pom.xml index 79267a0..ac12d73 100644 --- a/components/camel-salesforce/camel-salesforce-component/pom.xml +++ b/components/camel-salesforce/camel-salesforce-component/pom.xml @@ -31,9 +31,6 @@ Camel Salesforce support - -8.1.17.v20150415 - org.joda.time.*;version="[1.6,3)" @@ -53,17 +50,22 @@ org.eclipse.jetty jetty-client - ${jetty8-version} + ${jetty9-version} org.eclipse.jetty jetty-util - ${jetty8-version} + ${jetty9-version} + + + org.eclipse.jetty + jetty-util-ajax + ${jetty9-version} org.eclipse.jetty jetty-io - ${jetty8-version} + ${jetty9-version} org.codehaus.jackson @@ -81,11 +83,11 @@ org.eclipse.jetty - jetty-util + * - org.eclipse.jetty - jetty-io + org.slf4j + slf4j-api @@ -125,7 +127,19 @@ org.eclipse.jetty jetty-server - ${jetty8-version} + ${jetty9-version} + test + + + org.eclipse.jetty + jetty-servlet + ${jetty9-version} + test + + + org.eclipse.jetty + jetty-proxy + ${jetty9-version} test http://git-wip-us.apache.org/repos/asf/camel/blob/ec90c0b4/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java -- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java
[2/3] camel git commit: CAMEL-9925: Updated Salesforce component to use Jetty9 and cometd3
http://git-wip-us.apache.org/repos/asf/camel/blob/ec90c0b4/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java -- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java index 2dade18..9eb6e0c 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java +++ b/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/client/DefaultRestClient.java @@ -26,6 +26,7 @@ import java.util.Map; import com.thoughtworks.xstream.XStream; +import org.apache.camel.component.salesforce.SalesforceHttpClient; import org.apache.camel.component.salesforce.api.SalesforceException; import org.apache.camel.component.salesforce.api.SalesforceMultipleChoicesException; import org.apache.camel.component.salesforce.api.dto.RestError; @@ -37,11 +38,11 @@ import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.URISupport; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.type.TypeReference; -import org.eclipse.jetty.client.ContentExchange; -import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.client.HttpExchange; -import org.eclipse.jetty.http.HttpHeaders; -import org.eclipse.jetty.http.HttpMethods; +import org.eclipse.jetty.client.api.Request; +import org.eclipse.jetty.client.api.Response; +import org.eclipse.jetty.client.util.InputStreamContentProvider; +import org.eclipse.jetty.http.HttpHeader; +import org.eclipse.jetty.http.HttpMethod; import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.util.StringUtil; @@ -56,7 +57,7 @@ public class DefaultRestClient extends AbstractClientBase implements RestClient private ObjectMapper objectMapper; private XStream xStream; -public DefaultRestClient(HttpClient httpClient, String version, PayloadFormat format, SalesforceSession session) +public DefaultRestClient(SalesforceHttpClient httpClient, String version, PayloadFormat format, SalesforceSession session) throws SalesforceException { super(version, session, httpClient); @@ -72,36 +73,32 @@ public class DefaultRestClient extends AbstractClientBase implements RestClient } @Override -protected void doHttpRequest(ContentExchange request, ClientResponseCallback callback) { +protected void doHttpRequest(Request request, ClientResponseCallback callback) { // set standard headers for all requests final String contentType = PayloadFormat.JSON.equals(format) ? APPLICATION_JSON_UTF8 : APPLICATION_XML_UTF8; -request.setRequestHeader(HttpHeaders.ACCEPT, contentType); -request.setRequestHeader(HttpHeaders.ACCEPT_CHARSET, StringUtil.__UTF8); +request.header(HttpHeader.ACCEPT, contentType); +request.header(HttpHeader.ACCEPT_CHARSET, StringUtil.__UTF8); // request content type and charset is set by the request entity super.doHttpRequest(request, callback); } @Override -protected SalesforceException createRestException(ContentExchange httpExchange, String reason) { +protected SalesforceException createRestException(Response response, InputStream responseContent) { // get status code and reason phrase -final int statusCode = httpExchange.getResponseStatus(); +final int statusCode = response.getStatus(); +String reason = response.getReason(); if (reason == null || reason.isEmpty()) { reason = HttpStatus.getMessage(statusCode); } // try parsing response according to format -String responseContent = null; try { -responseContent = httpExchange.getResponseContent(); -if (responseContent != null && !responseContent.isEmpty()) { +if (responseContent != null && responseContent.available() > 0) { final List choices; // return list of choices as error message for 300 if (statusCode == HttpStatus.MULTIPLE_CHOICES_300) { if (PayloadFormat.JSON.equals(format)) { -choices = objectMapper.readValue( -responseContent, new TypeReference() { -} -); +choices = objectMapper.readValue(responseContent, new TypeReference
() {}); } else { RestChoices restChoices = new RestChoices();
[1/2] camel git commit: Fixed CS
Repository: camel Updated Branches: refs/heads/master 935f36603 -> ff713bd48 Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c0577628 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c0577628 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c0577628 Branch: refs/heads/master Commit: c0577628bfcded46000faa6518f5826ccdbbde64 Parents: 935f366 Author: Claus IbsenAuthored: Thu Apr 28 18:32:48 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 21:05:16 2016 +0200 -- .../org/apache/camel/test/spring/CamelAnnotationsHandler.java | 6 +++--- .../camel/test/spring/CamelSpringBootExecutionListener.java| 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c0577628/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java -- diff --git a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java index 596a061..8902f4f 100644 --- a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java +++ b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java @@ -5,9 +5,9 @@ * 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 - * + * + * 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. http://git-wip-us.apache.org/repos/asf/camel/blob/c0577628/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootExecutionListener.java -- diff --git a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootExecutionListener.java b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootExecutionListener.java index a7e92b9..c17a421 100644 --- a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootExecutionListener.java +++ b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootExecutionListener.java @@ -5,9 +5,9 @@ * 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 - * + * + * 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.
[2/2] camel git commit: Fixed CS
Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ff713bd4 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ff713bd4 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ff713bd4 Branch: refs/heads/master Commit: ff713bd48993ea4458a0069a3c7a81cf2a2180ff Parents: c057762 Author: Claus IbsenAuthored: Thu Apr 28 21:04:10 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 21:05:49 2016 +0200 -- .../java/org/apache/camel/component/etcd/EtcdWatchConsumer.java | 2 +- .../test/java/org/apache/camel/component/etcd/EtcdWatchTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/ff713bd4/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdWatchConsumer.java -- diff --git a/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdWatchConsumer.java b/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdWatchConsumer.java index 2a197b3..0067f49 100644 --- a/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdWatchConsumer.java +++ b/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdWatchConsumer.java @@ -126,7 +126,7 @@ public class EtcdWatchConsumer extends AbstractEtcdConsumer implements ResponseP } } -if (throwable != null){ +if (throwable != null) { handleException("Error processing etcd response", throwable); } http://git-wip-us.apache.org/repos/asf/camel/blob/ff713bd4/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/EtcdWatchTest.java -- diff --git a/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/EtcdWatchTest.java b/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/EtcdWatchTest.java index 60cea00..c511325 100644 --- a/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/EtcdWatchTest.java +++ b/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/EtcdWatchTest.java @@ -78,7 +78,7 @@ public class EtcdWatchTest extends EtcdTest { private void testWatch(String mockEndpoint, final String key, int updates) throws Exception { final String[] values = new String[updates]; -for (int i = 0; i< updates; i++) { +for (int i = 0; i < updates; i++) { values[i] = key + "=myValue-" + i; } @@ -89,7 +89,7 @@ public class EtcdWatchTest extends EtcdTest { mock.expectedBodiesReceived(values); final EtcdClient client = getClient(); -for (int i = 0; i< updates; i++) { +for (int i = 0; i < updates; i++) { client.put(key, "myValue-" + i).send().get(); }
[1/4] camel git commit: Fixed CS
Repository: camel Updated Branches: refs/heads/camel-2.17.x 357ab2e96 -> 7aa181a4d Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/63f64c7d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/63f64c7d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/63f64c7d Branch: refs/heads/camel-2.17.x Commit: 63f64c7d4f4d2a483cb903723faf7f68316325c4 Parents: 357ab2e Author: Claus IbsenAuthored: Thu Apr 28 19:26:39 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 19:26:39 2016 +0200 -- .../apache/camel/component/cxf/CxfConsumer.java | 422 ++- ...nsumerDuplicateNamespaceStreamCacheTest.java | 2 +- .../camel/http/common/HttpCommonEndpoint.java | 6 +- 3 files changed, 221 insertions(+), 209 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/63f64c7d/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java -- diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java index 4c29f8a..11ec2f2 100644 --- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java +++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConsumer.java @@ -64,210 +64,7 @@ public class CxfConsumer extends DefaultConsumer { cxfEndpoint = endpoint; // create server ServerFactoryBean svrBean = endpoint.createServerFactoryBean(); -svrBean.setInvoker(new Invoker() { -// we receive a CXF request when this method is called -public Object invoke(Exchange cxfExchange, Object o) { -LOG.trace("Received CXF Request: {}", cxfExchange); -Continuation continuation; -if (!endpoint.isSynchronous() && isAsyncInvocationSupported(cxfExchange) -&& (continuation = getContinuation(cxfExchange)) != null) { -LOG.trace("Calling the Camel async processors."); -return asyncInvoke(cxfExchange, continuation); -} else { -LOG.trace("Calling the Camel sync processors."); -return syncInvoke(cxfExchange); -} -} -// NOTE this code cannot work with CXF 2.2.x and JMSContinuation -// as it doesn't break out the interceptor chain when we call it -private Object asyncInvoke(Exchange cxfExchange, final Continuation continuation) { -synchronized (continuation) { -if (continuation.isNew()) { -final org.apache.camel.Exchange camelExchange = prepareCamelExchange(cxfExchange); - -// Now we don't set up the timeout value -LOG.trace("Suspending continuation of exchangeId: {}", camelExchange.getExchangeId()); - -// The continuation could be called before the suspend is called - continuation.suspend(cxfEndpoint.getContinuationTimeout()); - -// use the asynchronous API to process the exchange -getAsyncProcessor().process(camelExchange, new AsyncCallback() { -public void done(boolean doneSync) { -// make sure the continuation resume will not be called before the suspend method in other thread -synchronized (continuation) { -LOG.trace("Resuming continuation of exchangeId: {}", camelExchange.getExchangeId()); -// resume processing after both, sync and async callbacks -continuation.setObject(camelExchange); -continuation.resume(); -} -} -}); - -} else if (continuation.isResumed()) { -org.apache.camel.Exchange camelExchange = (org.apache.camel.Exchange)continuation.getObject(); -try { -setResponseBack(cxfExchange, camelExchange); -} finally { -CxfConsumer.this.doneUoW(camelExchange); -} - -} -} -return null; -} -private Continuation getContinuation(Exchange cxfExchange) { -
[4/4] camel git commit: Component docs
Component docs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7aa181a4 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7aa181a4 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7aa181a4 Branch: refs/heads/camel-2.17.x Commit: 7aa181a4d1c14378dbc046b0a83cfb4fac3fd1e6 Parents: 7459007 Author: Claus IbsenAuthored: Thu Apr 28 21:04:23 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 21:04:23 2016 +0200 -- components/camel-etcd/src/main/docs/etcd.adoc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/7aa181a4/components/camel-etcd/src/main/docs/etcd.adoc -- diff --git a/components/camel-etcd/src/main/docs/etcd.adoc b/components/camel-etcd/src/main/docs/etcd.adoc index d19db9f..3632b0d 100644 --- a/components/camel-etcd/src/main/docs/etcd.adoc +++ b/components/camel-etcd/src/main/docs/etcd.adoc @@ -8,8 +8,9 @@ + // endpoint options: START -The etcd component supports 14 endpoint options which are listed below: +The etcd component supports 15 endpoint options which are listed below: [width="100%",cols="2s,1,1m,1m,5",options="header"] |=== @@ -25,6 +26,7 @@ The etcd component supports 14 endpoint options which are listed below: | timeToLive | producer | | Integer | To set the lifespan of a key in milliseconds. | exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). +| fromIndex | advance | 0 | Long | The index to watch from | password | security | | String | The password to use for basic authentication. | sslContextParameters | security | | SSLContextParameters | To configure security using SSLContextParameters. | userName | security | | String | The user name to use for basic authentication. @@ -40,6 +42,7 @@ The etcd component supports 14 endpoint options which are listed below: + // component options: START The etcd component has no options. // component options: END
[2/4] camel git commit: Fixed CS
Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f64562ba Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f64562ba Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f64562ba Branch: refs/heads/camel-2.17.x Commit: f64562ba18a601a14f906f229c0041d9af6c8ef8 Parents: 63f64c7 Author: Claus IbsenAuthored: Thu Apr 28 20:00:26 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 20:00:26 2016 +0200 -- components/camel-aws/src/main/docs/aws-s3.adoc | 4 +++- .../CxfPayloadConsumerDuplicateNamespaceStreamCacheTest.java | 6 -- .../apache/camel/spring/boot/mockendpoints/AdviceWithTest.java | 6 +++--- .../camel/spring/boot/mockendpoints/MockEndpointsTest.java | 6 +++--- .../org/apache/camel/spring/boot/mockendpoints/MyRoute.java| 6 +++--- 5 files changed, 16 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/f64562ba/components/camel-aws/src/main/docs/aws-s3.adoc -- diff --git a/components/camel-aws/src/main/docs/aws-s3.adoc b/components/camel-aws/src/main/docs/aws-s3.adoc index dd207a6..dbaba40 100644 --- a/components/camel-aws/src/main/docs/aws-s3.adoc +++ b/components/camel-aws/src/main/docs/aws-s3.adoc @@ -30,6 +30,7 @@ The bucket will be created if it don't already exists. + URI Options ^^^ + // endpoint options: START The AWS S3 Storage Service component supports 38 endpoint options which are listed below: @@ -45,7 +46,7 @@ The AWS S3 Storage Service component supports 38 endpoint options which are list | proxyPort | common | | Integer | Camel 2.16: Specify a proxy port to be used inside the client definition. | secretKey | common | | String | Amazon AWS Secret Key | bridgeErrorHandler | consumer | false | boolean | 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/ERROR level and ignored. -| deleteAfterRead | consumer | true | boolean | Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committed. If a rollback occurs the object is not deleted. +| deleteAfterRead | consumer | true | boolean | Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committed. If a rollback occurs the object is not deleted. If this option is false then the same objects will be retrieve over and over again on the polls. Therefore you need to use the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using the link S3ConstantsBUCKET_NAME and link S3ConstantsKEY headers or only the link S3ConstantsKEY header. | fileName | consumer | | String | To get the object from the bucket with the given file name | includeBody | consumer | true | boolean | Camel 2.17: If it is true the exchange body will be set to a stream to the contents of the file. If false the headers will be set with the S3 object metadata but the body will be null. | maxMessagesPerPoll | consumer | 10 | int | Gets the maximum number of messages as a limit to poll at each polling. Is default unlimited but use 0 or negative number to disable it as unlimited. @@ -78,6 +79,7 @@ The AWS S3 Storage Service component supports 38 endpoint options which are list // endpoint options: END + |=== Required S3 component options http://git-wip-us.apache.org/repos/asf/camel/blob/f64562ba/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayloadConsumerDuplicateNamespaceStreamCacheTest.java -- diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayloadConsumerDuplicateNamespaceStreamCacheTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayloadConsumerDuplicateNamespaceStreamCacheTest.java index 3e258c8..351c349 100644 --- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayloadConsumerDuplicateNamespaceStreamCacheTest.java +++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayloadConsumerDuplicateNamespaceStreamCacheTest.java @@ -24,8 +24,10 @@ public class CxfPayloadConsumerDuplicateNamespaceStreamCacheTest extends CxfPayl * payload. If this is set another time from the envelope, the result will *
[3/4] camel git commit: Fixed CS
Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7459007d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7459007d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7459007d Branch: refs/heads/camel-2.17.x Commit: 7459007d12aa37276ede6d7a7ed0257c0e001eaf Parents: f64562b Author: Claus IbsenAuthored: Thu Apr 28 21:04:10 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 21:04:10 2016 +0200 -- .../java/org/apache/camel/component/etcd/EtcdWatchConsumer.java | 2 +- .../test/java/org/apache/camel/component/etcd/EtcdWatchTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/7459007d/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdWatchConsumer.java -- diff --git a/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdWatchConsumer.java b/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdWatchConsumer.java index 9f85a0a..153cbdb 100644 --- a/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdWatchConsumer.java +++ b/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/EtcdWatchConsumer.java @@ -128,7 +128,7 @@ public class EtcdWatchConsumer extends AbstractEtcdConsumer implements ResponseP } } -if (throwable != null){ +if (throwable != null) { handleException("Error processing etcd response", throwable); } http://git-wip-us.apache.org/repos/asf/camel/blob/7459007d/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/EtcdWatchTest.java -- diff --git a/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/EtcdWatchTest.java b/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/EtcdWatchTest.java index 60cea00..c511325 100644 --- a/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/EtcdWatchTest.java +++ b/components/camel-etcd/src/test/java/org/apache/camel/component/etcd/EtcdWatchTest.java @@ -78,7 +78,7 @@ public class EtcdWatchTest extends EtcdTest { private void testWatch(String mockEndpoint, final String key, int updates) throws Exception { final String[] values = new String[updates]; -for (int i = 0; i< updates; i++) { +for (int i = 0; i < updates; i++) { values[i] = key + "=myValue-" + i; } @@ -89,7 +89,7 @@ public class EtcdWatchTest extends EtcdTest { mock.expectedBodiesReceived(values); final EtcdClient client = getClient(); -for (int i = 0; i< updates; i++) { +for (int i = 0; i < updates; i++) { client.put(key, "myValue-" + i).send().get(); }
[2/2] camel git commit: Fixed CS
Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/357ab2e9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/357ab2e9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/357ab2e9 Branch: refs/heads/camel-2.17.x Commit: 357ab2e965fff601a13ed426b31451c640f94525 Parents: c1c8870 Author: Claus IbsenAuthored: Thu Apr 28 18:32:48 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 18:32:48 2016 +0200 -- .../java/org/apache/camel/cdi/test/NoCamelContextTest.java | 8 .../apache/camel/test/spring/CamelAnnotationsHandler.java| 6 +++--- .../camel/test/spring/CamelSpringBootExecutionListener.java | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/357ab2e9/components/camel-cdi/src/test/java/org/apache/camel/cdi/test/NoCamelContextTest.java -- diff --git a/components/camel-cdi/src/test/java/org/apache/camel/cdi/test/NoCamelContextTest.java b/components/camel-cdi/src/test/java/org/apache/camel/cdi/test/NoCamelContextTest.java index c1d85ad..fbdbf3d 100644 --- a/components/camel-cdi/src/test/java/org/apache/camel/cdi/test/NoCamelContextTest.java +++ b/components/camel-cdi/src/test/java/org/apache/camel/cdi/test/NoCamelContextTest.java @@ -16,6 +16,10 @@ */ package org.apache.camel.cdi.test; +import javax.enterprise.inject.Any; +import javax.enterprise.inject.Instance; +import javax.inject.Inject; + import org.apache.camel.CamelContext; import org.apache.camel.cdi.CdiCamelExtension; import org.jboss.arquillian.container.test.api.Deployment; @@ -27,10 +31,6 @@ import org.jboss.shrinkwrap.api.spec.JavaArchive; import org.junit.Test; import org.junit.runner.RunWith; -import javax.enterprise.inject.Any; -import javax.enterprise.inject.Instance; -import javax.inject.Inject; - import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; http://git-wip-us.apache.org/repos/asf/camel/blob/357ab2e9/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java -- diff --git a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java index 596a061..8902f4f 100644 --- a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java +++ b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java @@ -5,9 +5,9 @@ * 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 - * + * + * 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. http://git-wip-us.apache.org/repos/asf/camel/blob/357ab2e9/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootExecutionListener.java -- diff --git a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootExecutionListener.java b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootExecutionListener.java index a7e92b9..c17a421 100644 --- a/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootExecutionListener.java +++ b/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringBootExecutionListener.java @@ -5,9 +5,9 @@ * 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 - * + * + * 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.
[1/2] camel git commit: Fixed CS
Repository: camel Updated Branches: refs/heads/camel-2.17.x ccc03cdc8 -> 357ab2e96 Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c1c88708 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c1c88708 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c1c88708 Branch: refs/heads/camel-2.17.x Commit: c1c88708d630f011855adf23cc690af9392a5490 Parents: ccc03cd Author: Claus IbsenAuthored: Thu Apr 28 18:18:13 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 18:18:13 2016 +0200 -- .../src/main/java/org/apache/camel/processor/ThreadsProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c1c88708/camel-core/src/main/java/org/apache/camel/processor/ThreadsProcessor.java -- diff --git a/camel-core/src/main/java/org/apache/camel/processor/ThreadsProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/ThreadsProcessor.java index b3c6dc4..30bc399 100644 --- a/camel-core/src/main/java/org/apache/camel/processor/ThreadsProcessor.java +++ b/camel-core/src/main/java/org/apache/camel/processor/ThreadsProcessor.java @@ -112,7 +112,7 @@ public class ThreadsProcessor extends ServiceSupport implements AsyncProcessor, this.camelContext = camelContext; this.executorService = executorService; this.shutdownExecutorService = shutdownExecutorService; -this.rejectedPolicy =rejectedPolicy; +this.rejectedPolicy = rejectedPolicy; } public void process(final Exchange exchange) throws Exception {
[3/3] camel git commit: CAMEL-9200: Context component conflates endpoints with the same local id from different CamelContexts. Thanks to Aaron Birkland for the patch.
CAMEL-9200: Context component conflates endpoints with the same local id from different CamelContexts. Thanks to Aaron Birkland for the patch. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1b3b64a7 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1b3b64a7 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1b3b64a7 Branch: refs/heads/camel-2.16.x Commit: 1b3b64a750a913562b9dc89f0d7dc32f6c4020e2 Parents: fa3ec4d Author: Claus IbsenAuthored: Thu Apr 28 16:45:00 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 17:19:48 2016 +0200 -- .../org/apache/camel/impl/DefaultEndpoint.java | 5 +++- .../component/context/ContextEndpoint.java | 24 .../context/LocalContextComponent.java | 6 +++-- .../context/SpringDslContextComponentTest.java | 2 +- 4 files changed, 33 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/1b3b64a7/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java index ff8253c..eded370 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java @@ -147,7 +147,10 @@ public abstract class DefaultEndpoint extends ServiceSupport implements Endpoint public boolean equals(Object object) { if (object instanceof DefaultEndpoint) { DefaultEndpoint that = (DefaultEndpoint)object; -return ObjectHelper.equal(this.getEndpointUri(), that.getEndpointUri()); +// must also match the same CamelContext in case we compare endpoints from different contexts +String thisContextName = this.getCamelContext() != null ? this.getCamelContext().getName() : null; +String thatContextName = that.getCamelContext() != null ? that.getCamelContext().getName() : null; +return ObjectHelper.equal(this.getEndpointUri(), that.getEndpointUri()) && ObjectHelper.equal(thisContextName, thatContextName); } return false; } http://git-wip-us.apache.org/repos/asf/camel/blob/1b3b64a7/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java -- diff --git a/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java b/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java index 49dfddd..4704b1d 100644 --- a/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java +++ b/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java @@ -16,6 +16,9 @@ */ package org.apache.camel.component.context; +import java.util.Map; + +import org.apache.camel.CamelContext; import org.apache.camel.Component; import org.apache.camel.Consumer; import org.apache.camel.DelegateEndpoint; @@ -87,4 +90,25 @@ public class ContextEndpoint extends DefaultEndpoint implements DelegateEndpoint public boolean isSingleton() { return delegate.isSingleton(); } + +@Override +public void start() throws Exception { +// noop by purpose +} + +@Override +public void stop() throws Exception { +// noop by purpose +} + +@Override +public void configureProperties(Map options) { +// noop by purpose +} + +@Override +public void setCamelContext(CamelContext context) { +// noop by purpose +} + } http://git-wip-us.apache.org/repos/asf/camel/blob/1b3b64a7/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java -- diff --git a/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java b/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java index d341b4b..9ae64a7 100644 --- a/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java +++ b/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java @@ -78,7 +78,8 @@ public class LocalContextComponent extends DefaultComponent { Endpoint endpoint = map.get(remaining); if (endpoint != null) { logUsingEndpoint(uri, endpoint); -return endpoint; +return new
camel git commit: CAMEL-9200: Context component conflates endpoints with the same local id from different CamelContexts. Thanks to Aaron Birkland for the patch.
Repository: camel Updated Branches: refs/heads/camel-2.17.x 2de454fba -> ccc03cdc8 CAMEL-9200: Context component conflates endpoints with the same local id from different CamelContexts. Thanks to Aaron Birkland for the patch. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ccc03cdc Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ccc03cdc Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ccc03cdc Branch: refs/heads/camel-2.17.x Commit: ccc03cdc8af3ee69a1174dd0474a668b4a571858 Parents: 2de454f Author: Claus IbsenAuthored: Thu Apr 28 16:45:00 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 17:20:13 2016 +0200 -- .../org/apache/camel/impl/DefaultEndpoint.java | 5 +++- .../component/context/ContextEndpoint.java | 24 .../context/LocalContextComponent.java | 6 +++-- .../context/SpringDslContextComponentTest.java | 2 +- 4 files changed, 33 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/ccc03cdc/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java index ff8253c..eded370 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java @@ -147,7 +147,10 @@ public abstract class DefaultEndpoint extends ServiceSupport implements Endpoint public boolean equals(Object object) { if (object instanceof DefaultEndpoint) { DefaultEndpoint that = (DefaultEndpoint)object; -return ObjectHelper.equal(this.getEndpointUri(), that.getEndpointUri()); +// must also match the same CamelContext in case we compare endpoints from different contexts +String thisContextName = this.getCamelContext() != null ? this.getCamelContext().getName() : null; +String thatContextName = that.getCamelContext() != null ? that.getCamelContext().getName() : null; +return ObjectHelper.equal(this.getEndpointUri(), that.getEndpointUri()) && ObjectHelper.equal(thisContextName, thatContextName); } return false; } http://git-wip-us.apache.org/repos/asf/camel/blob/ccc03cdc/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java -- diff --git a/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java b/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java index 36ad929..ff88de6 100644 --- a/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java +++ b/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java @@ -16,6 +16,9 @@ */ package org.apache.camel.component.context; +import java.util.Map; + +import org.apache.camel.CamelContext; import org.apache.camel.Component; import org.apache.camel.Consumer; import org.apache.camel.DelegateEndpoint; @@ -96,4 +99,25 @@ public class ContextEndpoint extends DefaultEndpoint implements DelegateEndpoint public boolean isSingleton() { return delegate.isSingleton(); } + +@Override +public void start() throws Exception { +// noop by purpose +} + +@Override +public void stop() throws Exception { +// noop by purpose +} + +@Override +public void configureProperties(Map options) { +// noop by purpose +} + +@Override +public void setCamelContext(CamelContext context) { +// noop by purpose +} + } http://git-wip-us.apache.org/repos/asf/camel/blob/ccc03cdc/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java -- diff --git a/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java b/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java index d341b4b..9ae64a7 100644 --- a/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java +++ b/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java @@ -78,7 +78,8 @@ public class LocalContextComponent extends DefaultComponent { Endpoint endpoint = map.get(remaining); if (endpoint != null) {
[1/3] camel git commit: CAMEL-9200: Context component conflates endpoints with the same local id from different CamelContexts. Thanks to Aaron Birkland for the patch.
Repository: camel Updated Branches: refs/heads/camel-2.16.x fa3ec4d99 -> 1b3b64a75 refs/heads/master 017dffc37 -> 935f36603 CAMEL-9200: Context component conflates endpoints with the same local id from different CamelContexts. Thanks to Aaron Birkland for the patch. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3e903b35 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3e903b35 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3e903b35 Branch: refs/heads/master Commit: 3e903b355ccd2a743f3bc79ac31ff2c896b0a46a Parents: 017dffc Author: Claus IbsenAuthored: Thu Apr 28 16:45:00 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 16:45:16 2016 +0200 -- .../org/apache/camel/impl/DefaultEndpoint.java | 5 +++- .../component/context/ContextEndpoint.java | 24 .../context/LocalContextComponent.java | 6 +++-- .../context/SpringDslContextComponentTest.java | 2 +- 4 files changed, 33 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3e903b35/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java -- diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java index ff8253c..eded370 100644 --- a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java @@ -147,7 +147,10 @@ public abstract class DefaultEndpoint extends ServiceSupport implements Endpoint public boolean equals(Object object) { if (object instanceof DefaultEndpoint) { DefaultEndpoint that = (DefaultEndpoint)object; -return ObjectHelper.equal(this.getEndpointUri(), that.getEndpointUri()); +// must also match the same CamelContext in case we compare endpoints from different contexts +String thisContextName = this.getCamelContext() != null ? this.getCamelContext().getName() : null; +String thatContextName = that.getCamelContext() != null ? that.getCamelContext().getName() : null; +return ObjectHelper.equal(this.getEndpointUri(), that.getEndpointUri()) && ObjectHelper.equal(thisContextName, thatContextName); } return false; } http://git-wip-us.apache.org/repos/asf/camel/blob/3e903b35/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java -- diff --git a/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java b/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java index 36ad929..ff88de6 100644 --- a/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java +++ b/components/camel-context/src/main/java/org/apache/camel/component/context/ContextEndpoint.java @@ -16,6 +16,9 @@ */ package org.apache.camel.component.context; +import java.util.Map; + +import org.apache.camel.CamelContext; import org.apache.camel.Component; import org.apache.camel.Consumer; import org.apache.camel.DelegateEndpoint; @@ -96,4 +99,25 @@ public class ContextEndpoint extends DefaultEndpoint implements DelegateEndpoint public boolean isSingleton() { return delegate.isSingleton(); } + +@Override +public void start() throws Exception { +// noop by purpose +} + +@Override +public void stop() throws Exception { +// noop by purpose +} + +@Override +public void configureProperties(Map options) { +// noop by purpose +} + +@Override +public void setCamelContext(CamelContext context) { +// noop by purpose +} + } http://git-wip-us.apache.org/repos/asf/camel/blob/3e903b35/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java -- diff --git a/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java b/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java index d341b4b..9ae64a7 100644 --- a/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java +++ b/components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java @@ -78,7 +78,8 @@ public class LocalContextComponent extends DefaultComponent { Endpoint endpoint = map.get(remaining);
[2/3] camel git commit: Upgrade karaf
Upgrade karaf Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/935f3660 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/935f3660 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/935f3660 Branch: refs/heads/master Commit: 935f36603587c9c2b53607a7a66f96d6a14f2368 Parents: 3e903b3 Author: Claus IbsenAuthored: Thu Apr 28 17:03:54 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 17:03:54 2016 +0200 -- .../main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java | 2 +- parent/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/935f3660/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java -- diff --git a/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java b/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java index a2acca6..e75b278 100644 --- a/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java +++ b/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java @@ -249,7 +249,7 @@ public abstract class AbstractFeatureTest { } if (karafVersion == null) { // setup the default version of it -karafVersion = "4.0.4"; +karafVersion = "4.0.5"; } return karafVersion; } http://git-wip-us.apache.org/repos/asf/camel/blob/935f3660/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index ac5b391..02c9a49 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -352,7 +352,7 @@ 0.9.0.1_1 2.4.4 3.0.6 -4.0.4 +4.0.5 6.4.0.Final 0.4.9 1.3.83
svn commit: r986952 - in /websites/production/camel/content: cache/main.pageCache cdi.html
Author: buildbot Date: Thu Apr 28 15:18:53 2016 New Revision: 986952 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/cdi.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/cdi.html == --- websites/production/camel/content/cdi.html (original) +++ websites/production/camel/content/cdi.html Thu Apr 28 15:18:53 2016 @@ -510,7 +510,7 @@ for (CamelContext context : contexts) context.setUseBreadcrumb(true);]]> Maven ArchetypeAmong the availableCamel Maven archetypes, you can use the providedcamel-archetype-cdito generate a Camel CDI Maven project, e.g.: -Supported containersThe Camel CDI component is compatible with any CDI 1.0, CDI 1.1 and CDI 1.2 compliant runtime. It's been successfully tested against the following runtimes:ContainerVersionRuntimeWeld SE1.1.28.FinalCDI 1.0 / Java SE 7OpenWebBeans1.2.7CDI 1.0 / Java SE 7Weld S E2.3.3.FinalCDI 1.2 / Java SE 7OpenWebBeans1.6.3CDI 1.2 / Java SE 7WildFly8.2.1.FinalCDI 1.2 / Java EE 7WildFly9.0.1.FinalCDI 1.2 / Java EE 7Karaf2.4.4CDI 1.2 / OSGi 4 / PAX CDIKaraf3.0.5CDI 1.2 / OSGi 5 / PAX CDIKaraf4.0.4CDI 1.2 / OSGi 6 / PAX CDIExamplesThe following examples are available in the examples directory of the Camel project:ExampleDescriptioncamel-example-cdiIllustrates how to work with Camel using CDI to configure components, endpoints and beanscamel-example-cdi-metricsIllustrates the integration between Camel, Dropwizard Metrics and CDIcamel-example-cdi-propertiesIllustrates the integration between Camel, DeltaSpike and CDI for configuration propertiescamel-example-cdi-osgiACDI application using the SJMS component that can be executed inside an OSGi container using PAX CDIcamel-exampl e-cdi-testDemonstrates the testing features that are provided as part of the integration between Camel and CDIcamel-example-cdi-rest-servletIllustrates the Camel REST DSL being used in a Web application that uses CDI as dependency injection frameworkcamel-example-cdi-xmlIllustrates the use of Camel XML configuration files into a Camel CDI applicationcamel-example-widget-gadget-cdiThe Widget and Gadget use-case from the EIP book implemented in Java with CDI dependency injectioncamel-example-swagger-cdiAn example using REST DSL and Swagger Java with CDISee AlsoCamel CDI Testinghttp://www.cdi-spec.org; rel="nofollow">CDI Web sitehttp://www.cdi-spec.org/ecosystem/; rel="nofollow">CDI ecosystemhttps://github.com/astefanutti/further-cdi; rel="nofollow">Going further with CDI (See Camel CDI section) +Supported containersThe Camel CDI component is compatible with any CDI 1.0, CDI 1.1 and CDI 1.2 compliant runtime. It's been successfully tested against the following runtimes:ContainerVersionRuntimeWeld SE1.1.28.FinalCDI 1.0 / Java SE 7OpenWebBeans1.2.7CDI 1.0 / Java SE 7Weld S E2.3.4.FinalCDI 1.2 / Java SE 7OpenWebBeans1.6.3CDI 1.2 / Java SE 7WildFly8.2.1.FinalCDI 1.2 / Java EE 7WildFly9.0.1.FinalCDI 1.2 / Java EE 7WildFly10.0.0.FinalCDI 1.2 / Java EE 7Karaf2.4.4CDI 1.2 / OSGi 4 / PAX CDIKaraf3.0.5CDI 1.2 / OSGi 5 / PAX CDIKaraf4.0.4CDI 1.2 / OSGi 6 / PAX CDIExamplesThe following examples are available in the examples directory of the Camel project:ExampleDescriptioncamel-example-cdiIllustrates how to work with Camel using CDI to configure components, endpoints and beanscamel-example-cdi-metricsIllustrates the integration between Camel, Dropwizard Metrics and CDIcamel-example-cdi-propertiesIllustrates the integration between Camel, DeltaSpike and CDI for configuration propertiescamel-example-cdi-osgiACDI application using the SJMS component that can be executed inside an OSGi container using PAX CDIcamel-example-cdi-testDemonstrates the testing features that are provided as part of the integration between Camel and CDIcamel-example-cdi-rest-servletIllustrates the Camel REST DSL being used in a Web application that uses CDI as dependency injection frameworkcamel-example-cdi-xmlIllustrates the use of Camel XML configuration files into a Camel CDI application camel-example-widget-gadget-cdiThe Widget and Gadget use-case from the EIP book implemented in Java with CDI dependency injectioncamel-example-swagger-cdiAn example using REST DSL and Swagger Java with CDISee AlsoCamel CDI Testinghttp://www.cdi-spec.org; rel="nofollow">CDI Web sitehttp://www.cdi-spec.org/ecosystem/; rel="nofollow">CDI ecosystemhttps://github.com/astefanutti/further-cdi; rel="nofollow">Going further with CDI (See Camel CDI section)
camel git commit: Added missing OkHttp client 3 dependency in Jetty 8 too
Repository: camel Updated Branches: refs/heads/camel-2.17.x 0e9d9fee3 -> 2de454fba Added missing OkHttp client 3 dependency in Jetty 8 too Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2de454fb Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2de454fb Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2de454fb Branch: refs/heads/camel-2.17.x Commit: 2de454fbae90d28f6505c8a44a205ee05568711f Parents: 0e9d9fe Author: Andrea CosentinoAuthored: Thu Apr 28 16:39:03 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 16:39:26 2016 +0200 -- components/camel-jetty8/pom.xml | 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/2de454fb/components/camel-jetty8/pom.xml -- diff --git a/components/camel-jetty8/pom.xml b/components/camel-jetty8/pom.xml index 015a1f4..b38076d 100644 --- a/components/camel-jetty8/pom.xml +++ b/components/camel-jetty8/pom.xml @@ -97,6 +97,14 @@ ${jetty8-version} + + + com.squareup.okhttp3 + okhttp + ${okclient-version} + test + + org.apache.camel
camel git commit: Fix headers in Camel CDI examples
Repository: camel Updated Branches: refs/heads/master 38bbd4560 -> 017dffc37 Fix headers in Camel CDI examples Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/017dffc3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/017dffc3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/017dffc3 Branch: refs/heads/master Commit: 017dffc3728e8114e180f64806e0dce8d59dce23 Parents: 38bbd45 Author: Antonin StefanuttiAuthored: Thu Apr 28 16:19:35 2016 +0200 Committer: Antonin Stefanutti Committed: Thu Apr 28 16:19:57 2016 +0200 -- .../src/main/resources/jms.properties | 1 + .../META-INF/apache-deltaspike.properties | 1 + .../src/main/resources/META-INF/LICENSE.txt | 203 +++ .../src/main/resources/META-INF/NOTICE.txt | 11 + .../src/main/resources/config.properties| 1 + 5 files changed, 217 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/017dffc3/examples/camel-example-cdi-osgi/src/main/resources/jms.properties -- diff --git a/examples/camel-example-cdi-osgi/src/main/resources/jms.properties b/examples/camel-example-cdi-osgi/src/main/resources/jms.properties index cd6dc76..d0403ec 100644 --- a/examples/camel-example-cdi-osgi/src/main/resources/jms.properties +++ b/examples/camel-example-cdi-osgi/src/main/resources/jms.properties @@ -13,5 +13,6 @@ ## 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. +## --- jms.maxConnections=4 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/017dffc3/examples/camel-example-cdi-properties/src/main/resources/META-INF/apache-deltaspike.properties -- diff --git a/examples/camel-example-cdi-properties/src/main/resources/META-INF/apache-deltaspike.properties b/examples/camel-example-cdi-properties/src/main/resources/META-INF/apache-deltaspike.properties index 244b7fa..ac40543 100644 --- a/examples/camel-example-cdi-properties/src/main/resources/META-INF/apache-deltaspike.properties +++ b/examples/camel-example-cdi-properties/src/main/resources/META-INF/apache-deltaspike.properties @@ -13,6 +13,7 @@ ## 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. +## destination=direct:hello message=Hello \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/017dffc3/examples/camel-example-cdi-rest-servlet/src/main/resources/META-INF/LICENSE.txt -- diff --git a/examples/camel-example-cdi-rest-servlet/src/main/resources/META-INF/LICENSE.txt b/examples/camel-example-cdi-rest-servlet/src/main/resources/META-INF/LICENSE.txt new file mode 100644 index 000..6b0b127 --- /dev/null +++ b/examples/camel-example-cdi-rest-servlet/src/main/resources/META-INF/LICENSE.txt @@ -0,0 +1,203 @@ + + 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 +
camel git commit: CAMEL-6256: Re-creating xmpp connection should clear out old stale connection during creation so you do not get a non working connection next time. Thanks to Prakash Shetty for detai
Repository: camel Updated Branches: refs/heads/master 6051a0ea0 -> 38bbd4560 CAMEL-6256: Re-creating xmpp connection should clear out old stale connection during creation so you do not get a non working connection next time. Thanks to Prakash Shetty for details. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/38bbd456 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/38bbd456 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/38bbd456 Branch: refs/heads/master Commit: 38bbd4560c0252129543feafd6d3b5d038f525f9 Parents: 6051a0e Author: Claus IbsenAuthored: Thu Apr 28 16:03:53 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 16:04:59 2016 +0200 -- .../camel/component/xmpp/XmppEndpoint.java | 36 1 file changed, 21 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/38bbd456/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java -- diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java index 6ded5b3..3146940 100644 --- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java +++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java @@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory; public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrategyAware { private static final Logger LOG = LoggerFactory.getLogger(XmppEndpoint.class); -private XMPPConnection connection; +private volatile XMPPConnection connection; private XmppBinding binding; @UriPath @Metadata(required = "true") @@ -154,56 +154,62 @@ public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrateg public synchronized XMPPConnection createConnection() throws XMPPException, SmackException, IOException { if (connection != null && connection.isConnected()) { +// use existing working connection return connection; } -if (connection == null) { -connection = createConnectionInternal(); -} +// prepare for creating new connection +connection = null; + +LOG.trace("Creating new connection ..."); +XMPPConnection newConnection = createConnectionInternal(); -connection.connect(); +newConnection.connect(); -connection.addPacketListener(new XmppLogger("INBOUND"), new PacketFilter() { +newConnection.addPacketListener(new XmppLogger("INBOUND"), new PacketFilter() { public boolean accept(Packet packet) { return true; } }); -connection.addPacketSendingListener(new XmppLogger("OUTBOUND"), new PacketFilter() { +newConnection.addPacketSendingListener(new XmppLogger("OUTBOUND"), new PacketFilter() { public boolean accept(Packet packet) { return true; } }); -if (!connection.isAuthenticated()) { +if (!newConnection.isAuthenticated()) { if (user != null) { if (LOG.isDebugEnabled()) { -LOG.debug("Logging in to XMPP as user: {} on connection: {}", user, getConnectionMessage(connection)); +LOG.debug("Logging in to XMPP as user: {} on connection: {}", user, getConnectionMessage(newConnection)); } if (password == null) { -LOG.warn("No password configured for user: {} on connection: {}", user, getConnectionMessage(connection)); +LOG.warn("No password configured for user: {} on connection: {}", user, getConnectionMessage(newConnection)); } if (createAccount) { -AccountManager accountManager = AccountManager.getInstance(connection); +AccountManager accountManager = AccountManager.getInstance(newConnection); accountManager.createAccount(user, password); } if (login) { if (resource != null) { -connection.login(user, password, resource); +newConnection.login(user, password, resource); } else { -connection.login(user, password); +newConnection.login(user, password); } } } else { if (LOG.isDebugEnabled()) { -
[2/2] camel git commit: CAMEL-6256: Re-creating xmpp connection should clear out old stale connection during creation so you do not get a non working connection next time. Thanks to Prakash Shetty for
CAMEL-6256: Re-creating xmpp connection should clear out old stale connection during creation so you do not get a non working connection next time. Thanks to Prakash Shetty for details. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fa3ec4d9 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fa3ec4d9 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fa3ec4d9 Branch: refs/heads/camel-2.16.x Commit: fa3ec4d997aab907c820782a7ffbf17836993840 Parents: 6beac84 Author: Claus IbsenAuthored: Thu Apr 28 16:03:53 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 16:04:33 2016 +0200 -- .../camel/component/xmpp/XmppEndpoint.java | 36 1 file changed, 21 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/fa3ec4d9/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java -- diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java index a6659a1..d029054 100644 --- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java +++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java @@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory; public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrategyAware { private static final Logger LOG = LoggerFactory.getLogger(XmppEndpoint.class); -private XMPPConnection connection; +private volatile XMPPConnection connection; private XmppBinding binding; @UriPath @Metadata(required = "true") @@ -152,56 +152,62 @@ public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrateg public synchronized XMPPConnection createConnection() throws XMPPException, SmackException, IOException { if (connection != null && connection.isConnected()) { +// use existing working connection return connection; } -if (connection == null) { -connection = createConnectionInternal(); -} +// prepare for creating new connection +connection = null; + +LOG.trace("Creating new connection ..."); +XMPPConnection newConnection = createConnectionInternal(); -connection.connect(); +newConnection.connect(); -connection.addPacketListener(new XmppLogger("INBOUND"), new PacketFilter() { +newConnection.addPacketListener(new XmppLogger("INBOUND"), new PacketFilter() { public boolean accept(Packet packet) { return true; } }); -connection.addPacketSendingListener(new XmppLogger("OUTBOUND"), new PacketFilter() { +newConnection.addPacketSendingListener(new XmppLogger("OUTBOUND"), new PacketFilter() { public boolean accept(Packet packet) { return true; } }); -if (!connection.isAuthenticated()) { +if (!newConnection.isAuthenticated()) { if (user != null) { if (LOG.isDebugEnabled()) { -LOG.debug("Logging in to XMPP as user: {} on connection: {}", user, getConnectionMessage(connection)); +LOG.debug("Logging in to XMPP as user: {} on connection: {}", user, getConnectionMessage(newConnection)); } if (password == null) { -LOG.warn("No password configured for user: {} on connection: {}", user, getConnectionMessage(connection)); +LOG.warn("No password configured for user: {} on connection: {}", user, getConnectionMessage(newConnection)); } if (createAccount) { -AccountManager accountManager = AccountManager.getInstance(connection); +AccountManager accountManager = AccountManager.getInstance(newConnection); accountManager.createAccount(user, password); } if (login) { if (resource != null) { -connection.login(user, password, resource); +newConnection.login(user, password, resource); } else { -connection.login(user, password); +newConnection.login(user, password); } } } else { if (LOG.isDebugEnabled()) { -LOG.debug("Logging in anonymously to XMPP on connection: {}",
[1/2] camel git commit: CAMEL-6256: Re-creating xmpp connection should clear out old stale connection during creation so you do not get a non working connection next time. Thanks to Prakash Shetty for
Repository: camel Updated Branches: refs/heads/camel-2.16.x 6beac840c -> fa3ec4d99 refs/heads/camel-2.17.x 76f4fe727 -> 0e9d9fee3 CAMEL-6256: Re-creating xmpp connection should clear out old stale connection during creation so you do not get a non working connection next time. Thanks to Prakash Shetty for details. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0e9d9fee Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0e9d9fee Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0e9d9fee Branch: refs/heads/camel-2.17.x Commit: 0e9d9fee39f7197ef43068666c56dce1e622655e Parents: 76f4fe7 Author: Claus IbsenAuthored: Thu Apr 28 16:03:53 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 16:04:20 2016 +0200 -- .../camel/component/xmpp/XmppEndpoint.java | 36 1 file changed, 21 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0e9d9fee/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java -- diff --git a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java index d0609b5..0f3a722 100644 --- a/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java +++ b/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java @@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory; public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrategyAware { private static final Logger LOG = LoggerFactory.getLogger(XmppEndpoint.class); -private XMPPConnection connection; +private volatile XMPPConnection connection; private XmppBinding binding; @UriPath @Metadata(required = "true") @@ -152,56 +152,62 @@ public class XmppEndpoint extends DefaultEndpoint implements HeaderFilterStrateg public synchronized XMPPConnection createConnection() throws XMPPException, SmackException, IOException { if (connection != null && connection.isConnected()) { +// use existing working connection return connection; } -if (connection == null) { -connection = createConnectionInternal(); -} +// prepare for creating new connection +connection = null; + +LOG.trace("Creating new connection ..."); +XMPPConnection newConnection = createConnectionInternal(); -connection.connect(); +newConnection.connect(); -connection.addPacketListener(new XmppLogger("INBOUND"), new PacketFilter() { +newConnection.addPacketListener(new XmppLogger("INBOUND"), new PacketFilter() { public boolean accept(Packet packet) { return true; } }); -connection.addPacketSendingListener(new XmppLogger("OUTBOUND"), new PacketFilter() { +newConnection.addPacketSendingListener(new XmppLogger("OUTBOUND"), new PacketFilter() { public boolean accept(Packet packet) { return true; } }); -if (!connection.isAuthenticated()) { +if (!newConnection.isAuthenticated()) { if (user != null) { if (LOG.isDebugEnabled()) { -LOG.debug("Logging in to XMPP as user: {} on connection: {}", user, getConnectionMessage(connection)); +LOG.debug("Logging in to XMPP as user: {} on connection: {}", user, getConnectionMessage(newConnection)); } if (password == null) { -LOG.warn("No password configured for user: {} on connection: {}", user, getConnectionMessage(connection)); +LOG.warn("No password configured for user: {} on connection: {}", user, getConnectionMessage(newConnection)); } if (createAccount) { -AccountManager accountManager = AccountManager.getInstance(connection); +AccountManager accountManager = AccountManager.getInstance(newConnection); accountManager.createAccount(user, password); } if (login) { if (resource != null) { -connection.login(user, password, resource); +newConnection.login(user, password, resource); } else { -connection.login(user, password); +newConnection.login(user, password); } } } else {
camel git commit: Fix import
Repository: camel Updated Branches: refs/heads/master 23420ceaa -> 6051a0ea0 Fix import Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6051a0ea Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6051a0ea Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6051a0ea Branch: refs/heads/master Commit: 6051a0ea05571ab26d2ee995d20b59cd9c1a224d Parents: 23420ce Author: Antonin StefanuttiAuthored: Thu Apr 28 15:58:39 2016 +0200 Committer: Antonin Stefanutti Committed: Thu Apr 28 15:58:39 2016 +0200 -- .../org/apache/camel/example/cdi/properties/CdiPropertiesTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/6051a0ea/examples/camel-example-cdi-properties/src/test/java/org/apache/camel/example/cdi/properties/CdiPropertiesTest.java -- diff --git a/examples/camel-example-cdi-properties/src/test/java/org/apache/camel/example/cdi/properties/CdiPropertiesTest.java b/examples/camel-example-cdi-properties/src/test/java/org/apache/camel/example/cdi/properties/CdiPropertiesTest.java index b29573f..535473b 100644 --- a/examples/camel-example-cdi-properties/src/test/java/org/apache/camel/example/cdi/properties/CdiPropertiesTest.java +++ b/examples/camel-example-cdi-properties/src/test/java/org/apache/camel/example/cdi/properties/CdiPropertiesTest.java @@ -28,10 +28,10 @@ import org.apache.deltaspike.core.api.config.ConfigProperty; import org.junit.Test; import org.junit.runner.RunWith; -import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; @RunWith(CamelCdiRunner.class) public class CdiPropertiesTest {
[1/2] camel git commit: CAMEL-9882: Add documentation
Repository: camel Updated Branches: refs/heads/master cbeab0e14 -> 23420ceaa CAMEL-9882: Add documentation Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9c5dee79 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9c5dee79 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9c5dee79 Branch: refs/heads/master Commit: 9c5dee79a4bca5929d3980e0b9eb6790cc7c5c72 Parents: cbeab0e Author: Antonin StefanuttiAuthored: Thu Apr 28 15:54:46 2016 +0200 Committer: Antonin Stefanutti Committed: Thu Apr 28 15:54:46 2016 +0200 -- components/camel-cdi/src/main/docs/cdi.adoc | 99 +++- 1 file changed, 95 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/9c5dee79/components/camel-cdi/src/main/docs/cdi.adoc -- diff --git a/components/camel-cdi/src/main/docs/cdi.adoc b/components/camel-cdi/src/main/docs/cdi.adoc index 8f49cf9..378d1ff 100644 --- a/components/camel-cdi/src/main/docs/cdi.adoc +++ b/components/camel-cdi/src/main/docs/cdi.adoc @@ -147,8 +147,8 @@ class CustomCamelContext extends DefaultCamelContext { link:http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#producer_method[Producer] -and link:http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#disposer_method[disposer] methods -can also be used as well to customize the Camel context bean, e.g.: +and link:http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#disposer_method[disposer] +methods can also be used as well to customize the Camel context bean, e.g.: [source,java] @@ -271,8 +271,9 @@ Camel contexts. That may be useful, for example, for Camel routes that may be required to be added later during the application execution. NOTE: Since Camel version 2.17.0, Camel CDI is capable of managing any kind of -`CamelContext` beans (e.g. `DefaultCamelContext`). In previous versions, it is only capable of managing beans -of type `CdiCamelContext` so it is required to extend it. +`CamelContext` beans (e.g. `DefaultCamelContext`). In previous versions, +it is only capable of managing beans of type `CdiCamelContext` so it is +required to extend it. The CDI qualifiers declared on the `CamelContext` beans are also used to bind the corresponding Camel primitives, e.g.: @@ -769,6 +770,92 @@ endpoint instances and the observer methods as the CDI container doesn't have any ways of discovering the Camel context model during the deployment phase. +[[CDI-CamelXMLconfigurationimport]] +Camel XML configuration import +^^ + +*Available as of Camel 2.18* + +While CDI favors a typesafe dependency injection mechanism, it may be +useful to reuse existing Camel XML configuration files into a Camel CDI +application. In other use cases, it might be handy to rely on the Camel +XML DSL to configure its Camel context(s). + +You can use the `@ImportResource` annotation that's provided by Camel +CDI on any CDI beans and Camel CDI will automatically load the Camel XML +configuration at the specified locations, e.g.: + +[source,java] + +@ImportResource("camel-context.xml") +class MyBean { +} + + +Camel CDI will load the resources at the specified locations from the +classpath (other protocols may be added in the future). + +Every `CamelContext` elements and other Camel _primitives_ from the +imported resources are automatically deployed as CDI beans during the +container bootstrap so that they benefit from the auto-configuration +provided by Camel CDI and become available for injection at runtime. If +such an element has an explicit `id` attribute set, the corresponding +CDI bean is qualified with the `@Named` qualifier, e.g., given the +following Camel XML configuration: + +[source,xml] + + + + + + + + + +The corresponding CDI beans are automatically deployed and can be +injected, e.g.: + +[source,java] + +@Inject +@ContextName("foo") +CamelContext context; + +@Inject +@Named("bar") +Endpoint endpoint; + + +Note that the `CamelContext` beans are automatically qualified with both +the `@Named` and `@ContextName` qualifiers. If the +imported `CamelContext` element doesn't have an `id` attribute, the +corresponding bean is deployed with the built-in `@Default` qualifier. + +Conversely, CDI beans deployed in the application can be referred to +from the Camel XML configuration, usually using the `ref` attribute, +e.g., given the following bean declared: + +[source,java] + +@Produces +@Named("baz") +Processor processor = exchange -> exchange.getIn().setHeader("qux", "quux"); + + +A reference to that bean can be declared in the imported Camel XML +configuration, e.g.: + +[source,xml]
[2/2] camel git commit: Camel CDI: update tested containers in documentation
Camel CDI: update tested containers in documentation Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/23420cea Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/23420cea Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/23420cea Branch: refs/heads/master Commit: 23420ceaa1357199182bcb0dc64c344e289b415e Parents: 9c5dee7 Author: Antonin StefanuttiAuthored: Thu Apr 28 15:56:07 2016 +0200 Committer: Antonin Stefanutti Committed: Thu Apr 28 15:56:07 2016 +0200 -- components/camel-cdi/src/main/docs/cdi.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/23420cea/components/camel-cdi/src/main/docs/cdi.adoc -- diff --git a/components/camel-cdi/src/main/docs/cdi.adoc b/components/camel-cdi/src/main/docs/cdi.adoc index 378d1ff..94f7078 100644 --- a/components/camel-cdi/src/main/docs/cdi.adoc +++ b/components/camel-cdi/src/main/docs/cdi.adoc @@ -993,10 +993,11 @@ following runtimes: |Container |Version |Runtime |Weld SE |1.1.28.Final |CDI 1.0 / Java SE 7 |OpenWebBeans |1.2.7 |CDI 1.0 / Java SE 7 -|Weld SE |2.3.3.Final |CDI 1.2 / Java SE 7 +|Weld SE |2.3.4.Final |CDI 1.2 / Java SE 7 |OpenWebBeans |1.6.3 |CDI 1.2 / Java SE 7 |WildFly |8.2.1.Final |CDI 1.2 / Java EE 7 |WildFly |9.0.1.Final |CDI 1.2 / Java EE 7 +|WildFly |10.0.0.Final |CDI 1.2 / Java EE 7 |Karaf |2.4.4 |CDI 1.2 / OSGi 4 / PAX CDI |Karaf |3.0.5 |CDI 1.2 / OSGi 5 / PAX CDI |Karaf |4.0.4 |CDI 1.2 / OSGi 6 / PAX CDI
[2/2] camel git commit: CAMEL-6443: Camel JSSE should favor creating SSLContext with a CamelContext.
CAMEL-6443: Camel JSSE should favor creating SSLContext with a CamelContext. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/89dc2e88 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/89dc2e88 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/89dc2e88 Branch: refs/heads/master Commit: 89dc2e88b903df9ba1da9a38c4cc22a55186fd1a Parents: 0099d07 Author: Claus IbsenAuthored: Thu Apr 28 15:46:52 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 15:53:41 2016 +0200 -- .../camel/util/jsse/SSLContextParameters.java | 46 ++-- .../camel/component/ahc/ws/WssProducerTest.java | 2 +- .../apache/camel/component/ahc/AhcEndpoint.java | 4 +- .../apns/factory/ApnsServiceFactory.java| 2 +- .../camel/component/cometd/CometdComponent.java | 2 +- .../component/etcd/AbstractEtcdEndpoint.java| 2 +- .../component/file/remote/FtpsEndpoint.java | 2 +- ...xtParametersSecureProtocolSocketFactory.java | 23 +++--- .../http/HttpsSslContextParametersGetTest.java | 2 +- .../camel/component/http4/HttpComponent.java| 4 +- .../component/irc/CamelSSLIRCConnection.java| 7 ++- .../camel/component/irc/IrcComponent.java | 2 +- .../component/jetty/JettyHttpComponent.java | 2 +- .../component/linkedin/LinkedInComponent.java | 4 +- .../camel/component/mina2/Mina2Consumer.java| 4 +- .../camel/component/mina2/Mina2Producer.java| 2 +- .../netty/http/HttpClientPipelineFactory.java | 2 +- .../netty/http/HttpServerPipelineFactory.java | 2 +- .../netty/DefaultClientPipelineFactory.java | 2 +- .../netty/DefaultServerPipelineFactory.java | 2 +- .../http/HttpClientInitializerFactory.java | 2 +- .../http/HttpServerInitializerFactory.java | 2 +- .../netty4/DefaultClientInitializerFactory.java | 2 +- .../netty4/DefaultServerInitializerFactory.java | 2 +- .../component/olingo2/Olingo2Component.java | 2 +- .../component/restlet/RestletComponent.java | 2 +- .../salesforce/SalesforceComponent.java | 2 +- .../salesforce/BulkApiIntegrationTest.java | 2 +- .../salesforce/RestApiIntegrationTest.java | 2 +- .../spring/ws/SpringWebserviceProducer.java | 12 ++--- .../camel/component/stomp/StompEndpoint.java| 2 +- .../camel/component/stomp/StompBaseTest.java| 4 +- .../component/undertow/UndertowEndpoint.java| 2 +- .../component/websocket/WebsocketComponent.java | 2 +- ...ebsocketSSLContextInUriRouteExampleTest.java | 2 +- .../websocket/WebsocketSSLRouteExampleTest.java | 2 +- 36 files changed, 108 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/89dc2e88/camel-core/src/main/java/org/apache/camel/util/jsse/SSLContextParameters.java -- diff --git a/camel-core/src/main/java/org/apache/camel/util/jsse/SSLContextParameters.java b/camel-core/src/main/java/org/apache/camel/util/jsse/SSLContextParameters.java index 26b4b69..d884ffd 100644 --- a/camel-core/src/main/java/org/apache/camel/util/jsse/SSLContextParameters.java +++ b/camel-core/src/main/java/org/apache/camel/util/jsse/SSLContextParameters.java @@ -30,6 +30,7 @@ import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.net.ssl.X509KeyManager; +import org.apache.camel.CamelContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -234,21 +235,60 @@ public class SSLContextParameters extends BaseSSLContextParameters { } - + /** * Creates an {@link SSLContext} based on the related configuration options * of this instance. Namely, {@link #keyManagers}, {@link #trustManagers}, and * {@link #secureRandom}, but also respecting the chosen provider and secure * socket protocol as well. - * + * * @return a newly configured instance * * @throws GeneralSecurityException if there is a problem in this instances * configuration or that of its nested configuration options * @throws IOException if there is an error reading a key/trust store + * @deprecated use {@link #configureSSLContext(SSLContext)} */ +@Deprecated public SSLContext createSSLContext() throws GeneralSecurityException, IOException { - +return createSSLContext(null); +} + +/** + * Creates an {@link SSLContext} based on the related configuration options + * of this instance. Namely, {@link #keyManagers}, {@link #trustManagers}, and + * {@link #secureRandom}, but also respecting the chosen provider and secure + * socket protocol as well. + * +
[1/2] camel git commit: CAMEL-6443: Camel JSSE should favor using Camels ClassResolver to load the resources which works better for OSGi environments.
Repository: camel Updated Branches: refs/heads/master 0099d077c -> cbeab0e14 CAMEL-6443: Camel JSSE should favor using Camels ClassResolver to load the resources which works better for OSGi environments. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cbeab0e1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cbeab0e1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cbeab0e1 Branch: refs/heads/master Commit: cbeab0e14a80eb285d7464cb094c91d0242add29 Parents: 89dc2e8 Author: Claus IbsenAuthored: Thu Apr 28 15:53:08 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 15:53:41 2016 +0200 -- .../apache/camel/util/jsse/JsseParameters.java | 34 1 file changed, 20 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/cbeab0e1/camel-core/src/main/java/org/apache/camel/util/jsse/JsseParameters.java -- diff --git a/camel-core/src/main/java/org/apache/camel/util/jsse/JsseParameters.java b/camel-core/src/main/java/org/apache/camel/util/jsse/JsseParameters.java index 4b08b18..a96549e 100644 --- a/camel-core/src/main/java/org/apache/camel/util/jsse/JsseParameters.java +++ b/camel-core/src/main/java/org/apache/camel/util/jsse/JsseParameters.java @@ -120,6 +120,7 @@ public class JsseParameters implements CamelContextAware { protected InputStream resolveResource(String resource) throws IOException { InputStream is = null; +// attempt as plain file first try { LOG.trace("Trying to open resource [{}] as a file.", resource); is = new FileInputStream(resource); @@ -127,7 +128,24 @@ public class JsseParameters implements CamelContextAware { } catch (FileNotFoundException e) { LOG.trace("Could not open resource [" + resource + "] as a file.", e); } - + +// then prefer to use ClassResolver from CamelContext if possible +if (is == null && this.context != null) { +LOG.trace("Trying to open resource using the CamelContext ClassResolver [{}].", context.getClassResolver()); +try { +is = context.getClassResolver().loadResourceAsStream(resource); +if (is == null) { +LOG.trace("Could not to open resource [{}] using the CamelContext ClassResolver [{}].", +resource, context.getClassResolver()); +} else { +LOG.debug("Opened resource [{}] using the CamelContext ClassResolver [{}].", +resource, this.getClass().getClassLoader()); +} +} catch (Throwable e) { +LOG.trace("Could not open resource [" + resource + "] using the CamelContext ClassResolver.", e); +} +} + if (is == null && Thread.currentThread().getContextClassLoader() != null) { LOG.trace("Trying to open resource [{}] as a class path resource with the TCCL [{}].", resource, Thread.currentThread().getContextClassLoader()); @@ -165,23 +183,11 @@ public class JsseParameters implements CamelContextAware { LOG.trace("Could not open resource [" + resource + "] as a URL.", e); } } - -if (is == null && this.context != null) { -LOG.trace("Trying to open resource using the CamelContext ClassResolver [{}].", context.getClassResolver()); -is = context.getClassResolver().loadResourceAsStream(resource); -if (is == null) { -LOG.trace("Could not to open resource [{}] using the CamelContext ClassResolver [{}].", - resource, context.getClassResolver()); -} else { -LOG.debug("Opened resource [{}] using the CamelContext ClassResolver [{}].", - resource, this.getClass().getClassLoader()); -} -} if (is == null) { throw new IOException("Could not open " + resource + " as a file, class path resource, or URL."); } - + return is; }
svn commit: r986936 - in /websites/production/camel/content: cache/main.pageCache cdi.html
Author: buildbot Date: Thu Apr 28 13:18:54 2016 New Revision: 986936 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/cdi.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/cdi.html == --- websites/production/camel/content/cdi.html (original) +++ websites/production/camel/content/cdi.html Thu Apr 28 13:18:54 2016 @@ -40,6 +40,7 @@ + @@ -137,7 +138,7 @@ class CustomCamelContext extends Default // ... } }]]> -http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#producer_method; rel="nofollow">Producerandhttp://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#disposer_method; rel="nofollow">disposermethods can also be used as well to customize the Camel context bean, e.g.: +http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#producer_method; rel="nofollow">Producerandhttp://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#disposer_method; rel="nofollow">disposermethods can also be used as well to customize the Camel context bean, e.g.: With the authorityPayloadType(resp. theQualifierType) being the URI escaped fully qualified name of the payload (resp. qualifier) raw type followed by the type parameters section delimited by angle brackets for payload parameterized type. Which leads tounfriendlyURIs, e.g.: -But more fundamentally, that would prevent efficient binding between the endpoint instances and the observer methods as the CDI container doesn't have any ways of discovering the Camel context model during the deployment phase.Auto-configured OSGi integrationAvailable as of Camel 2.17The Camel context beans are automatically adapted by Camel CDI so that they are registered as OSGi services and the various resolvers (likeComponentResolver andDataFormatResolver) integrate with the OSGi registry. That means that the Karaf Camel commands can be used to operate the Camel contexts auto-configured by Camel CDI, e.g.: +But more fundamentally, that would prevent efficient binding between the endpoint instances and the observer methods as the CDI container doesn't have any ways of discovering the Camel context model during the deployment phase.Camel XML configuration importAvailable as of Camel 2.18While CDI favors a typesafe dependency injection mechanism, it may be usefulto reuse existing Camel XML configuration files into a Camel CDI application.In other use cases, it might be handy to rely on the Camel XML DSL to configureits Camel context(s).You can use the@ImportResource annotation that's provided by Camel CDI on any CDI beans and Camel CDI will automatically load the Camel XML configuration at the specified locations, e.g.: + +Camel CDI will load the resources at the specified locations from the classpath (other protocols may be added in the future).Every CamelContext elements and other Camel primitives from the imported resources are automatically deployed as CDI beans during the container bootstrap so that they benefit from the auto-configuration provided by Camel CDI and become available for injection at runtime. If such an element has an explicit id attribute set, the corresponding CDI bean is qualified with the @Named qualifier, e.g., given the following Camel XML configuration: + +Thecorresponding CDI beans are automatically deployed and can be injected, e.g.: + +Note that theCamelContextbeans are automatically qualified with both theNamedandContextNamequalifiers. If the importedCamelContextelement doesn't have anidattribute, the corresponding bean is deployed with the built-inDefaultqualifier.Conversely, CDI beans deployed in the application can be referred to from the Camel
[1/2] camel git commit: Upgrade HtmlUnit and related bundle to version 2.20 in camel-linkedin
Repository: camel Updated Branches: refs/heads/master 39509af13 -> 0099d077c Upgrade HtmlUnit and related bundle to version 2.20 in camel-linkedin Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dc8676de Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dc8676de Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dc8676de Branch: refs/heads/master Commit: dc8676de6b954c9c61e3e360f664467cc2644e4e Parents: 39509af Author: Andrea CosentinoAuthored: Thu Apr 28 14:36:54 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 15:14:50 2016 +0200 -- .../component/linkedin/api/LinkedInOAuthRequestFilter.java | 4 ++-- parent/pom.xml | 4 ++-- platforms/karaf/features/src/main/resources/features.xml| 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/dc8676de/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/LinkedInOAuthRequestFilter.java -- diff --git a/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/LinkedInOAuthRequestFilter.java b/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/LinkedInOAuthRequestFilter.java index 7c5def9..4d781d1 100644 --- a/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/LinkedInOAuthRequestFilter.java +++ b/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/LinkedInOAuthRequestFilter.java @@ -93,7 +93,7 @@ public final class LinkedInOAuthRequestFilter implements ClientRequestFilter { this.oAuthToken = null; // create HtmlUnit client -webClient = new WebClient(BrowserVersion.FIREFOX_24); +webClient = new WebClient(BrowserVersion.FIREFOX_38); final WebClientOptions options = webClient.getOptions(); options.setRedirectEnabled(true); options.setJavaScriptEnabled(false); @@ -224,7 +224,7 @@ public final class LinkedInOAuthRequestFilter implements ClientRequestFilter { } public void close() { -webClient.closeAllWindows(); +webClient.close(); } private OAuthToken getAccessToken(String refreshToken) throws IOException { http://git-wip-us.apache.org/repos/asf/camel/blob/dc8676de/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index c2a65a8..ac5b391 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -233,8 +233,8 @@ 2.3.0 1.0.1 2.3.3 -2.15 -2.15_1 +2.20 +2.20_1 1.7 4.4.4 4.5.2 http://git-wip-us.apache.org/repos/asf/camel/blob/dc8676de/platforms/karaf/features/src/main/resources/features.xml -- diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml index d639afb..38f603d 100644 --- a/platforms/karaf/features/src/main/resources/features.xml +++ b/platforms/karaf/features/src/main/resources/features.xml @@ -1040,12 +1040,13 @@ mvn:com.fasterxml.jackson.core/jackson-databind/${jackson2-version} mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson2-version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.htmlunit/${htmlunit-bundle-version} -wrap:mvn:net.sourceforge.cssparser/cssparser/0.9.14 +wrap:mvn:net.sourceforge.cssparser/cssparser/0.9.18 wrap:mvn:org.w3c.css/sac/1.3 mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.bcel/${bcel-bundle-version} mvn:commons-collections/commons-collections/${commons-collections-version} mvn:commons-codec/commons-codec/${commons-codec-version} -wrap:mvn:net.sourceforge.nekohtml/nekohtml/1.9.21 +wrap:mvn:net.sourceforge.nekohtml/nekohtml/1.9.22 +wrap:mvn:net.sourceforge.htmlunit/htmlunit-core-js/2.17 mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan/${xalan-bundle-version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xerces/${xerces-bundle-version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlresolver/${xmlresolver-bundle-version}
[2/2] camel git commit: Upgrade HtmlUnit and related bundle to version 2.20 in camel-box
Upgrade HtmlUnit and related bundle to version 2.20 in camel-box Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0099d077 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0099d077 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0099d077 Branch: refs/heads/master Commit: 0099d077c5a61d6c9f582d5f35f173723e40ba0d Parents: dc8676d Author: Andrea CosentinoAuthored: Thu Apr 28 14:47:17 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 15:14:51 2016 +0200 -- .../apache/camel/component/box/internal/LoginAuthFlowUI.java| 2 +- platforms/karaf/features/src/main/resources/features.xml| 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0099d077/components/camel-box/src/main/java/org/apache/camel/component/box/internal/LoginAuthFlowUI.java -- diff --git a/components/camel-box/src/main/java/org/apache/camel/component/box/internal/LoginAuthFlowUI.java b/components/camel-box/src/main/java/org/apache/camel/component/box/internal/LoginAuthFlowUI.java index d5d2d33..8044ecd 100644 --- a/components/camel-box/src/main/java/org/apache/camel/component/box/internal/LoginAuthFlowUI.java +++ b/components/camel-box/src/main/java/org/apache/camel/component/box/internal/LoginAuthFlowUI.java @@ -84,7 +84,7 @@ public final class LoginAuthFlowUI implements IAuthFlowUI { // TODO run this on an Executor to make it async // create HtmlUnit client -final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_24); +final WebClient webClient = new WebClient(BrowserVersion.FIREFOX_38); final WebClientOptions options = webClient.getOptions(); options.setRedirectEnabled(true); options.setJavaScriptEnabled(false); http://git-wip-us.apache.org/repos/asf/camel/blob/0099d077/platforms/karaf/features/src/main/resources/features.xml -- diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml index 38f603d..6e2fb3b 100644 --- a/platforms/karaf/features/src/main/resources/features.xml +++ b/platforms/karaf/features/src/main/resources/features.xml @@ -226,12 +226,13 @@ mvn:commons-io/commons-io/${commons-io-version} wrap:mvn:net.box/boxjavalibv2/${boxjavalibv2.version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.htmlunit/${htmlunit-bundle-version} -wrap:mvn:net.sourceforge.cssparser/cssparser/0.9.14 +wrap:mvn:net.sourceforge.cssparser/cssparser/0.9.18 wrap:mvn:org.w3c.css/sac/1.3 mvn:commons-codec/commons-codec/${commons-codec-version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.bcel/${bcel-bundle-version} mvn:commons-collections/commons-collections/${commons-collections-version} -wrap:mvn:net.sourceforge.nekohtml/nekohtml/1.9.21 +wrap:mvn:net.sourceforge.nekohtml/nekohtml/1.9.22 +wrap:mvn:net.sourceforge.htmlunit/htmlunit-core-js/2.17 mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan/${xalan-bundle-version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xerces/${xerces-bundle-version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlresolver/${xmlresolver-bundle-version}
[3/3] camel git commit: CAMEL-6720: Fixed potential NPE in camel-soap. Thanks to Movees for the fix.
CAMEL-6720: Fixed potential NPE in camel-soap. Thanks to Movees for the fix. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6beac840 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6beac840 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6beac840 Branch: refs/heads/camel-2.16.x Commit: 6beac840c427521c7bbfed71ce3711487aa51dd6 Parents: 49baf40 Author: Claus IbsenAuthored: Thu Apr 28 14:45:36 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 14:46:12 2016 +0200 -- .../camel/dataformat/soap/name/ServiceInterfaceStrategy.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/6beac840/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java -- diff --git a/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java b/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java index a860d56..15884b8 100644 --- a/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java +++ b/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java @@ -96,7 +96,6 @@ public class ServiceInterfaceStrategy implements ElementNameStrategy { // parameter types are returned in declaration order Class[] types = method.getParameterTypes(); if (types.length == 0) { -typeInfos.add(new TypeInfo(null, null)); return typeInfos; } if (requestWrapper != null && requestWrapper.className() != null) { @@ -140,7 +139,7 @@ public class ServiceInterfaceStrategy implements ElementNameStrategy { * Determines how the parameter object of the service method will be named * in xml. It will use either the RequestWrapper annotation of the method if * present or the WebParam method of the parameter. - * + * * @param method */ private MethodInfo analyzeMethod(Method method) {
[1/3] camel git commit: CAMEL-6720: Fixed potential NPE in camel-soap. Thanks to Movees for the fix.
Repository: camel Updated Branches: refs/heads/camel-2.16.x 49baf4092 -> 6beac840c refs/heads/camel-2.17.x b8e628248 -> 76f4fe727 refs/heads/master ef74ad512 -> 39509af13 CAMEL-6720: Fixed potential NPE in camel-soap. Thanks to Movees for the fix. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/39509af1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/39509af1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/39509af1 Branch: refs/heads/master Commit: 39509af13790d3baaa6af383c35e509d01c92f6c Parents: ef74ad5 Author: Claus IbsenAuthored: Thu Apr 28 14:45:36 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 14:45:36 2016 +0200 -- .../camel/dataformat/soap/name/ServiceInterfaceStrategy.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/39509af1/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java -- diff --git a/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java b/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java index a860d56..15884b8 100644 --- a/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java +++ b/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java @@ -96,7 +96,6 @@ public class ServiceInterfaceStrategy implements ElementNameStrategy { // parameter types are returned in declaration order Class[] types = method.getParameterTypes(); if (types.length == 0) { -typeInfos.add(new TypeInfo(null, null)); return typeInfos; } if (requestWrapper != null && requestWrapper.className() != null) { @@ -140,7 +139,7 @@ public class ServiceInterfaceStrategy implements ElementNameStrategy { * Determines how the parameter object of the service method will be named * in xml. It will use either the RequestWrapper annotation of the method if * present or the WebParam method of the parameter. - * + * * @param method */ private MethodInfo analyzeMethod(Method method) {
[2/3] camel git commit: CAMEL-6720: Fixed potential NPE in camel-soap. Thanks to Movees for the fix.
CAMEL-6720: Fixed potential NPE in camel-soap. Thanks to Movees for the fix. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/76f4fe72 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/76f4fe72 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/76f4fe72 Branch: refs/heads/camel-2.17.x Commit: 76f4fe727b5e9ab77c368da3c5a1667205039da7 Parents: b8e6282 Author: Claus IbsenAuthored: Thu Apr 28 14:45:36 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 14:45:59 2016 +0200 -- .../camel/dataformat/soap/name/ServiceInterfaceStrategy.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/76f4fe72/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java -- diff --git a/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java b/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java index a860d56..15884b8 100644 --- a/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java +++ b/components/camel-soap/src/main/java/org/apache/camel/dataformat/soap/name/ServiceInterfaceStrategy.java @@ -96,7 +96,6 @@ public class ServiceInterfaceStrategy implements ElementNameStrategy { // parameter types are returned in declaration order Class[] types = method.getParameterTypes(); if (types.length == 0) { -typeInfos.add(new TypeInfo(null, null)); return typeInfos; } if (requestWrapper != null && requestWrapper.className() != null) { @@ -140,7 +139,7 @@ public class ServiceInterfaceStrategy implements ElementNameStrategy { * Determines how the parameter object of the service method will be named * in xml. It will use either the RequestWrapper annotation of the method if * present or the WebParam method of the parameter. - * + * * @param method */ private MethodInfo analyzeMethod(Method method) {
camel git commit: CAMEL-7443: camel-printer to better find remote printer where forward/backward slashes do not care.
Repository: camel Updated Branches: refs/heads/master 1fb67d6b8 -> ef74ad512 CAMEL-7443: camel-printer to better find remote printer where forward/backward slashes do not care. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ef74ad51 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ef74ad51 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ef74ad51 Branch: refs/heads/master Commit: ef74ad512a44f94f0ebe58670419c5d914cadfb3 Parents: 1fb67d6 Author: Claus IbsenAuthored: Thu Apr 28 14:27:55 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 14:28:50 2016 +0200 -- .../camel/component/printer/PrinterProducer.java | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/ef74ad51/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java -- diff --git a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java index ee3239c..ea8fd99 100644 --- a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java +++ b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java @@ -17,7 +17,7 @@ package org.apache.camel.component.printer; import java.io.InputStream; - +import java.util.Locale; import javax.print.DocFlavor; import javax.print.PrintException; import javax.print.PrintService; @@ -121,7 +121,7 @@ public class PrinterProducer extends DefaultProducer { // no hostname for localhost printers name = config.getPrintername(); } else { -name = "" + config.getHostname() + "\\" + config.getPrintername(); +name = config.getHostname() + "/" + config.getPrintername(); if (config.getPrinterPrefix() != null) { name = config.getPrinterPrefix() + name; } @@ -139,8 +139,16 @@ public class PrinterProducer extends DefaultProducer { private int findPrinter(PrintService[] services, String printer) { int position = -1; +// align slashes so we match / or \ +printer = printer.toLowerCase(Locale.US); +printer = printer.replace('\\', '/'); for (int i = 0; i < services.length; i++) { -if (services[i].getName().toLowerCase().endsWith(printer.toLowerCase())) { +String printerName = services[i].getName(); +log.debug("Printer service printer name: {}", printerName); +// align slashes so we match / or \ +printerName = printerName.toLowerCase(Locale.US); +printerName = printerName.replace('\\', '/'); +if (printerName.endsWith(printer)) { position = i; break; }
[2/2] camel git commit: CAMEL-7443: camel-printer to better find remote printer where forward/backward slashes do not care.
CAMEL-7443: camel-printer to better find remote printer where forward/backward slashes do not care. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/49baf409 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/49baf409 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/49baf409 Branch: refs/heads/camel-2.16.x Commit: 49baf4092aa559eab5ce3cbd31cd280e5512ecba Parents: 54b3bf7 Author: Claus IbsenAuthored: Thu Apr 28 14:27:55 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 14:28:26 2016 +0200 -- .../camel/component/printer/PrinterProducer.java | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/49baf409/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java -- diff --git a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java index ee3239c..ea8fd99 100644 --- a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java +++ b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java @@ -17,7 +17,7 @@ package org.apache.camel.component.printer; import java.io.InputStream; - +import java.util.Locale; import javax.print.DocFlavor; import javax.print.PrintException; import javax.print.PrintService; @@ -121,7 +121,7 @@ public class PrinterProducer extends DefaultProducer { // no hostname for localhost printers name = config.getPrintername(); } else { -name = "" + config.getHostname() + "\\" + config.getPrintername(); +name = config.getHostname() + "/" + config.getPrintername(); if (config.getPrinterPrefix() != null) { name = config.getPrinterPrefix() + name; } @@ -139,8 +139,16 @@ public class PrinterProducer extends DefaultProducer { private int findPrinter(PrintService[] services, String printer) { int position = -1; +// align slashes so we match / or \ +printer = printer.toLowerCase(Locale.US); +printer = printer.replace('\\', '/'); for (int i = 0; i < services.length; i++) { -if (services[i].getName().toLowerCase().endsWith(printer.toLowerCase())) { +String printerName = services[i].getName(); +log.debug("Printer service printer name: {}", printerName); +// align slashes so we match / or \ +printerName = printerName.toLowerCase(Locale.US); +printerName = printerName.replace('\\', '/'); +if (printerName.endsWith(printer)) { position = i; break; }
[1/2] camel git commit: CAMEL-7443: camel-printer to better find remote printer where forward/backward slashes do not care.
Repository: camel Updated Branches: refs/heads/camel-2.16.x 54b3bf740 -> 49baf4092 refs/heads/camel-2.17.x 79d60fdb3 -> b8e628248 CAMEL-7443: camel-printer to better find remote printer where forward/backward slashes do not care. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b8e62824 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b8e62824 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b8e62824 Branch: refs/heads/camel-2.17.x Commit: b8e628248dec19343c84c6f9401aad1664298b36 Parents: 79d60fd Author: Claus IbsenAuthored: Thu Apr 28 14:27:55 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 14:28:14 2016 +0200 -- .../camel/component/printer/PrinterProducer.java | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/b8e62824/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java -- diff --git a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java index ee3239c..ea8fd99 100644 --- a/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java +++ b/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java @@ -17,7 +17,7 @@ package org.apache.camel.component.printer; import java.io.InputStream; - +import java.util.Locale; import javax.print.DocFlavor; import javax.print.PrintException; import javax.print.PrintService; @@ -121,7 +121,7 @@ public class PrinterProducer extends DefaultProducer { // no hostname for localhost printers name = config.getPrintername(); } else { -name = "" + config.getHostname() + "\\" + config.getPrintername(); +name = config.getHostname() + "/" + config.getPrintername(); if (config.getPrinterPrefix() != null) { name = config.getPrinterPrefix() + name; } @@ -139,8 +139,16 @@ public class PrinterProducer extends DefaultProducer { private int findPrinter(PrintService[] services, String printer) { int position = -1; +// align slashes so we match / or \ +printer = printer.toLowerCase(Locale.US); +printer = printer.replace('\\', '/'); for (int i = 0; i < services.length; i++) { -if (services[i].getName().toLowerCase().endsWith(printer.toLowerCase())) { +String printerName = services[i].getName(); +log.debug("Printer service printer name: {}", printerName); +// align slashes so we match / or \ +printerName = printerName.toLowerCase(Locale.US); +printerName = printerName.replace('\\', '/'); +if (printerName.endsWith(printer)) { position = i; break; }
camel git commit: Added camel-josql language to Gitbook
Repository: camel Updated Branches: refs/heads/master 3c4e19e48 -> 1fb67d6b8 Added camel-josql language to Gitbook Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1fb67d6b Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1fb67d6b Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1fb67d6b Branch: refs/heads/master Commit: 1fb67d6b86e0bab98c1ea42f0700064402f53146 Parents: 3c4e19e Author: Andrea CosentinoAuthored: Thu Apr 28 13:52:37 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 13:53:01 2016 +0200 -- components/camel-josql/src/main/docs/josql.adoc | 82 docs/user-manual/en/SUMMARY.md | 3 +- 2 files changed, 83 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/1fb67d6b/components/camel-josql/src/main/docs/josql.adoc -- diff --git a/components/camel-josql/src/main/docs/josql.adoc b/components/camel-josql/src/main/docs/josql.adoc new file mode 100644 index 000..d0d1043 --- /dev/null +++ b/components/camel-josql/src/main/docs/josql.adoc @@ -0,0 +1,82 @@ +[[SQL-SQLLanguage]] +SQL Language + + +The SQL support is added by http://josql.sourceforge.net/[JoSQL] and is +primarily used for performing SQL queries on in-memory objects. If you +prefer to perform actual database queries then check out the +link:jpa.html[JPA] component. + +*Looking for the SQL component* + +Camel has both a link:sql.html[SQL] language and a +link:sql-component.html[SQL Component]. This page is about the SQL +language. Click on link:sql-component.html[SQL Component] if you are +looking for the component instead. + +To use SQL in your camel routes you need to add the a dependency on +*camel-josql* which implements the SQL language. + +If you use maven you could just add the following to your pom.xml, +substituting the version number for the latest & greatest release (see +link:download.html[the download page for the latest versions]). + +[source,xml] +-- + + org.apache.camel + camel-josql + x.x.x + + +-- + +Camel supports http://en.wikipedia.org/wiki/SQL[SQL] to allow an +link:expression.html[Expression] or link:predicate.html[Predicate] to be +used in the link:dsl.html[DSL] or link:xml-configuration.html[Xml +Configuration]. For example you could use SQL to create an +link:predicate.html[Predicate] in a link:message-filter.html[Message +Filter] or as an link:expression.html[Expression] for a +link:recipient-list.html[Recipient List]. + +[source,java] +--- +from("queue:foo").setBody().sql("select * from MyType").to("queue:bar") +--- + +And the spring DSL: + +[source,xml] +-- + + + select * from MyType + + +-- + +[[SQL-Options]] +Options +^^^ + +// component options: START +// component options: END + +// endpoint options: START +// endpoint options: END + +[[SQL-Loadingscriptfromexternalresource]] +Loading script from external resource +^ + +*Available as of Camel 2.11* + +You can externalize the script and have Camel load it from a resource +such as `"classpath:"`, `"file:"`, or `"http:"`. + + This is done using the following syntax: `"resource:scheme:location"`, +eg to refer to a file on the classpath you can do: + +[source,java] +-- +.setHeader("myHeader").sql("resource:classpath:mysql.sql") +-- http://git-wip-us.apache.org/repos/asf/camel/blob/1fb67d6b/docs/user-manual/en/SUMMARY.md -- diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md index 7e463e1..8eadaa2 100644 --- a/docs/user-manual/en/SUMMARY.md +++ b/docs/user-manual/en/SUMMARY.md @@ -189,11 +189,10 @@ * [Yammer](yammer.adoc) * [ZooKeeper](zookeeper.adoc) - +* [SQL](josql.adoc) * Data Formats * [Flatpack](flatpack-dataformat.adoc)
camel git commit: CAMEL-9916: Added test
Repository: camel Updated Branches: refs/heads/camel-2.17.x f683d96d6 -> 79d60fdb3 CAMEL-9916: Added test Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/79d60fdb Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/79d60fdb Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/79d60fdb Branch: refs/heads/camel-2.17.x Commit: 79d60fdb36db4e7e41a55445f516e8fb2c090a11 Parents: f683d96 Author: Claus IbsenAuthored: Thu Apr 28 12:37:23 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 13:34:52 2016 +0200 -- .../camel/component/sjms/SjmsComponent.java | 14 ++- .../sjms/SjmsComponentRestartTest.java | 112 +++ 2 files changed, 123 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/79d60fdb/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java -- diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java index 2748aae..e1132bf 100644 --- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java +++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java @@ -44,6 +44,7 @@ public class SjmsComponent extends UriEndpointComponent implements HeaderFilterS private ConnectionFactory connectionFactory; private ConnectionResource connectionResource; +private volatile boolean closeConnectionResource; private HeaderFilterStrategy headerFilterStrategy = new SjmsHeaderFilterStrategy(); private JmsKeyFormatStrategy jmsKeyFormatStrategy = new DefaultJmsKeyFormatStrategy(); private Integer connectionCount = 1; @@ -115,6 +116,8 @@ public class SjmsComponent extends UriEndpointComponent implements HeaderFilterS ConnectionFactoryResource connections = new ConnectionFactoryResource(getConnectionCount(), getConnectionFactory()); connections.fillPool(); setConnectionResource(connections); +// we created the resource so we should close it when stopping +closeConnectionResource = true; } else if (getConnectionResource() instanceof ConnectionFactoryResource) { ((ConnectionFactoryResource) getConnectionResource()).fillPool(); } @@ -124,13 +127,18 @@ public class SjmsComponent extends UriEndpointComponent implements HeaderFilterS protected void doStop() throws Exception { if (timedTaskManager != null) { timedTaskManager.cancelTasks(); +timedTaskManager = null; } -if (getConnectionResource() != null) { -if (getConnectionResource() instanceof ConnectionFactoryResource) { -((ConnectionFactoryResource) getConnectionResource()).drainPool(); +if (closeConnectionResource) { +if (getConnectionResource() != null) { +if (getConnectionResource() instanceof ConnectionFactoryResource) { +((ConnectionFactoryResource) getConnectionResource()).drainPool(); +} } +connectionResource = null; } + super.doStop(); } http://git-wip-us.apache.org/repos/asf/camel/blob/79d60fdb/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java -- diff --git a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java new file mode 100644 index 000..494b5de --- /dev/null +++ b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java @@ -0,0 +1,112 @@ +/** + * 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 + *
[2/2] camel git commit: Add the _id of the file just persisted to the context
Add the _id of the file just persisted to the context Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f683d96d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f683d96d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f683d96d Branch: refs/heads/camel-2.17.x Commit: f683d96d69751a6da8a86edf858fa29bceab3f70 Parents: 31e45f4 Author: Joseluis PedrosaAuthored: Thu Apr 28 12:41:45 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 12:54:27 2016 +0200 -- .../java/org/apache/camel/component/gridfs/GridFsEndpoint.java | 1 + .../java/org/apache/camel/component/gridfs/GridFsProducer.java | 2 ++ 2 files changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/f683d96d/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsEndpoint.java -- diff --git a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsEndpoint.java b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsEndpoint.java index 4856a7f..cfd8831 100644 --- a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsEndpoint.java +++ b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsEndpoint.java @@ -47,6 +47,7 @@ public class GridFsEndpoint extends DefaultEndpoint { public static final String GRIDFS_OPERATION = "gridfs.operation"; public static final String GRIDFS_METADATA = "gridfs.metadata"; public static final String GRIDFS_CHUNKSIZE = "gridfs.chunksize"; +public static final String GRIDFS_FILE_ID_PRODUCED = "gridfs.fileid"; private static final Logger LOG = LoggerFactory.getLogger(GridFsEndpoint.class); http://git-wip-us.apache.org/repos/asf/camel/blob/f683d96d/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsProducer.java -- diff --git a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsProducer.java b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsProducer.java index dccb499..397cc03 100644 --- a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsProducer.java +++ b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsProducer.java @@ -61,7 +61,9 @@ public class GridFsProducer extends DefaultProducer { DBObject dbObject = (DBObject) JSON.parse(metaData); gfsFile.setMetaData(dbObject); gfsFile.save(); +//add headers with the id and file name produced by the driver. exchange.getIn().setHeader(Exchange.FILE_NAME_PRODUCED, gfsFile.getFilename()); +exchange.getIn().setHeader(GridFsEndpoint.GRIDFS_FILE_ID_PRODUCED, gfsFile.getId()); } else if ("remove".equals(operation)) { final String filename = exchange.getIn().getHeader(Exchange.FILE_NAME, String.class); endpoint.getGridFs().remove(filename);
[1/2] camel git commit: Add the _id of the file just persisted to the context
Repository: camel Updated Branches: refs/heads/camel-2.17.x 31e45f488 -> f683d96d6 refs/heads/master d78e0908d -> 3c4e19e48 Add the _id of the file just persisted to the context Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3c4e19e4 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3c4e19e4 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3c4e19e4 Branch: refs/heads/master Commit: 3c4e19e482dd413251bf5dd283ca69d1edd4b0ac Parents: d78e090 Author: Joseluis PedrosaAuthored: Thu Apr 28 12:41:45 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 12:54:05 2016 +0200 -- .../java/org/apache/camel/component/gridfs/GridFsEndpoint.java | 1 + .../java/org/apache/camel/component/gridfs/GridFsProducer.java | 2 ++ 2 files changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3c4e19e4/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsEndpoint.java -- diff --git a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsEndpoint.java b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsEndpoint.java index 4856a7f..cfd8831 100644 --- a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsEndpoint.java +++ b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsEndpoint.java @@ -47,6 +47,7 @@ public class GridFsEndpoint extends DefaultEndpoint { public static final String GRIDFS_OPERATION = "gridfs.operation"; public static final String GRIDFS_METADATA = "gridfs.metadata"; public static final String GRIDFS_CHUNKSIZE = "gridfs.chunksize"; +public static final String GRIDFS_FILE_ID_PRODUCED = "gridfs.fileid"; private static final Logger LOG = LoggerFactory.getLogger(GridFsEndpoint.class); http://git-wip-us.apache.org/repos/asf/camel/blob/3c4e19e4/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsProducer.java -- diff --git a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsProducer.java b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsProducer.java index dccb499..397cc03 100644 --- a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsProducer.java +++ b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/gridfs/GridFsProducer.java @@ -61,7 +61,9 @@ public class GridFsProducer extends DefaultProducer { DBObject dbObject = (DBObject) JSON.parse(metaData); gfsFile.setMetaData(dbObject); gfsFile.save(); +//add headers with the id and file name produced by the driver. exchange.getIn().setHeader(Exchange.FILE_NAME_PRODUCED, gfsFile.getFilename()); +exchange.getIn().setHeader(GridFsEndpoint.GRIDFS_FILE_ID_PRODUCED, gfsFile.getId()); } else if ("remove".equals(operation)) { final String filename = exchange.getIn().getHeader(Exchange.FILE_NAME, String.class); endpoint.getGridFs().remove(filename);
camel git commit: CAMEL-9916: Added test
Repository: camel Updated Branches: refs/heads/master d527303c8 -> d78e0908d CAMEL-9916: Added test Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d78e0908 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d78e0908 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d78e0908 Branch: refs/heads/master Commit: d78e0908db4418bd36b482cddde71256a4977a43 Parents: d527303 Author: Claus IbsenAuthored: Thu Apr 28 12:37:23 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 12:37:39 2016 +0200 -- .../camel/component/sjms/SjmsComponent.java | 14 ++- .../sjms/SjmsComponentRestartTest.java | 112 +++ 2 files changed, 123 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d78e0908/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java -- diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java index 2748aae..e1132bf 100644 --- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java +++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java @@ -44,6 +44,7 @@ public class SjmsComponent extends UriEndpointComponent implements HeaderFilterS private ConnectionFactory connectionFactory; private ConnectionResource connectionResource; +private volatile boolean closeConnectionResource; private HeaderFilterStrategy headerFilterStrategy = new SjmsHeaderFilterStrategy(); private JmsKeyFormatStrategy jmsKeyFormatStrategy = new DefaultJmsKeyFormatStrategy(); private Integer connectionCount = 1; @@ -115,6 +116,8 @@ public class SjmsComponent extends UriEndpointComponent implements HeaderFilterS ConnectionFactoryResource connections = new ConnectionFactoryResource(getConnectionCount(), getConnectionFactory()); connections.fillPool(); setConnectionResource(connections); +// we created the resource so we should close it when stopping +closeConnectionResource = true; } else if (getConnectionResource() instanceof ConnectionFactoryResource) { ((ConnectionFactoryResource) getConnectionResource()).fillPool(); } @@ -124,13 +127,18 @@ public class SjmsComponent extends UriEndpointComponent implements HeaderFilterS protected void doStop() throws Exception { if (timedTaskManager != null) { timedTaskManager.cancelTasks(); +timedTaskManager = null; } -if (getConnectionResource() != null) { -if (getConnectionResource() instanceof ConnectionFactoryResource) { -((ConnectionFactoryResource) getConnectionResource()).drainPool(); +if (closeConnectionResource) { +if (getConnectionResource() != null) { +if (getConnectionResource() instanceof ConnectionFactoryResource) { +((ConnectionFactoryResource) getConnectionResource()).drainPool(); +} } +connectionResource = null; } + super.doStop(); } http://git-wip-us.apache.org/repos/asf/camel/blob/d78e0908/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java -- diff --git a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java new file mode 100644 index 000..494b5de --- /dev/null +++ b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/SjmsComponentRestartTest.java @@ -0,0 +1,112 @@ +/** + * 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
camel git commit: Added camel-jolt docs to Gitbook
Repository: camel Updated Branches: refs/heads/master ab953ee04 -> d527303c8 Added camel-jolt docs to Gitbook Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d527303c Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d527303c Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d527303c Branch: refs/heads/master Commit: d527303c81ced4b484192daefc03be4eefdfdbc8 Parents: ab953ee Author: Andrea CosentinoAuthored: Thu Apr 28 12:28:37 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 12:30:05 2016 +0200 -- components/camel-jolt/src/main/docs/jolt.adoc | 119 + docs/user-manual/en/SUMMARY.md| 1 + 2 files changed, 120 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d527303c/components/camel-jolt/src/main/docs/jolt.adoc -- diff --git a/components/camel-jolt/src/main/docs/jolt.adoc b/components/camel-jolt/src/main/docs/jolt.adoc new file mode 100644 index 000..68cc1d2 --- /dev/null +++ b/components/camel-jolt/src/main/docs/jolt.adoc @@ -0,0 +1,119 @@ +[[JOLT-JOLTComponent]] +JOLT Component +~~ + +*Available as of Camel 2.16* + +The *jolt:* component allows you to process a JSON messages using an +http://bazaarvoice.github.io/jolt/[JOLT] specification. This can be +ideal when doing JSON to JSON transformation. + +Maven users will need to add the following dependency to +their `pom.xml` for this component: + +[source,xml] + + +org.apache.camel +camel-jolt +x.x.x + + + + + + +[[JOLT-URIformat]] +URI format +^^ + +[source,java] +--- +jolt:specName[?options] +--- + +Where *specName* is the classpath-local URI of the specification to +invoke; or the complete URL of the remote specification +(eg: file://folder/myfile.vm[file://folder/myfile.json]). + +You can append query options to the URI in the following +format, `?option=value=value&...` + +[[JOLT-Options]] +Options +^^^ + + +// component options: START +The JOLT component supports 1 options which are listed below. + + + +[width="100%",cols="2s,1m,8",options="header"] +|=== +| Name | Java Type | Description +| transform | Transform | Explicitly sets the Transform to use. If not set a Transform specified by the transformDsl will be created +|=== +// component options: END + + + +// endpoint options: START +The JOLT component supports 7 endpoint options which are listed below: + +[width="100%",cols="2s,1,1m,1m,5",options="header"] +|=== +| Name | Group | Default | Java Type | Description +| resourceUri | producer | | String | *Required* Path to the resource or a reference to lookup a bean in the Registry to use as the resource +| contentCache | producer | false | boolean | Sets whether to use resource content cache or not +| inputType | producer | Hydrated | JoltInputOutputType | Specifies if the input is hydrated JSON or a JSON String. +| outputType | producer | Hydrated | JoltInputOutputType | Specifies if the output should be hydrated JSON or a JSON String. +| transformDsl | producer | Chainr | JoltTransformType | Specifies the Transform DSL of the endpoint resource. If none is specified Chainr will be used. +| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange +| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). +|=== +// endpoint options: END + + +[[JOLT-Samples]] +Samples +^^^ + +For example you could use something like + +[source,java] +-- +from("activemq:My.Queue"). + to("jolt:com/acme/MyResponse.json"); +-- + +And a file based resource: + +[source,java] +--- +from("activemq:My.Queue"). + to("jolt:file://myfolder/MyResponse.json?contentCache=true"). + to("activemq:Another.Queue"); +--- + +You can also specify what specification the component should use +dynamically via a header, so for example: + +[source,java] +-
camel git commit: CAMEL-9822: Upgrade to DeltaSpike 1.6.1
Repository: camel Updated Branches: refs/heads/master c4a880268 -> ab953ee04 CAMEL-9822: Upgrade to DeltaSpike 1.6.1 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ab953ee0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ab953ee0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ab953ee0 Branch: refs/heads/master Commit: ab953ee046a3a28fff7ef5db3a4537742d8fdb13 Parents: c4a8802 Author: Antonin StefanuttiAuthored: Thu Apr 28 12:27:32 2016 +0200 Committer: Antonin Stefanutti Committed: Thu Apr 28 12:27:32 2016 +0200 -- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/ab953ee0/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index a4c65a3..c2a65a8 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -135,7 +135,7 @@ [3.0,4.0) 3.0.5 3.0.5 -1.5.4 +1.6.1 10.11.1.1 3.3.4 2.1.7
[1/2] camel git commit: Added camel-jing docs to Gitbook
Repository: camel Updated Branches: refs/heads/master 285550797 -> c4a880268 Added camel-jing docs to Gitbook Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c3d42cdf Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c3d42cdf Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c3d42cdf Branch: refs/heads/master Commit: c3d42cdf70ecf8cd9e5fe7568149a3e37e889755 Parents: 2855507 Author: Andrea CosentinoAuthored: Thu Apr 28 12:02:34 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 12:02:53 2016 +0200 -- components/camel-jing/src/main/docs/jing.adoc | 86 ++ docs/user-manual/en/SUMMARY.md| 1 + 2 files changed, 87 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c3d42cdf/components/camel-jing/src/main/docs/jing.adoc -- diff --git a/components/camel-jing/src/main/docs/jing.adoc b/components/camel-jing/src/main/docs/jing.adoc new file mode 100644 index 000..5e96985 --- /dev/null +++ b/components/camel-jing/src/main/docs/jing.adoc @@ -0,0 +1,86 @@ +[[Jing-JingComponent]] +Jing Component +~~ + +The Jing component uses the +http://www.thaiopensource.com/relaxng/jing.html[Jing Library] to perform +XML validation of the message body using either + +* http://relaxng.org/[RelaxNG XML Syntax] +* http://relaxng.org/compact-tutorial-20030326.html[RelaxNG Compact +Syntax] + +Maven users will need to add the following dependency to their `pom.xml` +for this component: + +[source,java] + + +org.apache.camel +camel-jing +x.x.x + + + + +Note that the link:msv.html[MSV] component can also support RelaxNG XML +syntax. + +[[Jing-URIformatCamel2.16]] +URI format Camel 2.16 +^ + +[source,java] +-- +jing:someLocalOrRemoteResource +-- + +From Camel 2.16 the component use jing as name, and you can use the +option compactSyntax to turn on either RNG or RNC mode. + +[[Jing-Options]] +Options +^^^ + + +// component options: START +The Jing component has no options. +// component options: END + + + +// endpoint options: START +The Jing component supports 4 endpoint options which are listed below: + +[width="100%",cols="2s,1,1m,1m,5",options="header"] +|=== +| Name | Group | Default | Java Type | Description +| resourceUri | producer | | String | *Required* URL to a local resource on the classpath or a full URL to a remote resource or resource on the file system which contains the schema to validate against. +| compactSyntax | producer | false | boolean | Whether to validate using RelaxNG compact syntax or not. By default this is false for using RelaxNG XML Syntax (rng) And true is for using RelaxNG Compact Syntax (rnc) +| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange +| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). +|=== +// endpoint options: END + + +[[Jing-Example]] +Example +^^^ + +The following +http://svn.apache.org/repos/asf/camel/trunk/components/camel-jing/src/test/resources/org/apache/camel/component/validator/jing/rnc-context.xml[example] +shows how to configure a route from the endpoint *direct:start* which +then goes to one of two endpoints, either *mock:valid* or *mock:invalid* +based on whether or not the XML matches the given +http://relaxng.org/compact-tutorial-20030326.html[RelaxNG Compact +Syntax] schema (which is supplied on the classpath). + +[[Jing-SeeAlso]] +See Also + + +* link:configuring-camel.html[Configuring Camel] +* link:component.html[Component] +* link:endpoint.html[Endpoint] +* link:getting-started.html[Getting Started] + http://git-wip-us.apache.org/repos/asf/camel/blob/c3d42cdf/docs/user-manual/en/SUMMARY.md -- diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md index 252fcb4..421fec2 100644 --- a/docs/user-manual/en/SUMMARY.md +++ b/docs/user-manual/en/SUMMARY.md @@ -172,6 +172,7 @@ * [JDBC](jdbc.adoc) * [Jetty](jetty.adoc) * [Jgroups](jgroups.adoc) +* [Jing](jing.adoc) * [Kafka](kafka.adoc) * [Metrics](metrics.adoc) * [Mock](mock.adoc)
[2/2] camel git commit: Added camel-jira docs to Gitbook
Added camel-jira docs to Gitbook Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c4a88026 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c4a88026 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c4a88026 Branch: refs/heads/master Commit: c4a880268c431537df3b940b908029675b6bf188 Parents: c3d42cd Author: Andrea CosentinoAuthored: Thu Apr 28 12:20:34 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 12:20:34 2016 +0200 -- components/camel-jira/src/main/docs/jira.adoc | 108 + docs/user-manual/en/SUMMARY.md| 1 + 2 files changed, 109 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c4a88026/components/camel-jira/src/main/docs/jira.adoc -- diff --git a/components/camel-jira/src/main/docs/jira.adoc b/components/camel-jira/src/main/docs/jira.adoc new file mode 100644 index 000..4706cf5 --- /dev/null +++ b/components/camel-jira/src/main/docs/jira.adoc @@ -0,0 +1,108 @@ +[[JIRA-JIRA]] +JIRA + + +*Available as of Camel 2.15* + +The JIRA component interacts with the JIRA API by encapsulating +Atlassian's https://marketplace.atlassian.com/plugins/com.atlassian.jira.jira-rest-java-client[REST +Java Client for JIRA]. It currently provides polling for new issues and +new comments.  It is also able to create new issues. + +Rather than webhooks, this endpoint relies on simple polling. Reasons +include: + +* Concern for reliability/stability +* The types of payloads we're polling aren't typically large (plus, +paging is available in the API) +* The need to support apps running somewhere not publicly accessible +where a webhook would fail + +Note that the JIRA API is fairly expansive.  Therefore, this component +could be easily expanded to provide additional interactions. + +Maven users will need to add the following dependency to their pom.xml +for this component: + +[source,xml] +--- + +org.apache.camel +camel-jira +${camel-version} + +--- + +[[JIRA-URIformat]] +URI format +^^ + +[source,text] +- +jira://endpoint[?options] +- + +[[JIRA-Options:]] +JIRA Options +^ + + +// component options: START +The JIRA component has no options. +// component options: END + + + +// endpoint options: START +The JIRA component supports 10 endpoint options which are listed below: + +[width="100%",cols="2s,1,1m,1m,5",options="header"] +|=== +| Name | Group | Default | Java Type | Description +| type | common | | JIRAType | *Required* Operation to perform such as create a new issue or a new comment +| password | common | | String | Password for login +| serverUrl | common | | String | *Required* URL to the JIRA server +| username | common | | String | Username for login +| bridgeErrorHandler | consumer | false | boolean | 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/ERROR level and ignored. +| delay | consumer | 6000 | int | Delay in seconds when querying JIRA using the consumer. +| jql | consumer | | String | JQL is the query language from JIRA which allows you to retrieve the data you want. For example jql=project=MyProject Where MyProject is the product key in Jira. +| exceptionHandler | consumer (advanced) | | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored. +| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange +| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). +|=== +// endpoint options: END + + +[[JIRA-JQL:]] +JQL: + + +The JQL URI option is used by both consumer endpoints.  Theoretically, +items like "project key", etc. could be URI options themselves. + However, by requiring the use of JQL, the consumers become much more +flexible and powerful. + +At the bare minimum, the consumers will require the
camel git commit: CAMEL-9882: Add Javadoc
Repository: camel Updated Branches: refs/heads/master 3b977a265 -> 285550797 CAMEL-9882: Add Javadoc Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/28555079 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/28555079 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/28555079 Branch: refs/heads/master Commit: 285550797b68275bda37f19ae7a0be6835a2d9b5 Parents: 3b977a2 Author: Antonin StefanuttiAuthored: Thu Apr 28 11:46:07 2016 +0200 Committer: Antonin Stefanutti Committed: Thu Apr 28 11:46:07 2016 +0200 -- .../org/apache/camel/cdi/ImportResource.java| 67 1 file changed, 67 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/28555079/components/camel-cdi/src/main/java/org/apache/camel/cdi/ImportResource.java -- diff --git a/components/camel-cdi/src/main/java/org/apache/camel/cdi/ImportResource.java b/components/camel-cdi/src/main/java/org/apache/camel/cdi/ImportResource.java index b21c757..01cc041 100644 --- a/components/camel-cdi/src/main/java/org/apache/camel/cdi/ImportResource.java +++ b/components/camel-cdi/src/main/java/org/apache/camel/cdi/ImportResource.java @@ -21,9 +21,76 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * Indicates one or more resources representing http://camel.apache.org/http://camel.apache.org/xml-configuration.html;>Camel XML configuration + * to import. Resources are currently loaded from the classpath. + * + * {@code CamelContext} elements and other Camel primitives are automatically + * deployed as CDI beans during the container bootstrap so that they become + * available for injection at runtime. If such an element has an explicit + * {@code id} attribute set, the corresponding CDI bean is qualified with the + * {@code @Named} qualifier, e.g., given the following Camel XML configuration: + * + * {@code + * + * + * + * + * + * + * } + * + * Corresponding CDI beans are automatically deployed and can be injected, e.g.: + * + * + * {@literal @}Inject + * {@literal @}ContextName("foo") + * CamelContext context; + * + * + * + * {@literal @}Inject + * {@literal @}Named("bar") + * Endpoint endpoint; + * + * + * Note that {@code CamelContext} beans are automatically qualified with both + * the {@code Named} and {@code ContextName} qualifiers. If the imported + * {@code CamelContext} element doesn't have an {@code id} attribute, the + * corresponding bean is deployed with the built-in {@code Default} qualifier. + * + * Conversely, CDI beans deployed in the application can be referred to from + * the Camel XML configuration, usually using the {@code ref} attribute, e.g., + * given the following bean declared: + * + * + * {@literal @}Produces + * {@literal @}Named("baz") + * Processor processor = exchange{@literal ->} exchange.getIn().setHeader("qux", "quux"); + * + * + * A reference to that bean can be declared in the imported Camel XML configuration, + * e.g.: + * + * {@code + * + * + * + * + * + * + * } + * + * @since 2.18.0 + */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface ImportResource { +/** + * Resource locations from which to import Camel XML configuration. + * + * @return the locations of the resources to import + */ String[] value() default {}; }
svn commit: r986921 - in /websites/production/camel/content: cache/main.pageCache camel-2180-release.html
Author: buildbot Date: Thu Apr 28 09:18:46 2016 New Revision: 986921 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2180-release.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/camel-2180-release.html == --- websites/production/camel/content/camel-2180-release.html (original) +++ websites/production/camel/content/camel-2180-release.html Thu Apr 28 09:18:46 2016 @@ -85,7 +85,7 @@ -Camel 2.18.0 release (currently in progress)http://camel.apache.org/download.data/camel-box-v1.0-150x200.png; data-image-src="http://camel.apache.org/download.data/camel-box-v1.0-150x200.png;>New and NoteworthyWelcome to the 2.18.0 release which approx XXX issues resolved (new features, improvements and bug fixes such as...)Added Hystrix EIP as EIP pattern that uses native Hystrix as the Circuit Breaker implementation.This requires havingcamel-hsytrixon the classpath.Improved theBean component to better match method parameter types when usingSimple language as parameter values.AddedBindyConverter that allows to implement custom data converters forBindyThe access in theRest DSL has been deprecated and no longer in use - its not part of swagger specification anymore.Camel-NATSnow uses JNATS client instead of the deprecated Java_nats one.During startup ofCamelContext the services that are used as part of routes are now deferred being started to the end of the startup process. Some IoC frameworks like Spring can otherwise causes a circular dependency issue if services are started too early. A side effect is that if service startup failures happen w hen being started later, they are now wrapped in the FailedToStartupRouteException to better pin point which route thas the problem.Improved the startup sequence ofSpring Java Config to be similar toSpring Boot that helps prevent Spring initialization errors about circular dependencies issues.Added PATCH toRest DSLAdded "starts with" and "ends with" operator to the Simplelanguage.AddedBeanIOSplitter toBeanIO that can be used with theSplitter EIP to split big payloads in streaming mode without reading the entire content into memory.Some of the AWScomponents allows to specify ARN in the endpoint configuration.The create operation inZookeeper now creates sub paths if missing.Added support for async mode forSERVLET component to leverage Asynchronous Servlet from the Servlet 3.0 spec.Beancomponent and Bean Languagevalidates method name must be a valid according to java identifier rules, and also if parameter syntax has an ending parenthesis.You can now use@RunWith(CamelSpringBootJUnit4ClassRunner.class) to test CamelSpring Bootapplications and use the Camel test annotations fromSpring Testing such as@MockEndpoints.To turn on logging exhausted message body with the message history you can configur e this easily on the CamelContext level withsetLogExhaustedMessageBodyCamel-Infinispan now supports Aggregation Repository: InfinispanLocalAggregationRepository and InfinispanRemoteAggregationRepositoryFixed these issuesFixedBean component to avoid ambiguous error for classes that extends generic interface and calling which could lead to falsely duplicate methods (due Java type erasure inserts bridge methods)Fixed splitting usingtarfile could cause OOME if splitting big files which was mistakenly loaded into memory. Now we work on the tar stream directly.FixedNetty HTTP andNetty4 HTTP issue when not specifying a port number then port 80 would not be used but an error about port -1 is not allowed.FixedSwagger Java when using property placeholders inRest DSL could cause invalid parameters to be included that was from the placeholder.ThethreadsEIP now letsError handling in Camelperform redeliveries if the thread pool would otherwise reject accepting the task. This allows the error handler to perform redeliveries to attempt to put the task on the thread pool queue, or eventually move the message to a dead letter queue etc.FixedRest DSL adding empty header if specifying a non required query parameter that has no default value assigned.Fixed doWhile loop which could potentially loop forever.Fixed a NPE inZookeeper consumer if no zookeeper nod e path was setSpring-DM for OSGi moved out of camel-spring into a separate camel-spring-dm module.When using continued with onException then dead letter channel endpooint should not be invoked.FixedError Handler to not log exceptions when usingcontinued(true) by default.Fixed so using shareUnitOfWork would now also call specializedAggregationStrategyfor onTimeone, onCompletion etc.New Enterprise Integration
camel git commit: Camel-Jetty9: Added scope test to OkHttp Client 3 dependency
Repository: camel Updated Branches: refs/heads/camel-2.17.x 28317b2ad -> 31e45f488 Camel-Jetty9: Added scope test to OkHttp Client 3 dependency Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/31e45f48 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/31e45f48 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/31e45f48 Branch: refs/heads/camel-2.17.x Commit: 31e45f488f4d4cdeb50eae84ebdfd4ba4477ac42 Parents: 28317b2 Author: Andrea CosentinoAuthored: Thu Apr 28 10:58:17 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 11:01:00 2016 +0200 -- components/camel-jetty9/pom.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/31e45f48/components/camel-jetty9/pom.xml -- diff --git a/components/camel-jetty9/pom.xml b/components/camel-jetty9/pom.xml index 8b55bd8..577167b 100644 --- a/components/camel-jetty9/pom.xml +++ b/components/camel-jetty9/pom.xml @@ -132,6 +132,7 @@ com.squareup.okhttp3 okhttp ${okclient-version} + test
camel git commit: Camel-Jetty9: Added scope test to OkHttp Client 3 dependency
Repository: camel Updated Branches: refs/heads/master 9d56ba7e1 -> 3b977a265 Camel-Jetty9: Added scope test to OkHttp Client 3 dependency # Please enter the commit message for your changes. Lines starting Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3b977a26 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3b977a26 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3b977a26 Branch: refs/heads/master Commit: 3b977a265e7eed4053f71f9bb1381bad23784165 Parents: 9d56ba7 Author: Andrea CosentinoAuthored: Thu Apr 28 10:58:17 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 10:59:09 2016 +0200 -- components/camel-jetty9/pom.xml | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3b977a26/components/camel-jetty9/pom.xml -- diff --git a/components/camel-jetty9/pom.xml b/components/camel-jetty9/pom.xml index 35e0dc2..d3b6287 100644 --- a/components/camel-jetty9/pom.xml +++ b/components/camel-jetty9/pom.xml @@ -131,6 +131,7 @@ com.squareup.okhttp3 okhttp ${okclient-version} + test
[1/2] camel git commit: CAMEL-9874: Camel Jetty consumer endpoint incorrectly handles multipart/form-data
Repository: camel Updated Branches: refs/heads/camel-2.17.x 53630bdb4 -> 28317b2ad refs/heads/master d4a724684 -> 9d56ba7e1 CAMEL-9874: Camel Jetty consumer endpoint incorrectly handles multipart/form-data Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9d56ba7e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9d56ba7e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9d56ba7e Branch: refs/heads/master Commit: 9d56ba7e1066c4c3059be870fbc920880c27db29 Parents: d4a7246 Author: Claus IbsenAuthored: Thu Apr 28 10:27:02 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 10:27:12 2016 +0200 -- components/camel-jetty9/pom.xml | 6 ++ .../component/jetty9/AttachmentHttpBinding.java | 5 -- .../jetty/HttpBridgeMultipartRouteTest.java | 2 +- .../jetty/MultiPartFormOkHttpTest.java | 76 .../component/jetty/MultiPartFormTest.java | 2 +- .../MultiPartFormWithCustomFilterTest.java | 4 +- parent/pom.xml | 1 + 7 files changed, 87 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/9d56ba7e/components/camel-jetty9/pom.xml -- diff --git a/components/camel-jetty9/pom.xml b/components/camel-jetty9/pom.xml index d91c982..35e0dc2 100644 --- a/components/camel-jetty9/pom.xml +++ b/components/camel-jetty9/pom.xml @@ -126,6 +126,12 @@ camel-jaxb test + + + com.squareup.okhttp3 + okhttp + ${okclient-version} + junit http://git-wip-us.apache.org/repos/asf/camel/blob/9d56ba7e/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java -- diff --git a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java index 7a3fb37..1b7bca1 100644 --- a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java +++ b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java @@ -49,11 +49,6 @@ final class AttachmentHttpBinding extends DefaultHttpBinding { try { parts = parser.getParts(); for (Part part : parts) { -String contentType = part.getContentType(); -if (!contentType.startsWith("application/octet-stream")) { -continue; -} - DataSource ds = new PartDataSource(part); message.addAttachment(part.getName(), new DataHandler(ds)); } http://git-wip-us.apache.org/repos/asf/camel/blob/9d56ba7e/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpBridgeMultipartRouteTest.java -- diff --git a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpBridgeMultipartRouteTest.java b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpBridgeMultipartRouteTest.java index e7797c7..ac09f30 100644 --- a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpBridgeMultipartRouteTest.java +++ b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpBridgeMultipartRouteTest.java @@ -65,7 +65,7 @@ public class HttpBridgeMultipartRouteTest extends BaseJettyTest { assertEquals(body, responseBody); String numAttachments = method.getResponseHeader("numAttachments").getValue(); -assertEquals(numAttachments, "1"); +assertEquals(numAttachments, "2"); } protected RouteBuilder createRouteBuilder() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/9d56ba7e/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/MultiPartFormOkHttpTest.java -- diff --git a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/MultiPartFormOkHttpTest.java b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/MultiPartFormOkHttpTest.java new file mode 100644 index 000..1221cc9 --- /dev/null +++ b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/MultiPartFormOkHttpTest.java @@ -0,0 +1,76 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with
[2/2] camel git commit: CAMEL-9874: Camel Jetty consumer endpoint incorrectly handles multipart/form-data
CAMEL-9874: Camel Jetty consumer endpoint incorrectly handles multipart/form-data Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/28317b2a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/28317b2a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/28317b2a Branch: refs/heads/camel-2.17.x Commit: 28317b2ad7be507ddade36429f68926dcfc045a7 Parents: 53630bd Author: Claus IbsenAuthored: Thu Apr 28 10:27:02 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 10:27:52 2016 +0200 -- components/camel-jetty9/pom.xml | 6 ++ .../component/jetty9/AttachmentHttpBinding.java | 5 -- .../jetty/HttpBridgeMultipartRouteTest.java | 2 +- .../jetty/MultiPartFormOkHttpTest.java | 76 .../component/jetty/MultiPartFormTest.java | 2 +- .../MultiPartFormWithCustomFilterTest.java | 4 +- parent/pom.xml | 1 + 7 files changed, 87 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/28317b2a/components/camel-jetty9/pom.xml -- diff --git a/components/camel-jetty9/pom.xml b/components/camel-jetty9/pom.xml index 9a5e517..8b55bd8 100644 --- a/components/camel-jetty9/pom.xml +++ b/components/camel-jetty9/pom.xml @@ -127,6 +127,12 @@ camel-jaxb test + + + com.squareup.okhttp3 + okhttp + ${okclient-version} + junit http://git-wip-us.apache.org/repos/asf/camel/blob/28317b2a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java -- diff --git a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java index f798714..4d88670 100644 --- a/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java +++ b/components/camel-jetty9/src/main/java/org/apache/camel/component/jetty9/AttachmentHttpBinding.java @@ -44,11 +44,6 @@ final class AttachmentHttpBinding extends DefaultHttpBinding { try { parts = parser.getParts(); for (Part part : parts) { -String contentType = part.getContentType(); -if (!contentType.startsWith("application/octet-stream")) { -continue; -} - DataSource ds = new PartDataSource(part); message.addAttachment(part.getName(), new DataHandler(ds)); } http://git-wip-us.apache.org/repos/asf/camel/blob/28317b2a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpBridgeMultipartRouteTest.java -- diff --git a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpBridgeMultipartRouteTest.java b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpBridgeMultipartRouteTest.java index e7797c7..ac09f30 100644 --- a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpBridgeMultipartRouteTest.java +++ b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/HttpBridgeMultipartRouteTest.java @@ -65,7 +65,7 @@ public class HttpBridgeMultipartRouteTest extends BaseJettyTest { assertEquals(body, responseBody); String numAttachments = method.getResponseHeader("numAttachments").getValue(); -assertEquals(numAttachments, "1"); +assertEquals(numAttachments, "2"); } protected RouteBuilder createRouteBuilder() throws Exception { http://git-wip-us.apache.org/repos/asf/camel/blob/28317b2a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/MultiPartFormOkHttpTest.java -- diff --git a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/MultiPartFormOkHttpTest.java b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/MultiPartFormOkHttpTest.java new file mode 100644 index 000..1221cc9 --- /dev/null +++ b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/MultiPartFormOkHttpTest.java @@ -0,0 +1,76 @@ +/** + * 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
svn commit: r986918 - in /websites/production/camel/content: cache/main.pageCache cdi.html
Author: buildbot Date: Thu Apr 28 08:18:36 2016 New Revision: 986918 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/cdi.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/cdi.html == --- websites/production/camel/content/cdi.html (original) +++ websites/production/camel/content/cdi.html Thu Apr 28 08:18:36 2016 @@ -349,6 +349,12 @@ PlatformTransactionManager createTransac +As of Camel 2.18, it is possible to observe events for a particular route (RouteAddedEvent, RouteStartedEvent, RouteStoppedEvent and RouteRemovedEvent) should it have an explicit defined, e.g.: + When multiple Camel contexts exist in the CDI container, the Camel context bean qualifiers, like@ContextName,can be used to refine the observer method resolution to a particular Camel context as specified inhttp://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#observer_resolution; rel="nofollow">observer resolution, e.g.:
[1/2] camel git commit: CAMEL-9805: camel-sql - body not copied from in to out when useing outputHeader and outputType=SelectOne when sql doesn't return a result
Repository: camel Updated Branches: refs/heads/camel-2.16.x 9216caf3d -> 54b3bf740 CAMEL-9805: camel-sql - body not copied from in to out when useing outputHeader and outputType=SelectOne when sql doesn't return a result Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/680444ea Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/680444ea Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/680444ea Branch: refs/heads/camel-2.16.x Commit: 680444ea87800ad22166cc33ef8e20315c172f9a Parents: 9216caf Author: Andrea CosentinoAuthored: Thu Apr 28 09:35:28 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 09:57:28 2016 +0200 -- .../apache/camel/component/sql/SqlProducer.java | 7 +++ ...ProducerOutputTypeSelectOneNoResultTest.java | 61 .../sql/createAndPopulateDatabase5.sql | 6 ++ 3 files changed, 74 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/680444ea/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java -- diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java index 9f2e9d2..7db8772 100644 --- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java +++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java @@ -175,6 +175,13 @@ public class SqlProducer extends DefaultProducer { exchange.getOut().setBody(data); } exchange.getOut().setHeader(SqlConstants.SQL_ROW_COUNT, 1); +} else { +if (getEndpoint().isNoop()) { + exchange.getOut().setBody(exchange.getIn().getBody()); +} else if (getEndpoint().getOutputHeader() != null) { + exchange.getOut().setBody(exchange.getIn().getBody()); +} + exchange.getOut().setHeader(SqlConstants.SQL_ROW_COUNT, 0); } } else { throw new IllegalArgumentException("Invalid outputType=" + outputType); http://git-wip-us.apache.org/repos/asf/camel/blob/680444ea/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java -- diff --git a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java new file mode 100644 index 000..a476d68 --- /dev/null +++ b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java @@ -0,0 +1,61 @@ +package org.apache.camel.component.sql; + +import org.apache.camel.EndpointInject; +import org.apache.camel.Produce; +import org.apache.camel.ProducerTemplate; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.test.junit4.CamelTestSupport; +import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; + +public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport{ + +@EndpointInject(uri = "mock:result") +MockEndpoint result; + +private EmbeddedDatabase db; + +@Before +public void setUp() throws Exception { +db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase5.sql").build(); + +super.setUp(); +} + +@After +public void tearDown() throws Exception { +super.tearDown(); + +db.shutdown(); +} + + @Test + public void testSqlEndpoint() throws Exception { + + String expectedBody = "body"; + result.expectedBodiesReceived(expectedBody); + template.sendBody("direct:start",expectedBody); + result.assertIsSatisfied(); + + } + + +@Override +
[2/2] camel git commit: Fixed CS
Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/54b3bf74 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/54b3bf74 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/54b3bf74 Branch: refs/heads/camel-2.16.x Commit: 54b3bf74045ccb34b9180bedbe49e0a8415e29f0 Parents: 680444e Author: Andrea CosentinoAuthored: Thu Apr 28 09:54:50 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 09:57:38 2016 +0200 -- ...ProducerOutputTypeSelectOneNoResultTest.java | 43 1 file changed, 27 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/54b3bf74/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java -- diff --git a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java index a476d68..5f7b721 100644 --- a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java +++ b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java @@ -1,12 +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-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.sql; import org.apache.camel.EndpointInject; -import org.apache.camel.Produce; -import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; -import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -14,7 +27,7 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; -public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport{ +public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport { @EndpointInject(uri = "mock:result") MockEndpoint result; @@ -35,15 +48,13 @@ public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport db.shutdown(); } - @Test - public void testSqlEndpoint() throws Exception { - - String expectedBody = "body"; - result.expectedBodiesReceived(expectedBody); - template.sendBody("direct:start",expectedBody); - result.assertIsSatisfied(); - - } +@Test +public void testSqlEndpoint() throws Exception { +String expectedBody = "body"; +result.expectedBodiesReceived(expectedBody); +template.sendBody("direct:start", expectedBody); +result.assertIsSatisfied(); +} @Override @@ -52,9 +63,9 @@ public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport public void configure() { getContext().getComponent("sql", SqlComponent.class).setDataSource(db); - from("direct:start") - .to("sql:select id from mytable where 1 = 2?outputHeader=myHeader=SelectOne") - .log("${body}").to("mock:result"); +from("direct:start") +.to("sql:select id from mytable where 1 = 2?outputHeader=myHeader=SelectOne") +.log("${body}").to("mock:result"); } }; }
[2/2] camel git commit: Fixed CS
Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/53630bdb Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/53630bdb Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/53630bdb Branch: refs/heads/camel-2.17.x Commit: 53630bdb4ddf90494894543933e8dad151bdb02f Parents: 9c2144e Author: Andrea CosentinoAuthored: Thu Apr 28 09:54:50 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 09:56:27 2016 +0200 -- ...ProducerOutputTypeSelectOneNoResultTest.java | 43 1 file changed, 27 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/53630bdb/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java -- diff --git a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java index a476d68..5f7b721 100644 --- a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java +++ b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java @@ -1,12 +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-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.sql; import org.apache.camel.EndpointInject; -import org.apache.camel.Produce; -import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; -import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -14,7 +27,7 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; -public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport{ +public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport { @EndpointInject(uri = "mock:result") MockEndpoint result; @@ -35,15 +48,13 @@ public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport db.shutdown(); } - @Test - public void testSqlEndpoint() throws Exception { - - String expectedBody = "body"; - result.expectedBodiesReceived(expectedBody); - template.sendBody("direct:start",expectedBody); - result.assertIsSatisfied(); - - } +@Test +public void testSqlEndpoint() throws Exception { +String expectedBody = "body"; +result.expectedBodiesReceived(expectedBody); +template.sendBody("direct:start", expectedBody); +result.assertIsSatisfied(); +} @Override @@ -52,9 +63,9 @@ public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport public void configure() { getContext().getComponent("sql", SqlComponent.class).setDataSource(db); - from("direct:start") - .to("sql:select id from mytable where 1 = 2?outputHeader=myHeader=SelectOne") - .log("${body}").to("mock:result"); +from("direct:start") +.to("sql:select id from mytable where 1 = 2?outputHeader=myHeader=SelectOne") +.log("${body}").to("mock:result"); } }; }
[1/2] camel git commit: CAMEL-9805: camel-sql - body not copied from in to out when useing outputHeader and outputType=SelectOne when sql doesn't return a result
Repository: camel Updated Branches: refs/heads/camel-2.17.x 415868644 -> 53630bdb4 CAMEL-9805: camel-sql - body not copied from in to out when useing outputHeader and outputType=SelectOne when sql doesn't return a result Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9c2144eb Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9c2144eb Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9c2144eb Branch: refs/heads/camel-2.17.x Commit: 9c2144ebe427c4f43d448567424cca37c265fa31 Parents: 4158686 Author: Andrea CosentinoAuthored: Thu Apr 28 09:35:28 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 09:56:11 2016 +0200 -- .../apache/camel/component/sql/SqlProducer.java | 7 +++ ...ProducerOutputTypeSelectOneNoResultTest.java | 61 .../sql/createAndPopulateDatabase5.sql | 6 ++ 3 files changed, 74 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/9c2144eb/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java -- diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java index 6e17cd0..da5f065 100644 --- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java +++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java @@ -182,6 +182,13 @@ public class SqlProducer extends DefaultProducer { exchange.getOut().setBody(data); } exchange.getOut().setHeader(SqlConstants.SQL_ROW_COUNT, 1); +} else { +if (getEndpoint().isNoop()) { + exchange.getOut().setBody(exchange.getIn().getBody()); +} else if (getEndpoint().getOutputHeader() != null) { + exchange.getOut().setBody(exchange.getIn().getBody()); +} + exchange.getOut().setHeader(SqlConstants.SQL_ROW_COUNT, 0); } } else { throw new IllegalArgumentException("Invalid outputType=" + outputType); http://git-wip-us.apache.org/repos/asf/camel/blob/9c2144eb/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java -- diff --git a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java new file mode 100644 index 000..a476d68 --- /dev/null +++ b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java @@ -0,0 +1,61 @@ +package org.apache.camel.component.sql; + +import org.apache.camel.EndpointInject; +import org.apache.camel.Produce; +import org.apache.camel.ProducerTemplate; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.test.junit4.CamelTestSupport; +import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; + +public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport{ + +@EndpointInject(uri = "mock:result") +MockEndpoint result; + +private EmbeddedDatabase db; + +@Before +public void setUp() throws Exception { +db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase5.sql").build(); + +super.setUp(); +} + +@After +public void tearDown() throws Exception { +super.tearDown(); + +db.shutdown(); +} + + @Test + public void testSqlEndpoint() throws Exception { + + String expectedBody = "body"; + result.expectedBodiesReceived(expectedBody); + template.sendBody("direct:start",expectedBody); + result.assertIsSatisfied(); + + } + + +@Override +
[2/2] camel git commit: CAMEL-9805: camel-sql - body not copied from in to out when useing outputHeader and outputType=SelectOne when sql doesn't return a result
CAMEL-9805: camel-sql - body not copied from in to out when useing outputHeader and outputType=SelectOne when sql doesn't return a result Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d61ffbdc Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d61ffbdc Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d61ffbdc Branch: refs/heads/master Commit: d61ffbdc0f3efcbb0f188a3968e3e8ceeab08450 Parents: d22b0d7 Author: Andrea CosentinoAuthored: Thu Apr 28 09:35:28 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 09:55:11 2016 +0200 -- .../apache/camel/component/sql/SqlProducer.java | 7 +++ ...ProducerOutputTypeSelectOneNoResultTest.java | 61 .../sql/createAndPopulateDatabase5.sql | 6 ++ 3 files changed, 74 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d61ffbdc/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java -- diff --git a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java index 6e17cd0..da5f065 100644 --- a/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java +++ b/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java @@ -182,6 +182,13 @@ public class SqlProducer extends DefaultProducer { exchange.getOut().setBody(data); } exchange.getOut().setHeader(SqlConstants.SQL_ROW_COUNT, 1); +} else { +if (getEndpoint().isNoop()) { + exchange.getOut().setBody(exchange.getIn().getBody()); +} else if (getEndpoint().getOutputHeader() != null) { + exchange.getOut().setBody(exchange.getIn().getBody()); +} + exchange.getOut().setHeader(SqlConstants.SQL_ROW_COUNT, 0); } } else { throw new IllegalArgumentException("Invalid outputType=" + outputType); http://git-wip-us.apache.org/repos/asf/camel/blob/d61ffbdc/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java -- diff --git a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java new file mode 100644 index 000..a476d68 --- /dev/null +++ b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java @@ -0,0 +1,61 @@ +package org.apache.camel.component.sql; + +import org.apache.camel.EndpointInject; +import org.apache.camel.Produce; +import org.apache.camel.ProducerTemplate; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.test.junit4.CamelTestSupport; +import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; +import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; + +public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport{ + +@EndpointInject(uri = "mock:result") +MockEndpoint result; + +private EmbeddedDatabase db; + +@Before +public void setUp() throws Exception { +db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase5.sql").build(); + +super.setUp(); +} + +@After +public void tearDown() throws Exception { +super.tearDown(); + +db.shutdown(); +} + + @Test + public void testSqlEndpoint() throws Exception { + + String expectedBody = "body"; + result.expectedBodiesReceived(expectedBody); + template.sendBody("direct:start",expectedBody); + result.assertIsSatisfied(); + + } + + +@Override +protected RouteBuilder createRouteBuilder() throws Exception { +return new RouteBuilder()
[1/2] camel git commit: Fixed CS
Repository: camel Updated Branches: refs/heads/master d22b0d7cd -> d4a724684 Fixed CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d4a72468 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d4a72468 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d4a72468 Branch: refs/heads/master Commit: d4a724684b9ae3dcd62d87d9cf300bc73b3d5f2a Parents: d61ffbd Author: Andrea CosentinoAuthored: Thu Apr 28 09:54:50 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 09:55:11 2016 +0200 -- ...ProducerOutputTypeSelectOneNoResultTest.java | 43 1 file changed, 27 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d4a72468/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java -- diff --git a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java index a476d68..5f7b721 100644 --- a/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java +++ b/components/camel-sql/src/test/java/org/apache/camel/component/sql/SqlProducerOutputTypeSelectOneNoResultTest.java @@ -1,12 +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-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.sql; import org.apache.camel.EndpointInject; -import org.apache.camel.Produce; -import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; -import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -14,7 +27,7 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabase; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; -public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport{ +public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport { @EndpointInject(uri = "mock:result") MockEndpoint result; @@ -35,15 +48,13 @@ public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport db.shutdown(); } - @Test - public void testSqlEndpoint() throws Exception { - - String expectedBody = "body"; - result.expectedBodiesReceived(expectedBody); - template.sendBody("direct:start",expectedBody); - result.assertIsSatisfied(); - - } +@Test +public void testSqlEndpoint() throws Exception { +String expectedBody = "body"; +result.expectedBodiesReceived(expectedBody); +template.sendBody("direct:start", expectedBody); +result.assertIsSatisfied(); +} @Override @@ -52,9 +63,9 @@ public class SqlProducerOutputTypeSelectOneNoResultTest extends CamelTestSupport public void configure() { getContext().getComponent("sql", SqlComponent.class).setDataSource(db); - from("direct:start") - .to("sql:select id from mytable where 1 = 2?outputHeader=myHeader=SelectOne") - .log("${body}").to("mock:result"); +from("direct:start") +.to("sql:select id from mytable where 1 = 2?outputHeader=myHeader=SelectOne") +.log("${body}").to("mock:result"); } }; }
camel git commit: CAMEL-9918: update documentation
Repository: camel Updated Branches: refs/heads/master 5d95d0fff -> d22b0d7cd CAMEL-9918: update documentation Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d22b0d7c Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d22b0d7c Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d22b0d7c Branch: refs/heads/master Commit: d22b0d7cd4e99ed90d8fe5c1665c31d09afabdf2 Parents: 5d95d0f Author: Antonin StefanuttiAuthored: Thu Apr 28 09:34:20 2016 +0200 Committer: Antonin Stefanutti Committed: Thu Apr 28 09:34:20 2016 +0200 -- components/camel-cdi/src/main/docs/cdi.adoc | 13 + 1 file changed, 13 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d22b0d7c/components/camel-cdi/src/main/docs/cdi.adoc -- diff --git a/components/camel-cdi/src/main/docs/cdi.adoc b/components/camel-cdi/src/main/docs/cdi.adoc index ac09327..8f49cf9 100644 --- a/components/camel-cdi/src/main/docs/cdi.adoc +++ b/components/camel-cdi/src/main/docs/cdi.adoc @@ -573,6 +573,19 @@ void onContextStarting(@Observes CamelContextStartingEvent event) { } +As of Camel 2.18, it is possible to observe events for a particular route (`RouteAddedEvent`, +`RouteStartedEvent`, `RouteStoppedEvent` and `RouteRemovedEvent`) should it have +an explicit defined, e.g.: + +[source,java] + +from("...").routeId("foo").to("..."); + +void onRouteStarted(@Observes @Named("foo") RouteStartedEvent event) { +// Called after the route "foo" has started +} + + When multiple Camel contexts exist in the CDI container, the Camel context bean qualifiers, like `@ContextName`, can be used to refine the observer method resolution to a particular Camel context as specified
svn commit: r986915 [1/2] - in /websites/production/camel/content: aws-sqs.html book-component-appendix.html book-in-one-page.html cache/main.pageCache
Author: buildbot Date: Thu Apr 28 07:22:45 2016 New Revision: 986915 Log: Production update by buildbot for camel Modified: websites/production/camel/content/aws-sqs.html websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache/main.pageCache Modified: websites/production/camel/content/aws-sqs.html == --- websites/production/camel/content/aws-sqs.html (original) +++ websites/production/camel/content/aws-sqs.html Thu Apr 28 07:22:45 2016 @@ -89,7 +89,7 @@ -The queue will be created if they don't already exists. You can append query options to the URI in the following format, ?options=valueoption2=value...URI OptionsNameDefault ValueContextDescriptionamazonSQSClientnullSharedReference to a com.amazonaws.services.sqs.AmazonSQS in the Registry.accessKeynullSharedAmazon AWS Access KeysecretKeynullSharedAmazon AWS Secret KeyamazonSQSEndpointnullSharedThe region with which the AWS-SQS client wants to work with. Only works if Camel creates the AWS-SQ S client, i.e., if you explicitly set amazonSQSClient, then this setting will have no effect. You would have to set it on the client you create directlyattributeNamesnullConsumerA list of attribute names to receive when consuming. Camel 2.17: Multiple names can be separated by comma. Camel 2.16 or older: The type is a Collection so its much harder to configure and use.messageAttributeNamesnullConsumerA list of message attribute names to receive when consuming. Camel 2.17:Multiple names can be separated by >comma. Camel 2.16 or older: The type is a Collection so its much harder >to configure and use.class="confluenceTd">concurrentConsumersrowspan="1" class="confluenceTd">1class="confluenceTd">Consumerclass="confluenceTd">(as of 2.15.0) Allows you to use >multiple threads to poll the sqs queue to increase throughput. You must also >set the maxMessagesPerPoll option for this to work >properly.class="confluenceTd">defaultVisibilityTimeoutrowspan="1" class="confluenceTd">nullrowspan="1" class="confluenceTd">Sharedrowspan="1" class="confluenceTd">The visibility timeout (in seconds) to >set in t he com.amazonaws.services.sqs.model.CreateQueueRequest.deleteAfterReadtrueConsumerDelete message from SQS after it has been read (and processed by the route)deleteIfFilteredtrueConsumerCamel 2.12.2,2.13.0 Whether or not to send the DeleteMessage to the SQS queue if an exchange fails to get through a filter. If 'false' and exchange does not make it through a Camel filter upstream in the route, then don't send DeleteMessage. maxMessagesPerPollnullConsumerThe maximum number of messages which can be received in one poll to set in the com.amazonaws.services.sqs.model.ReceiveMessageRequest.visibilityTimeoutnullSharedThe duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request. This only make sense if its different from defaultVisibilityTimeout.extendMessageVisibilityfalseConsumerCamel 2.10: If enabled a scheduled background task will keep extending the message visibility on SQS. This is needed if it takes a long time to process the message. If set to true visibilityTimeout must be set. See details at http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/APIReference/Query_QueryChangeMessageVisibility.html; rel="nofollow">Amazon docs.maximumMessageSizenullSharedCamel 2.8: The maximumMessageSize (in bytes) an SQS message can contain for this queue, to set in the com.amazonaws.services.sqs.model.SetQueueAttributesRequest.messageRetentionPeriodnullSharedCamel 2.8: The messageRetentionPeriod (in seconds) a message will be retained by SQS for this queue, to set in the com.amazonaws.services.sqs.model.SetQueueAttributesRequest.policynullSharedCamel 2 .8: The policy for this queue to set in the com.amazonaws.services.sqs.model.SetQueueAttributesRequest.delaySecondsnullProducerCamel 2.9.3: Delay sending messages for a number of seconds.waitTimeSeconds0ProducerCamel 2.11: Duration in seconds (0 to 20) that the ReceiveMessage action call will wait until a message is in the queue to include in the response.receiveMessageWaitTimeSeconds0SharedCamel 2.11: If you do not specify WaitTimeSeconds in the request, the queue attribute ReceiveMessageWaitTimeSeconds is used to determine how long to wait.queueOwnerAWSAccountIdnullSharedCamel 2.12: Specify the queue owner aws account id when you need to connect the queue with different account owner.regionnu llSharedCamel 2.12.3: Specify the queue region which could be used with queueOwnerAWSAccountId to build the service URL.Note: Region will still default to us-east-1 if queueOwnerAWSAccountId is not
svn commit: r986915 [2/2] - in /websites/production/camel/content: aws-sqs.html book-component-appendix.html book-in-one-page.html cache/main.pageCache
Modified: websites/production/camel/content/book-in-one-page.html == --- websites/production/camel/content/book-in-one-page.html (original) +++ websites/production/camel/content/book-in-one-page.html Thu Apr 28 07:22:45 2016 @@ -3612,11 +3612,11 @@ The tutorial has been designed in two pa While not actual tutorials you might find working through the source of the various Examples useful. Tutorial on Spring Remoting with JMSThanksThis tutorial was kindly donated to Apache Camel by Martin Gilday.PrefaceThis tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a http://www.springramework.org; rel="nofollow">Spring service. The route works in a synchronous fashion returning a response to the client./**/ +/*]]>*/ Tutorial on Spring Remoting with JMSPrefacePrerequisitesDistributionAboutCreate the Camel Project Update the POM with Dependencies Writing the Server @@ -5731,11 +5731,11 @@ So we completed the last piece in the pi This example has been removed from Camel 2.9 onwards. Apache Axis 1.4 is a very old and unsupported framework. We encourage users to use CXF instead of Axis. /**/ +/*]]>*/ Tutorial using Axis 1.4 with Apache Camel PrerequisitesDistributionIntroductionSetting up the project to run Axis Maven 2wsdlConfiguring AxisRunning the Example @@ -16384,7 +16384,7 @@ AMQPConnectionDetails amqpConnection() { -The queue will be created if they don't already exists. You can append query options to the URI in the following format, ?options=valueoption2=value...URI OptionsNameDefault ValueContextDescriptionamazonSQSClientnullSharedReference to a com.amazonaws.services.sqs.AmazonSQS in the Registry.< /p>accessKeynullSharedAmazon AWS Access KeysecretKeynullSharedAmazon AWS Secret KeyamazonSQSEndpointnullSharedThe region with which the AWS-SQS client wants to work with. Only works if Camel creates the AWS-SQS client, i.e., if you explicitly set amazonSQSClient, then this setting will have no effect. You would have to set it on the client you create directlyattributeNamesnullConsumerA list of attribute names to receive when consuming. Camel 2.17: Multiple names can be separated by comma. Camel 2.16 or older: The type is a Collection so its much harder to configure and use.messageAttributeNamesnullConsumerA list of message attribute names to receive when consuming. < strong>Camel 2.17:Multiple names can be separated by comma. Camel 2.16 or older: The type is a Collection so its much harder to configure and use.concurrentConsumers1Consumer(as of 2.15.0) Allows you to use multiple threads to poll the sqs queue to increase throughput. You must also set the maxMessagesPerPoll option for this to work properly.defaultVisibilityTimeoutnullSharedThe visibility timeout (in seconds) to se t in the com.amazonaws.services.sqs.model.CreateQueueRequest.deleteAfterReadtrueConsumerDelete message from SQS after it has been read (and processed by the route)deleteIfFilteredtrueConsumerCamel 2.12.2,2.13.0 Whether or not to send the DeleteMessage to the SQS queue if an exchange fails to get through a filter. If 'false' and exchange does not make it through a Camel filter upstream in the route, then don't send DeleteMessage.class="confluenceTd">maxMessagesPerPollrowspan="1" class="confluenceTd">nullrowspan="1" class="confluenceTd">Consumerrowspan="1" class="confluenceTd">The maximum number of messages which can >be received in one poll to set in the >com.amazonaws.services.sqs.model.ReceiveMessageRequest. colspan="1" rowspan="1" >class="confluenceTd">visibilityTimeoutclass="confluenceTd">nullclass="confluenceTd">Sharedclass="confluenceTd">The duration (in seconds) that the received messages >are hidden from subsequent retrieve requests after being retrieved by a >ReceiveMessage request. This only make sense if its different from >defaultVisibilityTimeout.extendMessageVisibilityfalseConsumerCamel 2.10: If enabled a scheduled background task will keep extending the message visibility on SQS. This
camel git commit: Added camel-jibx dataformat docs to Gitbook
Repository: camel Updated Branches: refs/heads/master 773547a2e -> 5d95d0fff Added camel-jibx dataformat docs to Gitbook Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5d95d0ff Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5d95d0ff Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5d95d0ff Branch: refs/heads/master Commit: 5d95d0fff699fececd94422389db93d1de9add36 Parents: 773547a Author: Andrea CosentinoAuthored: Thu Apr 28 09:15:53 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 09:15:53 2016 +0200 -- components/camel-jibx/src/main/docs/jibx.adoc | 81 ++ docs/user-manual/en/SUMMARY.md| 1 + 2 files changed, 82 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/5d95d0ff/components/camel-jibx/src/main/docs/jibx.adoc -- diff --git a/components/camel-jibx/src/main/docs/jibx.adoc b/components/camel-jibx/src/main/docs/jibx.adoc new file mode 100644 index 000..a49bf89 --- /dev/null +++ b/components/camel-jibx/src/main/docs/jibx.adoc @@ -0,0 +1,81 @@ +[[JiBX-JiBX]] +JiBX + + +*Available as of Camel 2.6* + +JiBX is a link:data-format.html[Data Format] which uses the +http://jibx.sourceforge.net[JiBX library] to marshal and unmarshal Java +objects to and from XML. + +[source,java] +--- +// lets turn Object messages into XML then send to MQSeries +from("activemq:My.Queue"). + marshal().jibx(). + to("mqseries:Another.Queue"); +--- + +Please note that marshaling process can recognize the message type at +the runtime. However while unmarshaling message from XML we need to +specify target class explicitly. + +[source,java] +--- +// lets turn XML into PurchaseOrder message +from("mqseries:Another.Queue"). + unmarshal().jibx(PurchaseOrder.class). + to("activemq:My.Queue"); +--- + +[[JiBX-JiBXSpringDSL]] +JiBX Spring DSL +^^^ + +JiBX data format is also supported by Camel Spring DSL. + +[source,xml] +-- +http://camel.apache.org/schema/spring;> + + + + + + + + + + + + + + + + + + + + + +-- + +[[JiBX-Dependencies]] +Dependencies + + +To use JiBX in your camel routes you need to add the a dependency on +*camel-jibx* which implements this data format. + +If you use maven you could just add the following to your pom.xml, +substituting the version number for the latest & greatest release (see +link:download.html[the download page for the latest versions]). + +[source,xml] +- + + org.apache.camel + camel-jibx + 2.6.0 + +- http://git-wip-us.apache.org/repos/asf/camel/blob/5d95d0ff/docs/user-manual/en/SUMMARY.md -- diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md index b0d9e0b..252fcb4 100644 --- a/docs/user-manual/en/SUMMARY.md +++ b/docs/user-manual/en/SUMMARY.md @@ -196,6 +196,7 @@ * [Flatpack](flatpack-dataformat.adoc) * [Ical](ical.adoc) * [Jaxb](jaxb.adoc) +* [Jibx](jibx.adoc) * [XML JSON](xmljson.adoc) * User Guide
[2/4] camel git commit: CAMEL-9920 - Handle SocketTimeoutException on accept
CAMEL-9920 - Handle SocketTimeoutException on accept Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8d648983 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8d648983 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8d648983 Branch: refs/heads/master Commit: 8d64898311b808bda25f164594a3a97237957bb0 Parents: e9b0119 Author: Quinn StevensonAuthored: Wed Apr 27 13:11:23 2016 -0600 Committer: Claus Ibsen Committed: Thu Apr 28 09:09:14 2016 +0200 -- .../org/apache/camel/component/mllp/MllpTcpServerConsumer.java | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/8d648983/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java -- diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java index c025f80..7a95dc2 100644 --- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java +++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java @@ -205,6 +205,10 @@ public class MllpTcpServerConsumer extends DefaultConsumer { Socket socket = null; try { socket = serverSocket.accept(); +} catch (SocketTimeoutException timeoutEx ) { +// Didn't get a new connection - keep waiting for one +log.debug( "Timeout waiting for client connection - keep listening"); +continue; } catch (SocketException socketEx) { // This should happen if the component is closed while the accept call is blocking if (serverSocket.isBound()) {
[1/4] camel git commit: Fix checkstyle issues
Repository: camel Updated Branches: refs/heads/camel-2.17.x 7a72ca610 -> 415868644 refs/heads/master e9b01196a -> 773547a2e Fix checkstyle issues Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/773547a2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/773547a2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/773547a2 Branch: refs/heads/master Commit: 773547a2e0890794fe04c0412f4b37d0c64b2fa4 Parents: 8d64898 Author: Quinn StevensonAuthored: Wed Apr 27 13:24:53 2016 -0600 Committer: Claus Ibsen Committed: Thu Apr 28 09:09:14 2016 +0200 -- .../org/apache/camel/component/mllp/MllpTcpServerConsumer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/773547a2/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java -- diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java index 7a95dc2..f1fa9b7 100644 --- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java +++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java @@ -205,9 +205,9 @@ public class MllpTcpServerConsumer extends DefaultConsumer { Socket socket = null; try { socket = serverSocket.accept(); -} catch (SocketTimeoutException timeoutEx ) { +} catch (SocketTimeoutException timeoutEx) { // Didn't get a new connection - keep waiting for one -log.debug( "Timeout waiting for client connection - keep listening"); +log.debug("Timeout waiting for client connection - keep listening"); continue; } catch (SocketException socketEx) { // This should happen if the component is closed while the accept call is blocking
[4/4] camel git commit: Fix checkstyle issues
Fix checkstyle issues Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/41586864 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/41586864 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/41586864 Branch: refs/heads/camel-2.17.x Commit: 41586864490dbe56b4c167413a24a2d48b4cccdd Parents: 389e977 Author: Quinn StevensonAuthored: Wed Apr 27 13:24:53 2016 -0600 Committer: Claus Ibsen Committed: Thu Apr 28 09:10:59 2016 +0200 -- .../org/apache/camel/component/mllp/MllpTcpServerConsumer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/41586864/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java -- diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java index 7a95dc2..f1fa9b7 100644 --- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java +++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java @@ -205,9 +205,9 @@ public class MllpTcpServerConsumer extends DefaultConsumer { Socket socket = null; try { socket = serverSocket.accept(); -} catch (SocketTimeoutException timeoutEx ) { +} catch (SocketTimeoutException timeoutEx) { // Didn't get a new connection - keep waiting for one -log.debug( "Timeout waiting for client connection - keep listening"); +log.debug("Timeout waiting for client connection - keep listening"); continue; } catch (SocketException socketEx) { // This should happen if the component is closed while the accept call is blocking
[3/4] camel git commit: CAMEL-9920 - Handle SocketTimeoutException on accept
CAMEL-9920 - Handle SocketTimeoutException on accept Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/389e9770 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/389e9770 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/389e9770 Branch: refs/heads/camel-2.17.x Commit: 389e977098bf8106f9ead5e4e379e91d625a47e5 Parents: 7a72ca6 Author: Quinn StevensonAuthored: Wed Apr 27 13:11:23 2016 -0600 Committer: Claus Ibsen Committed: Thu Apr 28 09:10:52 2016 +0200 -- .../org/apache/camel/component/mllp/MllpTcpServerConsumer.java | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/389e9770/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java -- diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java index c025f80..7a95dc2 100644 --- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java +++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java @@ -205,6 +205,10 @@ public class MllpTcpServerConsumer extends DefaultConsumer { Socket socket = null; try { socket = serverSocket.accept(); +} catch (SocketTimeoutException timeoutEx ) { +// Didn't get a new connection - keep waiting for one +log.debug( "Timeout waiting for client connection - keep listening"); +continue; } catch (SocketException socketEx) { // This should happen if the component is closed while the accept call is blocking if (serverSocket.isBound()) {
[1/2] camel git commit: CAMEL-9784: aws s3 consumer should keep polling if deleteAfterRead is false, otherwise it only poll data one time and then never anymore.
Repository: camel Updated Branches: refs/heads/camel-2.16.x 405542810 -> 9216caf3d refs/heads/camel-2.17.x 45317409d -> 7a72ca610 CAMEL-9784: aws s3 consumer should keep polling if deleteAfterRead is false, otherwise it only poll data one time and then never anymore. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7a72ca61 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7a72ca61 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7a72ca61 Branch: refs/heads/camel-2.17.x Commit: 7a72ca610b2e57c12aab808d558c54a18acb3026 Parents: 4531740 Author: Claus IbsenAuthored: Thu Apr 28 09:02:28 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 09:03:54 2016 +0200 -- .../camel/component/aws/s3/S3Configuration.java | 12 ++-- .../camel/component/aws/s3/S3Consumer.java | 72 +--- 2 files changed, 39 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/7a72ca61/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java index 2326478..1dcc3c0 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java @@ -175,10 +175,6 @@ public class S3Configuration implements Cloneable { this.region = region; } -public boolean isDeleteAfterRead() { -return deleteAfterRead; -} - /** * *Camel 2.17*: If it is true, the exchange body will be set to a stream to the contents of the file. * If false, the headers will be set with the S3 object metadata, but the body will be null. @@ -191,9 +187,17 @@ public class S3Configuration implements Cloneable { return includeBody; } +public boolean isDeleteAfterRead() { +return deleteAfterRead; +} + /** * Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committed. * If a rollback occurs, the object is not deleted. + * + * If this option is false, then the same objects will be retrieve over and over again on the polls. Therefore you + * need to use the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using the + * {@link S3Constants#BUCKET_NAME} and {@link S3Constants#KEY} headers, or only the {@link S3Constants#KEY} header. */ public void setDeleteAfterRead(boolean deleteAfterRead) { this.deleteAfterRead = deleteAfterRead; http://git-wip-us.apache.org/repos/asf/camel/blob/7a72ca61/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Consumer.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Consumer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Consumer.java index eab0508..5fb4936 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Consumer.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Consumer.java @@ -43,13 +43,11 @@ import org.slf4j.LoggerFactory; /** * A Consumer of messages from the Amazon Web Service Simple Storage Service * http://aws.amazon.com/s3/;>AWS S3 - * */ public class S3Consumer extends ScheduledBatchPollingConsumer { private static final Logger LOG = LoggerFactory.getLogger(S3Consumer.class); private String marker; -private boolean filesConsumed; private transient String s3ConsumerToString; public S3Consumer(S3Endpoint endpoint, Processor processor) throws NoFactoryAvailableException { @@ -66,48 +64,40 @@ public class S3Consumer extends ScheduledBatchPollingConsumer { String bucketName = getConfiguration().getBucketName(); Queue exchanges; -if (filesConsumed) { -exchanges = new LinkedList(); +if (fileName != null) { +LOG.trace("Getting object in bucket [{}] with file name [{}]...", bucketName, fileName); + +S3Object s3Object = getAmazonS3Client().getObject(new GetObjectRequest(bucketName, fileName)); +exchanges = createExchanges(s3Object); } else { -if (fileName != null) { -LOG.trace("Getting object in bucket [{}] with file name [{}]...", bucketName, fileName); - -S3Object s3Object
[2/2] camel git commit: CAMEL-9784: aws s3 consumer should keep polling if deleteAfterRead is false, otherwise it only poll data one time and then never anymore.
CAMEL-9784: aws s3 consumer should keep polling if deleteAfterRead is false, otherwise it only poll data one time and then never anymore. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9f16e397 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9f16e397 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9f16e397 Branch: refs/heads/master Commit: 9f16e397cb8823f9317bd08a7f0f87ee05e1d5b8 Parents: 3b4b522 Author: Claus IbsenAuthored: Thu Apr 28 09:02:28 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 09:05:44 2016 +0200 -- components/camel-aws/src/main/docs/aws-s3.adoc | 4 +- .../camel/component/aws/s3/S3Configuration.java | 12 ++-- .../camel/component/aws/s3/S3Consumer.java | 72 +--- 3 files changed, 42 insertions(+), 46 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/9f16e397/components/camel-aws/src/main/docs/aws-s3.adoc -- diff --git a/components/camel-aws/src/main/docs/aws-s3.adoc b/components/camel-aws/src/main/docs/aws-s3.adoc index 6bf206a..e291580 100644 --- a/components/camel-aws/src/main/docs/aws-s3.adoc +++ b/components/camel-aws/src/main/docs/aws-s3.adoc @@ -38,6 +38,7 @@ The AWS S3 Storage Service component has no options. + // endpoint options: START The AWS S3 Storage Service component supports 38 endpoint options which are listed below: @@ -53,7 +54,7 @@ The AWS S3 Storage Service component supports 38 endpoint options which are list | proxyPort | common | | Integer | Camel 2.16: Specify a proxy port to be used inside the client definition. | secretKey | common | | String | Amazon AWS Secret Key | bridgeErrorHandler | consumer | false | boolean | 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/ERROR level and ignored. -| deleteAfterRead | consumer | true | boolean | Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committed. If a rollback occurs the object is not deleted. +| deleteAfterRead | consumer | true | boolean | Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committed. If a rollback occurs the object is not deleted. If this option is false then the same objects will be retrieve over and over again on the polls. Therefore you need to use the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using the link S3ConstantsBUCKET_NAME and link S3ConstantsKEY headers or only the link S3ConstantsKEY header. | fileName | consumer | | String | To get the object from the bucket with the given file name | includeBody | consumer | true | boolean | Camel 2.17: If it is true the exchange body will be set to a stream to the contents of the file. If false the headers will be set with the S3 object metadata but the body will be null. | maxMessagesPerPoll | consumer | 10 | int | Gets the maximum number of messages as a limit to poll at each polling. Is default unlimited but use 0 or negative number to disable it as unlimited. @@ -88,6 +89,7 @@ The AWS S3 Storage Service component supports 38 endpoint options which are list + |=== Required S3 component options http://git-wip-us.apache.org/repos/asf/camel/blob/9f16e397/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java index 1057763..83c33d2 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java @@ -171,10 +171,6 @@ public class S3Configuration implements Cloneable { this.region = region; } -public boolean isDeleteAfterRead() { -return deleteAfterRead; -} - /** * *Camel 2.17*: If it is true, the exchange body will be set to a stream to the contents of the file. * If false, the headers will be set with the S3 object metadata, but the body will be null. @@ -187,9 +183,17 @@ public class
[2/2] camel git commit: CAMEL-9784: aws s3 consumer should keep polling if deleteAfterRead is false, otherwise it only poll data one time and then never anymore.
CAMEL-9784: aws s3 consumer should keep polling if deleteAfterRead is false, otherwise it only poll data one time and then never anymore. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9216caf3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9216caf3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9216caf3 Branch: refs/heads/camel-2.16.x Commit: 9216caf3d1983d1b661d27deaf633fcfc6a59c09 Parents: 4055428 Author: Claus IbsenAuthored: Thu Apr 28 09:02:28 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 09:05:07 2016 +0200 -- .../camel/component/aws/s3/S3Configuration.java | 7 +- .../camel/component/aws/s3/S3Consumer.java | 72 +--- 2 files changed, 37 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/9216caf3/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java index 36bab52..97d4e40 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java @@ -176,7 +176,12 @@ public class S3Configuration implements Cloneable { } /** - * Delete objects from S3 after it has been retrieved. + * Delete objects from S3 after they have been retrieved. The delete is only performed if the Exchange is committed. + * If a rollback occurs, the object is not deleted. + * + * If this option is false, then the same objects will be retrieve over and over again on the polls. Therefore you + * need to use the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using the + * {@link S3Constants#BUCKET_NAME} and {@link S3Constants#KEY} headers, or only the {@link S3Constants#KEY} header. */ public void setDeleteAfterRead(boolean deleteAfterRead) { this.deleteAfterRead = deleteAfterRead; http://git-wip-us.apache.org/repos/asf/camel/blob/9216caf3/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Consumer.java -- diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Consumer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Consumer.java index eab0508..5fb4936 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Consumer.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Consumer.java @@ -43,13 +43,11 @@ import org.slf4j.LoggerFactory; /** * A Consumer of messages from the Amazon Web Service Simple Storage Service * http://aws.amazon.com/s3/;>AWS S3 - * */ public class S3Consumer extends ScheduledBatchPollingConsumer { private static final Logger LOG = LoggerFactory.getLogger(S3Consumer.class); private String marker; -private boolean filesConsumed; private transient String s3ConsumerToString; public S3Consumer(S3Endpoint endpoint, Processor processor) throws NoFactoryAvailableException { @@ -66,48 +64,40 @@ public class S3Consumer extends ScheduledBatchPollingConsumer { String bucketName = getConfiguration().getBucketName(); Queue exchanges; -if (filesConsumed) { -exchanges = new LinkedList(); +if (fileName != null) { +LOG.trace("Getting object in bucket [{}] with file name [{}]...", bucketName, fileName); + +S3Object s3Object = getAmazonS3Client().getObject(new GetObjectRequest(bucketName, fileName)); +exchanges = createExchanges(s3Object); } else { -if (fileName != null) { -LOG.trace("Getting object in bucket [{}] with file name [{}]...", bucketName, fileName); - -S3Object s3Object = getAmazonS3Client().getObject(new GetObjectRequest(bucketName, fileName)); -exchanges = createExchanges(s3Object); -if (!getConfiguration().isDeleteAfterRead()) { -filesConsumed = true; -} +LOG.trace("Queueing objects in bucket [{}]...", bucketName); + +ListObjectsRequest listObjectsRequest = new ListObjectsRequest(); +listObjectsRequest.setBucketName(bucketName); +listObjectsRequest.setPrefix(getConfiguration().getPrefix()); +if (maxMessagesPerPoll > 0) { +
[1/2] camel git commit: Updated doc
Repository: camel Updated Branches: refs/heads/master 3b4b52216 -> e9b01196a Updated doc Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e9b01196 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e9b01196 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e9b01196 Branch: refs/heads/master Commit: e9b01196aa1d904888ebbf3380700579ec503418 Parents: 9f16e39 Author: Claus IbsenAuthored: Thu Apr 28 09:02:40 2016 +0200 Committer: Claus Ibsen Committed: Thu Apr 28 09:05:44 2016 +0200 -- components/camel-etcd/src/main/docs/etcd.adoc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/e9b01196/components/camel-etcd/src/main/docs/etcd.adoc -- diff --git a/components/camel-etcd/src/main/docs/etcd.adoc b/components/camel-etcd/src/main/docs/etcd.adoc index d19db9f..3632b0d 100644 --- a/components/camel-etcd/src/main/docs/etcd.adoc +++ b/components/camel-etcd/src/main/docs/etcd.adoc @@ -8,8 +8,9 @@ + // endpoint options: START -The etcd component supports 14 endpoint options which are listed below: +The etcd component supports 15 endpoint options which are listed below: [width="100%",cols="2s,1,1m,1m,5",options="header"] |=== @@ -25,6 +26,7 @@ The etcd component supports 14 endpoint options which are listed below: | timeToLive | producer | | Integer | To set the lifespan of a key in milliseconds. | exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange | synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). +| fromIndex | advance | 0 | Long | The index to watch from | password | security | | String | The password to use for basic authentication. | sslContextParameters | security | | SSLContextParameters | To configure security using SSLContextParameters. | userName | security | | String | The user name to use for basic authentication. @@ -40,6 +42,7 @@ The etcd component supports 14 endpoint options which are listed below: + // component options: START The etcd component has no options. // component options: END
camel git commit: Upgrade Pax Exam to version 4.9.1
Repository: camel Updated Branches: refs/heads/master b3437769c -> 3b4b52216 Upgrade Pax Exam to version 4.9.1 Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3b4b5221 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3b4b5221 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3b4b5221 Branch: refs/heads/master Commit: 3b4b522160bd09d95f9d8f251f61367ad11ad8c3 Parents: b343776 Author: Andrea CosentinoAuthored: Thu Apr 28 08:20:00 2016 +0200 Committer: Andrea Cosentino Committed: Thu Apr 28 08:20:00 2016 +0200 -- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3b4b5221/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 9b3eaba..70b7a34 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -442,7 +442,7 @@ 1.0.2 2.8_1 1.0.0.RC1 -4.9.0 +4.9.1 1.3.2 1.8.5 1.8.11