[1/3] git commit: CAMEL-7636: JMS request/reply onTimeout must catch exception to ensure entry is removed from timeout list otherwise could lead to endless retry attempts on next eviction runs.
Repository: camel Updated Branches: refs/heads/camel-2.13.x 02a8e9cd5 -> f0a11552a refs/heads/master d8d030165 -> 2ec2d44f3 CAMEL-7636: JMS request/reply onTimeout must catch exception to ensure entry is removed from timeout list otherwise could lead to endless retry attempts on next eviction runs. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f0a11552 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f0a11552 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f0a11552 Branch: refs/heads/camel-2.13.x Commit: f0a11552a901df1e35ed21aa5a84ee9cf74713c8 Parents: 02a8e9c Author: Claus Ibsen Authored: Fri Jul 25 09:44:07 2014 +0200 Committer: Claus Ibsen Committed: Fri Jul 25 17:04:36 2014 +0200 -- .../camel/component/jms/reply/CorrelationTimeoutMap.java | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/f0a11552/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/CorrelationTimeoutMap.java -- diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/CorrelationTimeoutMap.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/CorrelationTimeoutMap.java index 7b279d9..3d86be1 100644 --- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/CorrelationTimeoutMap.java +++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/reply/CorrelationTimeoutMap.java @@ -50,7 +50,13 @@ public class CorrelationTimeoutMap extends DefaultTimeoutMap
[2/3] git commit: CAMEL-7619: Rest DSL - adding support for xml/json binding using Camel's data formats.
CAMEL-7619: Rest DSL - adding support for xml/json binding using Camel's data formats. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c00286d8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c00286d8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c00286d8 Branch: refs/heads/master Commit: c00286d83aeb6627c4cf32da693d451d143f1379 Parents: d8d0301 Author: Claus Ibsen Authored: Fri Jul 25 23:27:43 2014 +0200 Committer: Claus Ibsen Committed: Fri Jul 25 23:27:43 2014 +0200 -- .../org/apache/camel/component/rest/RestEndpoint.java | 12 +++- .../org/apache/camel/model/rest/RestDefinition.java | 9 + .../java/org/apache/camel/spi/RestConsumerFactory.java | 7 --- .../camel/component/rest/DummyRestConsumerFactory.java | 4 ++-- .../camel/component/restlet/RestletComponent.java | 4 ++-- .../camel/component/sparkrest/SparkComponent.java | 4 ++-- .../component/rest/DummyRestConsumerFactory.java| 4 ++-- 7 files changed, 32 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/c00286d8/camel-core/src/main/java/org/apache/camel/component/rest/RestEndpoint.java -- 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 9f05502..1d9195d 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 @@ -39,6 +39,8 @@ public class RestEndpoint extends DefaultEndpoint { @UriParam private String consumes; @UriParam +private String produces; +@UriParam private String componentName; private Map parameters; @@ -76,6 +78,14 @@ public class RestEndpoint extends DefaultEndpoint { this.consumes = consumes; } +public String getProduces() { +return produces; +} + +public void setProduces(String produces) { +this.produces = produces; +} + public String getComponentName() { return componentName; } @@ -141,7 +151,7 @@ public class RestEndpoint extends DefaultEndpoint { } if (factory != null) { -Consumer consumer = factory.createConsumer(getCamelContext(), processor, getVerb(), getPath(), getConsumes(), getParameters()); +Consumer consumer = factory.createConsumer(getCamelContext(), processor, getVerb(), getPath(), getConsumes(), getProduces(), getParameters()); configureConsumer(consumer); return consumer; } else { http://git-wip-us.apache.org/repos/asf/camel/blob/c00286d8/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java index b7bf16d..64be3bf 100644 --- a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java @@ -309,8 +309,16 @@ public class RestDefinition { String from = "rest:" + verb.asVerb() + ":" + buildUri(verb); // append options Map options = new HashMap(); +// verb takes precedence over configuration on rest if (verb.getConsumes() != null) { options.put("consumes", verb.getConsumes()); +} else if (getConsumes() != null) { +options.put("consumes", getConsumes()); +} +if (verb.getProduces() != null) { +options.put("produces", verb.getProduces()); +} else if (getProduces() != null) { +options.put("produces", getProduces()); } if (!options.isEmpty()) { String query = URISupport.createQueryString(options); @@ -332,6 +340,7 @@ public class RestDefinition { binding.setOutType(verb.getOutType()); binding.setList(verb.getList()); binding.setOutList(verb.getOutList()); +// verb takes precedence over configuration on rest if (verb.getConsumes() != null) { binding.setConsumes(verb.getConsumes()); } else { http://git-wip-us.apache.org/repos/asf/camel/blob/c00286d8/camel-core/src/main/java/org/apache/camel/spi/RestConsumerFactory.java -- diff --git a/camel-core/src/main/java/org/apache/camel/spi/RestConsumerFactory.java b/camel-core/
[3/3] git commit: Upgraded groovy and mvel
Upgraded groovy and mvel Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2ec2d44f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2ec2d44f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2ec2d44f Branch: refs/heads/master Commit: 2ec2d44f32db91c5dcbff121924effac04c63010 Parents: c00286d Author: Claus Ibsen Authored: Fri Jul 25 23:32:53 2014 +0200 Committer: Claus Ibsen Committed: Fri Jul 25 23:32:53 2014 +0200 -- parent/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/2ec2d44f/parent/pom.xml -- diff --git a/parent/pom.xml b/parent/pom.xml index 8f3aab9..af50c47 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -166,7 +166,7 @@ 1.41.5.w1 1.41.1_1 17.0 -2.3.4 +2.3.5 2.2.4 3.0_1 3.0 @@ -309,7 +309,7 @@ 20050913 0.8.15 0.8.15_1/ -2.1.9.Final +2.2.1.Final 3.2.7 3.0.1 3.9.2.Final
svn commit: r917406 - in /websites/production/camel/content: cache/main.pageCache rest-dsl.html
Author: buildbot Date: Fri Jul 25 21:17:52 2014 New Revision: 917406 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/rest-dsl.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/rest-dsl.html == --- websites/production/camel/content/rest-dsl.html (original) +++ websites/production/camel/content/rest-dsl.html Fri Jul 25 21:17:52 2014 @@ -236,7 +236,7 @@ public class UserPojo { } ]]> -By having the JAXB annotations the POJO supports both json and xml bindings. Configuring Rest DSLThe Rest DSL allows to configure the following options using a builder style OptionDefaultDescriptioncomponent The Camel Rest component to use for the REST transport, such as restlet, spark-rest. If no component has been explicit configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a org.apache.camel.sp i.RestConsumerFactory is registered in the registry. If either one is found, then that is being used.schemehttpThe scheme to use for exposing the REST service. Usually http or https is supportedhostname0.0.0.0The hostname to use for exposing the REST service.port The port number to use for exposing the REST service.bindingModeoffWhether binding is in use. See further above for more details.jsonDataFormat Name of specific json data format to use. By default json-jackson will be used. Notice: Currently Jackson is what we recommend and are using for testing.xmlDataFormat Name of specific XML data format to use. By default jaxb will be used. Notice: Currently only jaxb is supported.componentProperty Allows to configure as many additional properties. This is used to configure component specific options such as for Restlet / Spark-Rest etc.endpointProperty Allows to configure as many additional properties. This is used to configure endpoint specific options for Restlet / Spark-Rest etc.consumerProperty Allows to configure as many additional properties. This is u sed to configure consumer specific options for Restlet / Spark-Rest etc. For example to configure to use the spark-rest component on port 9091, then we can do as follows +By having the JAXB annotations the POJO supports both json and xml bindings. Configuring Rest DSLThe Rest DSL allows to configure the following options using a builder style OptionDefaultDescriptioncomponent The Camel Rest component to use for the REST transport, such as restlet, spark-rest. If no component has been explicit configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a org.apache.camel.sp i.RestConsumerFactory is registered in the registry. If either one is found, then that is being used.schemehttpThe scheme to use for exposing the REST service. Usually http or https is supportedhostname0.0.0.0The hostname to use for exposing the REST service.port The port number to use for exposing the REST service.bindingModeoffWhether binding is in use. See further above for more details.jsonDataFormat Name of specific json data format to use. By default json-jackson will be used. Notice: Currently Jackson is what we recommend and are using for testing.xmlDataFormat Name of specific XML data format to use. By default jaxb will be used. Notice: Currently only jaxb is supported.componentProperty Allows to configure as many additional properties. This is used to configure component specific options such as for Restlet / Spark-Rest etc.endpointProperty Allows to configure as many additional properties. This is used to configure endpoint specific options for Restlet / Spark-Rest etc.consumerProperty Allows to configure as many additional properties. This is u sed to configure consumer specific options for Restlet / Spark-Rest etc.dataFormatProperty Allows to configure as many additional properties. This is used to configure the data format specific options. For example set property prettyPrint to true to have json outputted in pretty mode. For example to configure to use the spark-rest component on port 9091, then we can do as follows And with XML DSL
[CONF] Apache Camel > Rest DSL
Claus Ibsen edited the page: Rest DSL ... Option Default Description component The Camel Rest component to use for the REST transport, such as restlet, spark-rest. If no component has been explicit configured, then Camel will lookup if there is a Camel component that integrates with the Rest DSL, or if a org.apache.camel.spi.RestConsumerFactory is registered in the registry. If either one is found, then that is being used. scheme http The scheme to use for exposing the REST service. Usually http or https is supported hostname 0.0.0.0 The hostname to use for exposing the REST service. port The port number to use for exposing the REST service. bindingMode off Whether binding is in use. See further above for more details. jsonDataFormat Name of specific json data format to use. By default json-jackson will be used. Notice: Currently Jackson is what we recommend and are using for testing. xmlDataFormat Name of specific XML data format to use. By default jaxb will be used. Notice: Currently only jaxb is supported.
[2/2] git commit: CAMEL-7619: Rest DSL - adding support for xml/json binding using Camel's data formats.
CAMEL-7619: Rest DSL - adding support for xml/json binding using Camel's data formats. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d8d03016 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d8d03016 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d8d03016 Branch: refs/heads/master Commit: d8d03016533d21ce85de466a081489a489f609c7 Parents: 1284015 Author: Claus Ibsen Authored: Fri Jul 25 17:03:52 2014 +0200 Committer: Claus Ibsen Committed: Fri Jul 25 17:03:52 2014 +0200 -- .../camel/model/rest/RestBindingDefinition.java | 134 ++- .../model/rest/RestConfigurationDefinition.java | 79 +++ .../apache/camel/model/rest/RestDefinition.java | 81 --- .../processor/binding/RestBindingProcessor.java | 26 +++- .../org/apache/camel/spi/RestConfiguration.java | 57 .../camel-example-spark-rest-tomcat/README.txt | 3 + .../camel-example-spark-rest-tomcat/pom.xml | 6 + .../example/spark/MySparkRouteBuilder.java | 48 --- .../org/apache/camel/example/spark/User.java| 47 +++ .../camel/example/spark/UserRouteBuilder.java | 49 +++ .../apache/camel/example/spark/UserService.java | 64 + .../src/main/resources/camel-config.xml | 10 +- .../src/main/webapp/index.html | 34 +++-- 13 files changed, 480 insertions(+), 158 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/d8d03016/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java -- diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java index e0a0c32..7099c90 100644 --- a/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java +++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestBindingDefinition.java @@ -16,6 +16,8 @@ */ package org.apache.camel.model.rest; +import java.util.HashMap; +import java.util.Map; import javax.xml.bind.JAXBContext; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -27,6 +29,7 @@ import org.apache.camel.Processor; import org.apache.camel.model.NoOutputDefinition; import org.apache.camel.processor.binding.RestBindingProcessor; import org.apache.camel.spi.DataFormat; +import org.apache.camel.spi.RestConfiguration; import org.apache.camel.spi.RouteContext; import org.apache.camel.util.IntrospectionSupport; @@ -44,12 +47,6 @@ public class RestBindingDefinition extends NoOutputDefinition { private RestBindingMode bindingMode; @XmlAttribute -private String jsonDataFormat; - -@XmlAttribute -private String xmlDataFormat; - -@XmlAttribute private String type; @XmlAttribute @@ -68,7 +65,7 @@ public class RestBindingDefinition extends NoOutputDefinition { @Override public String getShortName() { -return "rest"; +return "restBinding"; } @Override @@ -88,75 +85,98 @@ public class RestBindingDefinition extends NoOutputDefinition { } // setup json data format -String name = jsonDataFormat; +String name = context.getRestConfiguration().getJsonDataFormat(); if (name == null) { name = "json-jackson"; } DataFormat json = context.resolveDataFormat(name); +DataFormat outJson = context.resolveDataFormat(name); // is json binding required? if (mode.contains("json") && json == null) { throw new IllegalArgumentException("JSon DataFormat " + name + " not found."); } -Class clazz = null; -if (type != null) { -clazz = context.getClassResolver().resolveMandatoryClass(type); -} -if (clazz != null) { -IntrospectionSupport.setProperty(context.getTypeConverter(), json, "unmarshalType", clazz); -IntrospectionSupport.setProperty(context.getTypeConverter(), json, "useList", list != null ? list : false); -} -context.addService(json); -DataFormat outJson = context.resolveDataFormat(name); -Class outClazz = null; -if (outType != null) { -outClazz = context.getClassResolver().resolveMandatoryClass(outType); -} -if (outClazz != null) { -IntrospectionSupport.setProperty(context.getTypeConverter(), outJson, "unmarshalType", outClazz); -IntrospectionSupport.setProperty(context.getTypeConverter(), outJson, "useList", outList != null ? outList : false); +if (json != null) { +Class clazz = null; +if (type != null) { +
[1/2] git commit: CAMEL-7639: camel-jackson supports pretty print option
Repository: camel Updated Branches: refs/heads/master 0d84fee97 -> d8d030165 CAMEL-7639: camel-jackson supports pretty print option Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1284015f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1284015f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1284015f Branch: refs/heads/master Commit: 1284015fa1da5ac72cc2dd71b8266f37a50b65f4 Parents: 0d84fee Author: Claus Ibsen Authored: Fri Jul 25 16:38:57 2014 +0200 Committer: Claus Ibsen Committed: Fri Jul 25 16:38:57 2014 +0200 -- .../camel/component/jackson/JacksonDataFormat.java | 13 + 1 file changed, 13 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/1284015f/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java -- diff --git a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java index 7f8429d..fd50ca6 100644 --- a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java +++ b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java @@ -25,6 +25,7 @@ import java.util.Map; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.type.CollectionType; import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule; import org.apache.camel.Exchange; @@ -42,6 +43,7 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat { private Class unmarshalType; private Class jsonView; private String include; +private boolean prettyPrint; private boolean allowJmsType; private boolean useList; @@ -170,6 +172,14 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat { return allowJmsType; } +public boolean isPrettyPrint() { +return prettyPrint; +} + +public void setPrettyPrint(boolean prettyPrint) { +this.prettyPrint = prettyPrint; +} + public boolean isUseList() { return useList; } @@ -211,6 +221,9 @@ public class JacksonDataFormat extends ServiceSupport implements DataFormat { JsonInclude.Include inc = JsonInclude.Include.valueOf(include); objectMapper.setSerializationInclusion(inc); } +if (prettyPrint) { +objectMapper.enable(SerializationFeature.INDENT_OUTPUT); +} } @Override
svn commit: r917380 - in /websites/production/camel/content: cache/main.pageCache jasypt.html
Author: buildbot Date: Fri Jul 25 14:18:02 2014 New Revision: 917380 Log: Production update by buildbot for camel Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/jasypt.html Modified: websites/production/camel/content/cache/main.pageCache == Binary files - no diff available. Modified: websites/production/camel/content/jasypt.html == --- websites/production/camel/content/jasypt.html (original) +++ websites/production/camel/content/jasypt.html Fri Jul 25 14:18:02 2014 @@ -86,31 +86,16 @@ -Jasypt component -Available as of Camel 2.5 - -http://www.jasypt.org/"; rel="nofollow">Jasypt is a simplified encryption library which makes encryption and decryption easy. Camel integrates with Jasypt to allow sensitive information in Properties files to be encrypted. By dropping camel-jasypt on the classpath those encrypted values will automatically be decrypted on-the-fly by Camel. This ensures that human eyes can't easily spot sensitive information such as usernames and passwords. - -Maven users will need to add the following dependency to their pom.xml for this component: - -Jasypt component
Available as of Camel 2.5
http://www.jasypt.org/"; rel="nofollow">Jasypt is a simplified encryption library which makes encryption and decryption easy. Camel integrates with Jasypt to allow sensitive information in Properties files to be encrypted. By dropping
camel-jasypt
on the classpath those encrypted values will automatically be decrypted on-the-fly by Camel. This ensures that human eyes can't easily spot sensitive information such as usernames and passwords.Maven users will need to add the following dependency to their
pom.xml
for this component:+