[camel] branch camel-2.20.x updated: Polish docs and show that camel-cdi is deprecated in OSGi
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-2.20.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-2.20.x by this push: new 764b34a Polish docs and show that camel-cdi is deprecated in OSGi 764b34a is described below commit 764b34af2b7590ad14fd763b84256b26856f1e40 Author: Claus IbsenAuthorDate: Wed Dec 20 10:02:34 2017 +0100 Polish docs and show that camel-cdi is deprecated in OSGi --- components/camel-cdi/src/main/docs/cdi.adoc | 72 +++-- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/components/camel-cdi/src/main/docs/cdi.adoc b/components/camel-cdi/src/main/docs/cdi.adoc index 30c7512..23d8e7f 100644 --- a/components/camel-cdi/src/main/docs/cdi.adoc +++ b/components/camel-cdi/src/main/docs/cdi.adoc @@ -1,4 +1,4 @@ -## Camel CDI +== Camel CDI The Camel CDI component provides auto-configuration for Apache Camel using CDI as dependency injection framework based @@ -13,15 +13,20 @@ bridges Camel events (e.g. `RouteAddedEvent`, and provides a CDI events endpoint that can be used to consume / produce CDI events from / to Camel routes. -NOTE: While the Camel CDI component is available as of **Camel 2.10**, it's +While the Camel CDI component is available as of **Camel 2.10**, it's been rewritten in *Camel 2.17* to better fit into the CDI programming model. Hence some of the features like the Camel events to CDI events bridge and the CDI events endpoint only apply starting Camel 2.17. -NOTE: More details on how to test Camel CDI applications are available in +More details on how to test Camel CDI applications are available in link:cdi-testing.html[Camel CDI testing]. -### Auto-configured Camel context +[CAUTION] + +camel-cdi is deprecated in OSGi and not supported. Use OSGi Blueprint if using Camel with OSGi. + + +=== Auto-configured Camel context Camel CDI automatically deploys and configures a `CamelContext` bean. That `CamelContext` bean is automatically instantiated, configured and @@ -41,7 +46,7 @@ type `DefaultCamelContext`. Note that this bean can be customized programmatically and other Camel context beans can be deployed in the application as well. -### Auto-detecting Camel routes +=== Auto-detecting Camel routes Camel CDI automatically collects all the `RoutesBuilder` beans in the application, instantiates and add them to the `CamelContext` bean @@ -84,7 +89,7 @@ static void configuration(@Observes CdiCamelConfiguration configuration) { } -### Auto-configured Camel primitives +=== Auto-configured Camel primitives Camel CDI provides beans for common Camel primitives that can be injected in any CDI beans, e.g.: @@ -110,7 +115,7 @@ Endpoint endpoint; TypeConverter converter; -### Camel context configuration +=== Camel context configuration If you just want to change the name of the default `CamelContext` bean, you can used the `@ContextName` qualifier provided by Camel CDI, e.g.: @@ -207,7 +212,7 @@ class ManualStartupCamelContext extends DefaultCamelContext { } -### Multiple Camel contexts +=== Multiple Camel contexts Any number of `CamelContext` beans can actually be declared in the application as documented above. In that case, the CDI qualifiers @@ -304,7 +309,7 @@ MockEndpoint outbound; // URI defaults to the member name, i.e. mock:outbound Endpoint endpoint; -### Configuration properties +=== Configuration properties To configure the sourcing of the configuration properties used by Camel to resolve properties placeholders, you can declare @@ -355,7 +360,7 @@ You can see the `camel-example-cdi-properties` example for a working example of a Camel CDI application using DeltaSpike configuration mechanism. -### Auto-configured type converters +=== Auto-configured type converters CDI beans annotated with the `@Converter` annotation are automatically registered into the deployed Camel contexts, e.g.: @@ -374,9 +379,9 @@ public class MyTypeConverter { Note that CDI injection is supported within the type converters. -### Camel bean integration +=== Camel bean integration - Camel annotations + Camel annotations As part of the Camel link:http://camel.apache.org/bean-integration.html[bean integration], Camel comes with a set @@ -385,7 +390,7 @@ are seamlessly supported by Camel CDI. So you can use any of these annotations in your CDI beans, e.g.: [width="100%",cols="1,2a,2a",options="header",] -|=== +|=== | |Camel annotation |CDI equivalent |Configuration property a| [source,java] @@ -502,9 +507,9 @@ void consume(@Body String body) { | -|=== +|=== - Bean component + Bean component You can refer to CDI beans,
[camel] branch master updated: Polished model to include doc for rest-dsl repsonse examples
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new fdc7e29 Polished model to include doc for rest-dsl repsonse examples fdc7e29 is described below commit fdc7e296eaa2e0d7310862c5f2b248368329e5d4 Author: Claus IbsenAuthorDate: Wed Dec 20 10:27:03 2017 +0100 Polished model to include doc for rest-dsl repsonse examples --- .../camel/model/rest/RestOperationResponseMsgDefinition.java | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationResponseMsgDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationResponseMsgDefinition.java index ecbf064..8ff6581 100644 --- a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationResponseMsgDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationResponseMsgDefinition.java @@ -104,12 +104,15 @@ public class RestOperationResponseMsgDefinition { return examples; } +/** + * Examples of response messages + */ public void setExamples(List examples) { this.examples = examples; } /** - * The response code such as a HTTP status code. + * The response code such as a HTTP status code */ public RestOperationResponseMsgDefinition code(int code) { setCode("" + code); @@ -118,7 +121,7 @@ public class RestOperationResponseMsgDefinition { /** * The response code such as a HTTP status code. Can use general, or other words - * to indicate general error responses that do not map to a specific HTTP status code. + * to indicate general error responses that do not map to a specific HTTP status code */ public RestOperationResponseMsgDefinition code(String code) { setCode(code); -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org" '].
[camel] branch master updated: Use correct name for documentation file
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 27020b6 Use correct name for documentation file 27020b6 is described below commit 27020b69a9981f8bf9a46b24d9d619db7550dced Author: Claus IbsenAuthorDate: Wed Dec 20 09:34:56 2017 +0100 Use correct name for documentation file --- components/camel-aws-xray/src/main/docs/{awsxray.adoc => aws-xray.adoc} | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/components/camel-aws-xray/src/main/docs/awsxray.adoc b/components/camel-aws-xray/src/main/docs/aws-xray.adoc similarity index 100% rename from components/camel-aws-xray/src/main/docs/awsxray.adoc rename to components/camel-aws-xray/src/main/docs/aws-xray.adoc -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org" '].
[camel] branch master updated: Upgrade Commons Pool 2 to version 2.5.0
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 55e30c6 Upgrade Commons Pool 2 to version 2.5.0 55e30c6 is described below commit 55e30c64e9a95b347e12d96a4313fe7f608006ce Author: Andrea CosentinoAuthorDate: Wed Dec 20 09:56:09 2017 +0100 Upgrade Commons Pool 2 to version 2.5.0 --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index bac7b3e..eb93453 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -162,7 +162,7 @@ 3.6.1 3.6 1.6 -2.4.3 +2.5.0 1.2 2.0 1.0.4 -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org" '].
[camel] branch master updated: CAMEL-12095 - Camel-Xstream doesn't work in Karaf
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new bad734a CAMEL-12095 - Camel-Xstream doesn't work in Karaf bad734a is described below commit bad734ab1cdaea9e1cf7a8a24c564e1976a27c8c Author: Andrea CosentinoAuthorDate: Wed Dec 20 11:38:56 2017 +0100 CAMEL-12095 - Camel-Xstream doesn't work in Karaf --- platforms/karaf/features/src/main/resources/features.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml index 807442c..8f78ec5 100644 --- a/platforms/karaf/features/src/main/resources/features.xml +++ b/platforms/karaf/features/src/main/resources/features.xml @@ -2379,7 +2379,7 @@ mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jdom/${jdom-bundle-version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/${dom4j-bundle-version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.kxml2/${kxml2-bundle-version} -mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream/${xstream-bundle-version} +mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream-java8/${xstream-bundle-version} mvn:org.apache.camel/camel-xstream/${project.version} -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org" '].
[camel] branch master updated: Regen docs
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 24498dc Regen docs 24498dc is described below commit 24498dcbc8cc47cc83ef453ecd58e6520548af62 Author: Claus IbsenAuthorDate: Wed Dec 20 09:10:00 2017 +0100 Regen docs --- .../src/main/docs/atmosphere-websocket-component.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc b/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc index 0b37761..37deb41 100644 --- a/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc +++ b/components/camel-atmosphere-websocket/src/main/docs/atmosphere-websocket-component.adoc @@ -104,7 +104,7 @@ with the following path and query parameters: | *preserveHostHeader* (producer) | If the option is true HttpProducer will set the Host header to the value contained in the current exchange Host header useful in reverse proxy applications where you want the Host header received by the downstream server to reflect the URL called by the upstream client this allows applications which use the Host header to generate accurate URL's for a proxied service | false | boolean | *throwExceptionOnFailure* (producer) | Option to disable throwing the HttpOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code. | true | boolean | *cookieHandler* (producer) | Configure a cookie handler to maintain a HTTP session | | CookieHandler -| *okStatusCodeRange* (producer) | The status codes which is considered a success response. The values are inclusive. The range must be defined as from-to with the dash included. | 200-299 | String +| *okStatusCodeRange* (producer) | The status codes which are considered a success response. The values are inclusive. Multiple ranges can be defined separated by comma e.g. 200-204209301-304. Each range must be a single number or from-to with the dash included. | 200-299 | String | *urlRewrite* (producer) | *Deprecated* Refers to a custom org.apache.camel.component.http.UrlRewrite which allows you to rewrite urls when you bridge/proxy endpoints. See more details at http://camel.apache.org/urlrewrite.html | | UrlRewrite | *mapHttpMessageBody* (advanced) | If this option is true then IN exchange Body of the exchange will be mapped to HTTP body. Setting this to false will avoid the HTTP mapping. | true | boolean | *mapHttpMessageFormUrl EncodedBody* (advanced) | If this option is true then IN exchange Form Encoded body of the exchange will be mapped to HTTP. Setting this to false will avoid the HTTP Form Encoded body mapping. | true | boolean -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org" '].
[camel] branch master updated: Upgrade Atmosphere Websocket to version 2.4.16
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 09d040b Upgrade Atmosphere Websocket to version 2.4.16 09d040b is described below commit 09d040bd9d56e1cb00d40cfa64cb0b03c995911e Author: Andrea CosentinoAuthorDate: Wed Dec 20 09:18:27 2017 +0100 Upgrade Atmosphere Websocket to version 2.4.16 --- parent/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent/pom.xml b/parent/pom.xml index 164fad6..69d9690 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -69,7 +69,7 @@ 1.0.0-final 1.0.0-final_1 2.2.2 -2.4.14 +2.4.16 [2.4,3.0) 1.0.8 1.2.1 -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org" '].
[camel] branch master updated: CAMEL-12027 - removal of import org.openmuc.jasn1.ber.BerByteArrayOutputStream from encode method's param and upgrade jasn1
This is an automated email from the ASF dual-hosted git repository. onders pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/master by this push: new 83acd1e CAMEL-12027 - removal of import org.openmuc.jasn1.ber.BerByteArrayOutputStream from encode method's param and upgrade jasn1 83acd1e is described below commit 83acd1e61e00cc4f0b5cdd20e0cb5bdea4f80d47 Author: onders86AuthorDate: Tue Dec 19 21:28:48 2017 +0300 CAMEL-12027 - removal of import org.openmuc.jasn1.ber.BerByteArrayOutputStream from encode method's param and upgrade jasn1 --- .../main/java/org/apache/camel/dataformat/asn1/ASN1DataFormat.java | 6 +++--- parent/pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/camel-asn1/src/main/java/org/apache/camel/dataformat/asn1/ASN1DataFormat.java b/components/camel-asn1/src/main/java/org/apache/camel/dataformat/asn1/ASN1DataFormat.java index 446ea4c..5b2d270 100644 --- a/components/camel-asn1/src/main/java/org/apache/camel/dataformat/asn1/ASN1DataFormat.java +++ b/components/camel-asn1/src/main/java/org/apache/camel/dataformat/asn1/ASN1DataFormat.java @@ -32,7 +32,7 @@ import org.apache.camel.util.IOHelper; import org.apache.camel.util.ObjectHelper; import org.bouncycastle.asn1.ASN1InputStream; import org.bouncycastle.asn1.ASN1Primitive; -import org.openmuc.jasn1.ber.BerByteArrayOutputStream; +import org.openmuc.jasn1.ber.ReverseByteArrayOutputStream; public class ASN1DataFormat extends ServiceSupport implements DataFormat, DataFormatName { private boolean usingIterator; @@ -87,8 +87,8 @@ public class ASN1DataFormat extends ServiceSupport implements DataFormat, DataFo private void encodeGenericTypeObject(Exchange exchange, Class clazz, OutputStream stream) throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, IOException { Class[] paramOut = new Class[1]; -paramOut[0] = BerByteArrayOutputStream.class; -BerByteArrayOutputStream berOut = new BerByteArrayOutputStream(IOHelper.DEFAULT_BUFFER_SIZE / 256, true); +paramOut[0] = OutputStream.class; +ReverseByteArrayOutputStream berOut = new ReverseByteArrayOutputStream(IOHelper.DEFAULT_BUFFER_SIZE / 256, true); Method encodeMethod = exchange.getIn().getBody().getClass().getDeclaredMethod("encode", paramOut); encodeMethod.invoke(exchange.getIn().getBody(), berOut); stream.write(berOut.getArray()); diff --git a/parent/pom.xml b/parent/pom.xml index 69d9690..bac7b3e 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -333,7 +333,7 @@ 2.16.0 15.0 1.2.154_2 -1.8.2 +1.9.0 6.0.44_1 1.9.2_1 1.9.2 -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org" '].
[camel] 01/01: CAMEL-12089 - Camel-AWS: Kinesis consumer starts consuming data from the beginning even though the shard is in Closed state
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch CAMEL-12089 in repository https://gitbox.apache.org/repos/asf/camel.git commit fa740ff4f0c11aaa1b4b8e02881cba72ef7bd1a4 Author: Andrea CosentinoAuthorDate: Mon Dec 18 14:09:42 2017 +0100 CAMEL-12089 - Camel-AWS: Kinesis consumer starts consuming data from the beginning even though the shard is in Closed state --- .../src/main/docs/aws-kinesis-component.adoc | 3 +- .../component/aws/kinesis/KinesisConsumer.java | 60 ++ .../component/aws/kinesis/KinesisEndpoint.java | 19 - .../kinesis/KinesisShardClosedStrategyEnum.java| 24 ++ .../aws/kinesis/ReachedClosedStatusException.java | 29 +++ .../KinesisConsumerClosedShardWithFailTest.java| 96 ++ ... KinesisConsumerClosedShardWithSilentTest.java} | 17 ++-- .../component/aws/kinesis/KinesisConsumerTest.java | 13 ++- 8 files changed, 235 insertions(+), 26 deletions(-) diff --git a/components/camel-aws/src/main/docs/aws-kinesis-component.adoc b/components/camel-aws/src/main/docs/aws-kinesis-component.adoc index 39006e5..5ec4b7d 100644 --- a/components/camel-aws/src/main/docs/aws-kinesis-component.adoc +++ b/components/camel-aws/src/main/docs/aws-kinesis-component.adoc @@ -52,7 +52,7 @@ with the following path and query parameters: | *streamName* | *Required* Name of the stream | | String |=== - Query Parameters (24 parameters): + Query Parameters (25 parameters): [width="100%",cols="2,5,^1,2",options="header"] |=== @@ -63,6 +63,7 @@ with the following path and query parameters: | *maxResultsPerRequest* (consumer) | Maximum number of records that will be fetched in each poll | 1 | int | *sendEmptyMessageWhenIdle* (consumer) | If the polling consumer did not poll any files you can enable this option to send an empty message (no body) instead. | false | boolean | *sequenceNumber* (consumer) | The sequence number to start polling from. Required if iteratorType is set to AFTER_SEQUENCE_NUMBER or AT_SEQUENCE_NUMBER | | String +| *shardClosed* (consumer) | Define what will be the behavior in case of shard closed. Possible value are ignore silent and fail.In case of ignore a message will be logged and the consumer will restart from the beginningin case of silent there will be no logging and the consumer will start from the beginningin case of fail a ReachedClosedStateException will be raised | ignore | KinesisShardClosed StrategyEnum | *shardId* (consumer) | Defines which shardId in the Kinesis stream to get records from | | String | *exceptionHandler* (consumer) | 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 or ERROR level and ignored. | | ExceptionHandler | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. | | ExchangePattern diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisConsumer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisConsumer.java index 1addcdf..ec480e4 100644 --- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisConsumer.java +++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/kinesis/KinesisConsumer.java @@ -17,6 +17,7 @@ package org.apache.camel.component.aws.kinesis; import java.util.ArrayDeque; +import java.util.Iterator; import java.util.List; import java.util.Queue; @@ -28,7 +29,9 @@ import com.amazonaws.services.kinesis.model.GetRecordsResult; import com.amazonaws.services.kinesis.model.GetShardIteratorRequest; import com.amazonaws.services.kinesis.model.GetShardIteratorResult; import com.amazonaws.services.kinesis.model.Record; +import com.amazonaws.services.kinesis.model.Shard; import com.amazonaws.services.kinesis.model.ShardIteratorType; + import org.apache.camel.AsyncCallback; import org.apache.camel.Exchange; import org.apache.camel.Processor; @@ -42,6 +45,7 @@ public class KinesisConsumer extends ScheduledBatchPollingConsumer { private static final Logger LOG = LoggerFactory.getLogger(KinesisConsumer.class); private String currentShardIterator; +private boolean isShardClosed; public KinesisConsumer(KinesisEndpoint endpoint, Processor processor) { super(endpoint, processor); @@ -49,9 +53,7 @@ public class KinesisConsumer extends ScheduledBatchPollingConsumer { @Override protected int poll() throws Exception { -GetRecordsRequest req = new GetRecordsRequest() -.withShardIterator(getShardItertor()) -.withLimit(getEndpoint().getMaxResultsPerRequest()); +GetRecordsRequest req = new
[camel] branch CAMEL-12089 created (now fa740ff)
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a change to branch CAMEL-12089 in repository https://gitbox.apache.org/repos/asf/camel.git. at fa740ff CAMEL-12089 - Camel-AWS: Kinesis consumer starts consuming data from the beginning even though the shard is in Closed state This branch includes the following new commits: new fa740ff CAMEL-12089 - Camel-AWS: Kinesis consumer starts consuming data from the beginning even though the shard is in Closed state The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org"'].
[camel] 01/02: Updates to brave libraries that are OSGi friendly
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit 0b38b054636327f1ac6e5dcebefbe08877954e04 Author: Adrian ColeAuthorDate: Wed Dec 20 12:26:09 2017 +0800 Updates to brave libraries that are OSGi friendly This moves to latest brave, which backports span v2 format to the old api. It also corrects some OSGi and packaging glitches. Fixes CAMEL-12088 --- components/camel-zipkin/pom.xml| 17 +-- .../camel/zipkin/ZipkinLegacyReporterAdapter.java | 48 --- .../java/org/apache/camel/zipkin/ZipkinTracer.java | 55 ++ parent/pom.xml | 6 +-- .../karaf/features/src/main/resources/features.xml | 5 +- 5 files changed, 43 insertions(+), 88 deletions(-) diff --git a/components/camel-zipkin/pom.xml b/components/camel-zipkin/pom.xml index 1e77677..28b1f24 100644 --- a/components/camel-zipkin/pom.xml +++ b/components/camel-zipkin/pom.xml @@ -54,11 +54,6 @@ brave-core ${brave-zipkin-version} - - io.zipkin.brave - brave - ${brave-zipkin-version} - io.zipkin.reporter2 @@ -107,6 +102,18 @@ + +org.apache.felix +maven-bundle-plugin +true + + + ${project.groupId}.${project.artifactId} +org.apache.camel.zipkin* + !com.github.kristofa.brave.internal,!zipkin2.internal,!zipkin.internal,* + + + diff --git a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinLegacyReporterAdapter.java b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinLegacyReporterAdapter.java deleted file mode 100644 index c5ebcdb..000 --- a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinLegacyReporterAdapter.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * 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.zipkin; - -import com.github.kristofa.brave.SpanCollector; -import com.github.kristofa.brave.internal.DefaultSpanCodec; -import com.twitter.zipkin.gen.Span; -import zipkin.internal.V2SpanConverter; -import zipkin2.reporter.Reporter; - -final class ZipkinLegacyReporterAdapter implements SpanCollector, Reporter { - -final SpanCollector delegate; - -ZipkinLegacyReporterAdapter(SpanCollector delegate) { -this.delegate = delegate; -} - -@Override -public void report(zipkin2.Span span) { -collect(DefaultSpanCodec.fromZipkin(V2SpanConverter.toSpan(span))); -} - -@Override -public void collect(Span span) { -delegate.collect(span); -} - -@Deprecated -@Override -public void addDefaultAnnotation(String key, String value) { -delegate.addDefaultAnnotation(key, value); -} -} diff --git a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java index 7f507c9..4e238f4 100644 --- a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java +++ b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java @@ -16,23 +16,19 @@ */ package org.apache.camel.zipkin; -import java.io.Closeable; -import java.util.EventObject; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import brave.Tracing; -import brave.sampler.Sampler; import com.github.kristofa.brave.Brave; import com.github.kristofa.brave.ClientSpanThreadBinder; import com.github.kristofa.brave.ServerSpan; import com.github.kristofa.brave.ServerSpanThreadBinder; import com.github.kristofa.brave.SpanCollector; -import com.github.kristofa.brave.TracerAdapter; import com.github.kristofa.brave.scribe.ScribeSpanCollector; import com.twitter.zipkin.gen.Span; +import java.io.Closeable; +import java.util.EventObject; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; import
[camel] 02/02: Fixed CS
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git commit 868357277d6fde906e775f435d462cc4c946bfdd Author: Andrea CosentinoAuthorDate: Thu Dec 21 07:49:19 2017 +0100 Fixed CS --- .../src/main/java/org/apache/camel/zipkin/ZipkinTracer.java | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java index 4e238f4..fa6d8d2 100644 --- a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java +++ b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java @@ -16,6 +16,13 @@ */ package org.apache.camel.zipkin; +import java.io.Closeable; +import java.util.EventObject; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + import com.github.kristofa.brave.Brave; import com.github.kristofa.brave.ClientSpanThreadBinder; import com.github.kristofa.brave.ServerSpan; @@ -23,12 +30,6 @@ import com.github.kristofa.brave.ServerSpanThreadBinder; import com.github.kristofa.brave.SpanCollector; import com.github.kristofa.brave.scribe.ScribeSpanCollector; import com.twitter.zipkin.gen.Span; -import java.io.Closeable; -import java.util.EventObject; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; import org.apache.camel.CamelContext; import org.apache.camel.CamelContextAware; import org.apache.camel.Endpoint; -- To stop receiving notification emails like this one, please contact "commits@camel.apache.org" .
[camel] branch master updated (ad3dfd9 -> 8683572)
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/camel.git. from ad3dfd9 CAMEL-12096: rest-dsl did not work configuring hostNameResolver via spring-boot auto configuration. new 0b38b05 Updates to brave libraries that are OSGi friendly new 8683572 Fixed CS The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: components/camel-zipkin/pom.xml| 17 +--- .../camel/zipkin/ZipkinLegacyReporterAdapter.java | 48 -- .../java/org/apache/camel/zipkin/ZipkinTracer.java | 42 +-- parent/pom.xml | 6 +-- .../karaf/features/src/main/resources/features.xml | 5 +-- 5 files changed, 37 insertions(+), 81 deletions(-) delete mode 100644 components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinLegacyReporterAdapter.java -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org"'].
[camel] branch camel-2.20.x updated: CAMEL-12096: rest-dsl did not work configuring hostNameResolver via spring-boot auto configuration.
This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-2.20.x in repository https://gitbox.apache.org/repos/asf/camel.git The following commit(s) were added to refs/heads/camel-2.20.x by this push: new d318e0a CAMEL-12096: rest-dsl did not work configuring hostNameResolver via spring-boot auto configuration. d318e0a is described below commit d318e0a8d5dd021fbe4fcb73161ed8c1f9528601 Author: Claus IbsenAuthorDate: Wed Dec 20 14:55:25 2017 +0100 CAMEL-12096: rest-dsl did not work configuring hostNameResolver via spring-boot auto configuration. --- .../camel/component/rest/RestApiEndpoint.java | 6 ++-- .../apache/camel/component/rest/RestEndpoint.java | 6 ++-- .../org/apache/camel/spi/RestConfiguration.java| 41 +++--- .../src/main/resources/application.properties | 3 +- 4 files changed, 45 insertions(+), 11 deletions(-) diff --git a/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java index 1fe7299..2190c4c 100644 --- a/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/component/rest/RestApiEndpoint.java @@ -175,11 +175,11 @@ public class RestApiEndpoint extends DefaultEndpoint { // if no explicit hostname set then resolve the hostname if (ObjectHelper.isEmpty(host)) { -if (config.getRestHostNameResolver() == RestConfiguration.RestHostNameResolver.allLocalIp) { +if (config.getHostNameResolver() == RestConfiguration.RestHostNameResolver.allLocalIp) { host = "0.0.0.0"; -} else if (config.getRestHostNameResolver() == RestConfiguration.RestHostNameResolver.localHostName) { +} else if (config.getHostNameResolver() == RestConfiguration.RestHostNameResolver.localHostName) { host = HostUtils.getLocalHostName(); -} else if (config.getRestHostNameResolver() == RestConfiguration.RestHostNameResolver.localIp) { +} else if (config.getHostNameResolver() == RestConfiguration.RestHostNameResolver.localIp) { host = HostUtils.getLocalIp(); } diff --git a/camel-core/src/main/java/org/apache/camel/component/rest/RestEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/rest/RestEndpoint.java index 5518a10..3bafc85 100644 --- a/camel-core/src/main/java/org/apache/camel/component/rest/RestEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/component/rest/RestEndpoint.java @@ -471,11 +471,11 @@ public class RestEndpoint extends DefaultEndpoint { // if no explicit hostname set then resolve the hostname if (ObjectHelper.isEmpty(host)) { -if (config.getRestHostNameResolver() == RestConfiguration.RestHostNameResolver.allLocalIp) { +if (config.getHostNameResolver() == RestConfiguration.RestHostNameResolver.allLocalIp) { host = "0.0.0.0"; -} else if (config.getRestHostNameResolver() == RestConfiguration.RestHostNameResolver.localHostName) { +} else if (config.getHostNameResolver() == RestConfiguration.RestHostNameResolver.localHostName) { host = HostUtils.getLocalHostName(); -} else if (config.getRestHostNameResolver() == RestConfiguration.RestHostNameResolver.localIp) { +} else if (config.getHostNameResolver() == RestConfiguration.RestHostNameResolver.localIp) { host = HostUtils.getLocalIp(); } } diff --git a/camel-core/src/main/java/org/apache/camel/spi/RestConfiguration.java b/camel-core/src/main/java/org/apache/camel/spi/RestConfiguration.java index 6f85d95..b482668 100644 --- a/camel-core/src/main/java/org/apache/camel/spi/RestConfiguration.java +++ b/camel-core/src/main/java/org/apache/camel/spi/RestConfiguration.java @@ -51,7 +51,7 @@ public class RestConfiguration { private String apiContextIdPattern; private boolean apiContextListing; private boolean apiVendorExtension; -private RestHostNameResolver restHostNameResolver = RestHostNameResolver.allLocalIp; +private RestHostNameResolver hostNameResolver = RestHostNameResolver.allLocalIp; private RestBindingMode bindingMode = RestBindingMode.off; private boolean skipBindingOnErrorCode = true; private boolean enableCORS; @@ -304,27 +304,60 @@ public class RestConfiguration { * Gets the resolver to use for resolving hostname * * @return the resolver + * @deprecated use getHostNameResolver */ +@Deprecated public RestHostNameResolver getRestHostNameResolver() { -return restHostNameResolver; +return getHostNameResolver();