camel git commit: Component doc

2015-04-23 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 4118be401 - 56823320c


Component doc


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/56823320
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/56823320
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/56823320

Branch: refs/heads/master
Commit: 56823320c21edf4e569623d7ecfd0c5dbc5dc910
Parents: 4118be4
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Apr 23 16:59:22 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Apr 23 16:59:22 2015 +0200

--
 .../camel/component/docker/DockerComponent.java |  6 +++
 .../component/docker/DockerConfiguration.java   | 44 ++--
 2 files changed, 47 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/56823320/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerComponent.java
--
diff --git 
a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerComponent.java
 
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerComponent.java
index 35f641d..3f0cef2 100644
--- 
a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerComponent.java
+++ 
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerComponent.java
@@ -70,6 +70,9 @@ public class DockerComponent extends DefaultComponent {
 this.configuration = configuration;
 }
 
+/**
+ * To use the shared docker configuration
+ */
 protected DockerConfiguration getConfiguration() {
 return configuration;
 }
@@ -78,6 +81,9 @@ public class DockerComponent extends DefaultComponent {
 return clients.get(clientProfile);
 }
 
+/**
+ * To use the given docker client
+ */
 public void setClient(DockerClientProfile clientProfile, DockerClient 
client) {
 clients.put(clientProfile, client);
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/56823320/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConfiguration.java
--
diff --git 
a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConfiguration.java
 
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConfiguration.java
index c1434e6..af1a32c 100644
--- 
a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConfiguration.java
+++ 
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConfiguration.java
@@ -31,10 +31,10 @@ public class DockerConfiguration implements Cloneable {
 @UriPath @Metadata(required = true)
 private DockerOperation operation;
 
-@UriParam(defaultValue = localhost)
+@UriParam(defaultValue = localhost) @Metadata(required = true)
 private String host = localhost;
 
-@UriParam(defaultValue = 2375)
+@UriParam(defaultValue = 2375) @Metadata(required = true)
 private Integer port = 2375;
 
 @UriParam
@@ -70,6 +70,9 @@ public class DockerConfiguration implements Cloneable {
 return host;
 }
 
+/**
+ * Docker host
+ */
 public void setHost(String host) {
 this.host = host;
 }
@@ -78,6 +81,9 @@ public class DockerConfiguration implements Cloneable {
 return port;
 }
 
+/**
+ * Docker port
+ */
 public void setPort(Integer port) {
 this.port = port;
 }
@@ -86,6 +92,9 @@ public class DockerConfiguration implements Cloneable {
 return username;
 }
 
+/**
+ * User name to authenticate with
+ */
 public void setUsername(String username) {
 this.username = username;
 }
@@ -94,6 +103,9 @@ public class DockerConfiguration implements Cloneable {
 return password;
 }
 
+/**
+ * Password to authenticate with
+ */
 public void setPassword(String password) {
 this.password = password;
 }
@@ -102,6 +114,9 @@ public class DockerConfiguration implements Cloneable {
 return email;
 }
 
+/**
+ * Email address associated with the user
+ */
 public void setEmail(String email) {
 this.email = email;
 }
@@ -110,6 +125,9 @@ public class DockerConfiguration implements Cloneable {
 return serverAddress;
 }
 
+/**
+ * Server address for docker registry.
+ */
 public void setServerAddress(String serverAddress) {
 this.serverAddress = serverAddress;
 }
@@ -118,6 +136,9 @@ public class DockerConfiguration implements Cloneable {
 return requestTimeout;
 }
 
+/**
+ * Request timeout for response (in 

camel git commit: CAMEL-8689 Camel Dozer classloading issue: minor adjustments for code quality/clarity.

2015-04-23 Thread raulk
Repository: camel
Updated Branches:
  refs/heads/fix/CAMEL-8689-camel-dozer-classloading-issue 87eebc6c0 - 
bf7e94fcb


CAMEL-8689 Camel Dozer classloading issue: minor adjustments for code 
quality/clarity.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bf7e94fc
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bf7e94fc
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bf7e94fc

Branch: refs/heads/fix/CAMEL-8689-camel-dozer-classloading-issue
Commit: bf7e94fcb189760fd3c2d33376dce66c6f9273ee
Parents: 87eebc6
Author: Raul Kripalani ra...@apache.org
Authored: Thu Apr 23 15:40:41 2015 +0100
Committer: Raul Kripalani ra...@apache.org
Committed: Thu Apr 23 15:40:41 2015 +0100

--
 .../dozer/DozerThreadContextClassLoader.java| 83 
 .../dozer/DozerTypeConverterLoader.java |  8 +-
 .../dozer/ThreadContextClassLoader.java | 83 
 3 files changed, 87 insertions(+), 87 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/bf7e94fc/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerThreadContextClassLoader.java
--
diff --git 
a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerThreadContextClassLoader.java
 
b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerThreadContextClassLoader.java
new file mode 100644
index 000..e5d89e1
--- /dev/null
+++ 
b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerThreadContextClassLoader.java
@@ -0,0 +1,83 @@
+/**
+ * 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.converter.dozer;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.commons.lang3.ClassUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.dozer.util.DozerClassLoader;
+import org.dozer.util.MappingUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DozerThreadContextClassLoader implements DozerClassLoader {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(DozerThreadContextClassLoader.class);
+
+private final DozerClassLoader delegate;
+
+public DozerThreadContextClassLoader(DozerClassLoader delegate) {
+this.delegate = delegate;
+}
+
+@Override
+public Class? loadClass(String className) {
+LOG.debug(Loading class from classloader: {}., 
Thread.currentThread().getContextClassLoader());
+Class? result = null;
+try {
+// try to resolve the class from the thread context classloader
+result = 
ClassUtils.getClass(Thread.currentThread().getContextClassLoader(), className);
+} catch (ClassNotFoundException e) {
+// if unresolvable, ask the delegate
+result = delegate.loadClass(className);
+if (result == null) {
+MappingUtils.throwMappingException(e);
+}
+}
+return result;
+}
+
+@Override
+public URL loadResource(String uri) {
+LOG.debug(Loading resource from classloader: {}., 
Thread.currentThread().getContextClassLoader());
+URL answer = 
Thread.currentThread().getContextClassLoader().getResource(uri);
+
+// try loading it from the delegate
+if (answer == null) {
+answer = delegate.loadResource(uri);
+}
+
+// try treating it as a system resource
+if (answer == null) {
+answer = ClassLoader.getSystemResource(uri);
+}
+
+// one more time in case it's a normal URI
+if (answer == null  StringUtils.contains(uri, :)) {
+try {
+answer = new URL(uri);
+} catch (MalformedURLException e) {
+MappingUtils.throwMappingException(e);
+}
+}
+
+return answer;
+}
+
+}


camel git commit: [CAMEL-8690] Use OSGi BundleActivator.stop() to load hdfs2 classes needed by shutdown hooks

2015-04-23 Thread ggrzybek
Repository: camel
Updated Branches:
  refs/heads/master 56823320c - 300ee8dfa


[CAMEL-8690] Use OSGi BundleActivator.stop() to load hdfs2 classes needed by 
shutdown hooks

(cherry picked from commit d952647707a9b4a717ec220b087dc170fcee3ef7)


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/300ee8df
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/300ee8df
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/300ee8df

Branch: refs/heads/master
Commit: 300ee8dfaed255006e88699eca39d366a5404fd1
Parents: 5682332
Author: Grzegorz Grzybek gr.grzy...@gmail.com
Authored: Thu Apr 23 17:02:39 2015 +0200
Committer: Grzegorz Grzybek gr.grzy...@gmail.com
Committed: Thu Apr 23 17:04:49 2015 +0200

--
 components/camel-hdfs2/pom.xml  | 10 
 .../camel/component/hdfs2/HdfsActivator.java| 51 
 2 files changed, 61 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/300ee8df/components/camel-hdfs2/pom.xml
--
diff --git a/components/camel-hdfs2/pom.xml b/components/camel-hdfs2/pom.xml
index a2f6605..b457409 100644
--- a/components/camel-hdfs2/pom.xml
+++ b/components/camel-hdfs2/pom.xml
@@ -46,6 +46,9 @@
   org.apache.hadoop.hdfs.protocol.proto,
   org.apache.hadoop.hdfs.protocol.datatransfer
 /camel.osgi.import.additional
+camel.osgi.activator
+  org.apache.camel.component.hdfs2.HdfsActivator
+/camel.osgi.activator
   /properties
 
   dependencies
@@ -127,6 +130,13 @@
   scopetest/scope
 /dependency
 
+dependency
+  groupIdorg.osgi/groupId
+  artifactIdorg.osgi.core/artifactId
+  scopeprovided/scope
+  optionaltrue/optional
+/dependency
+
   /dependencies
 
 !-- skip tests on Windows due CAMEL-8445 --

http://git-wip-us.apache.org/repos/asf/camel/blob/300ee8df/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
--
diff --git 
a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
 
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
new file mode 100644
index 000..dafaa08
--- /dev/null
+++ 
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
@@ -0,0 +1,51 @@
+/**
+ * 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.hdfs2;
+
+import org.apache.hadoop.util.ShutdownHookManager;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class HdfsActivator implements BundleActivator {
+
+@Override
+public void start(BundleContext context) throws Exception {
+}
+
+@Override
+public void stop(BundleContext context) throws Exception {
+// There's problem inside OSGi when framwork is being shutdown
+// hadoop.fs code registers some JVM shutdown hooks throughout the 
code and this ordered
+// list of hooks is run in shutdown thread.
+// At that time bundle class loader / bundle wiring is no longer valid 
(bundle is stopped)
+// so ShutdownHookManager can't load additional classes. But there are 
some inner classes
+// loaded when iterating over registered hadoop shutdown hooks.
+// Let's explicitely load these inner classes when bundle is stopped, 
as there's last chance
+// to use valid bundle class loader.
+// This is based on the knowledge of what's contained in SMX bundle
+// org.apache.servicemix.bundles.hadoop-client-*.jar
+// the above is just a warning that hadopp may have some quirks when 
running inside OSGi
+ClassLoader hadoopCl = ShutdownHookManager.class.getClassLoader();
+if (hadoopCl != null) {
+String shm = ShutdownHookManager.class.getName();
+hadoopCl.loadClass(shm + $1);
+hadoopCl.loadClass(shm + $2);
+

buildbot failure in ASF Buildbot on camel-site-production

2015-04-23 Thread buildbot
The Buildbot has detected a new failure on builder camel-site-production while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/camel-site-production/builds/8702

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'camel-site-production' triggered 
this build
Build Source Stamp: [branch camel/website] HEAD
Blamelist: 

BUILD FAILED: failed compile

Sincerely,
 -The Buildbot





svn commit: r948890 - in /websites/production/camel/content: cache/main.pageCache camel-2160-release.html

2015-04-23 Thread buildbot
Author: buildbot
Date: Thu Apr 23 14:18:50 2015
New Revision: 948890

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/camel-2160-release.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/camel-2160-release.html
==
--- websites/production/camel/content/camel-2160-release.html (original)
+++ websites/production/camel/content/camel-2160-release.html Thu Apr 23 
14:18:50 2015
@@ -84,7 +84,7 @@
tbody
 tr
 td valign=top width=100%
-div class=wiki-content maincontenth1 
id=Camel2.16.0Release-Camel2.16.0release(currentlyinprogress)Camel 
2.16.0#160;release (currently in progress)/h1div 
style=padding-right:20px;float:left;margin-left:-20px;pimg 
class=confluence-embedded-image confluence-external-resource 
src=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;/p/divdiv
 style=min-height:200px#160;/divh2 
id=Camel2.16.0Release-NewandNoteworthyNew and Noteworthy/h2pWelcome to 
the x.y.z release which approx XXX issues resolved (new features, improvements 
and bug fixes such as...)/ppNoteworthy improvements:/pulliThe route 
models (definition classes) preserve property placeholders, which allows round 
trip editing, and also prevents showing potential sensitive 
information/liliAdded onPrepareFailure option to#160;a shape=rect 
href=dead-letter-channel.htmlDead Letter Cha
 nnel/a to allow a custom processor to prepare the Exchange before sending to 
the dead letter queue./lilia shape=rect href=mongodb.htmlMongoDB/a 
tailable consumers now allow setting the codereadPreference/code 
option./liliUsing setFaultBody / setFaultHeader behaves similar to setBody 
/ setHeader to preserve existing headers/attachments by setting on existing IN 
or OUT message./liliJava DSL using choice with end vs endChoice now 
validates you use them as intended. Any misconfiguration now throws an 
exception explaining the problem./lilia shape=rect 
href=pojo-producing.htmlPOJO Producing/a and#160;a shape=rect 
href=pojo-consuming.htmlPOJO Consuming/a lifecycle is now in sync with a 
shape=rect href=camelcontext.htmlCamelContext/a#160;which ensures it 
works as similar to Camel#160;a shape=rect href=routes.htmlRoutes/a 
does. Also the created producer/consumer is stopped when#160;a shape=rect 
href=camelcontext.htmlCame
 lContext/a#160;is stopping to cleanup properly./lilia shape=rect 
href=jms.htmlJMS/a#160;component now allows configuring 
concurrentConsumers/maxConcurrentConsumers separately between from(jms) vs 
to(jms) using request/reply over JMS/lilispana shape=rect 
class=external-link 
href=https://issues.apache.org/jira/browse/CAMEL-8506;Added SEARCH/a 
operation to Elasticsearch component/span/lilispanThe#160;a 
shape=rect href=properties.htmlProperties/a component (property 
placeholder) now supports an encoding option to allow reading the .properties 
files using a specific charset such as UTF-8. By default ISO-8859-1 is used 
(latin1)/span/lilispanAdded#160;codereceviveBufferSize/code option 
to the a shape=rect href=ftp.htmlFTP/a#160;component to make download 
faster. The size is by default 32kb buffer./span/lilispanThe#160;a 
shape=rect href=aggregator2.htmlAggregator2/a EIP now allows an external 
source using
  a#160;codeAggregateController/code to control the aggregator, such as 
for forcing completing a group or all groups, or query runtime information from 
the aggregator. A default controller is provided out of the box if none has 
been configured./span/lilispanThe#160;a shape=rect 
href=aggregator2.htmlAggregator2/a now enlists in JMX using 
a#160;codeManagedAggregateProcessorMBean/code which has more information, 
and also allows using the aggregate controller to control 
it./span/lilispanThe#160;a shape=rect 
href=aggregator2.htmlAggregator2/a now includes more runtime statistics 
which can be accessed from Java and JMX about number of incoming and completed 
exchanges, and per different completion 
triggers./span/lilispanThe#160;a shape=rect 
href=aggregator2.htmlAggregator2/a now supports pre-completion mode if the 
aggregation strategy 
implements#160;codePreCompletionAwareAggregationStrategy/code. This 
supports the use-case wh
 ere an incoming Exchange are used to determine if the current aggregated group 
is completed or not. If completed the group is emitted as-is, and the new 
incoming Exchange is used to start a new group from 
scratch./span/lilispanAdded options to#160;a shape=rect 
href=mail.htmlMail/a consumer so it can skip or handle a mail message that 
cannot be read from the mail server in the batch; and then move on to read the 

camel git commit: [CAMEL-8690] Use OSGi BundleActivator.stop() to load hdfs2 classes needed by shutdown hooks

2015-04-23 Thread ggrzybek
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x 31fac1262 - d95264770


[CAMEL-8690] Use OSGi BundleActivator.stop() to load hdfs2 classes needed by 
shutdown hooks


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d9526477
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d9526477
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d9526477

Branch: refs/heads/camel-2.15.x
Commit: d952647707a9b4a717ec220b087dc170fcee3ef7
Parents: 31fac12
Author: Grzegorz Grzybek gr.grzy...@gmail.com
Authored: Thu Apr 23 17:02:39 2015 +0200
Committer: Grzegorz Grzybek gr.grzy...@gmail.com
Committed: Thu Apr 23 17:02:39 2015 +0200

--
 components/camel-hdfs2/pom.xml  | 10 
 .../camel/component/hdfs2/HdfsActivator.java| 51 
 2 files changed, 61 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d9526477/components/camel-hdfs2/pom.xml
--
diff --git a/components/camel-hdfs2/pom.xml b/components/camel-hdfs2/pom.xml
index 4dbb315..78db5b7 100644
--- a/components/camel-hdfs2/pom.xml
+++ b/components/camel-hdfs2/pom.xml
@@ -46,6 +46,9 @@
   org.apache.hadoop.hdfs.protocol.proto,
   org.apache.hadoop.hdfs.protocol.datatransfer
 /camel.osgi.import.additional
+camel.osgi.activator
+  org.apache.camel.component.hdfs2.HdfsActivator
+/camel.osgi.activator
   /properties
 
   dependencies
@@ -128,6 +131,13 @@
   scopetest/scope
 /dependency
 
+dependency
+  groupIdorg.osgi/groupId
+  artifactIdorg.osgi.core/artifactId
+  scopeprovided/scope
+  optionaltrue/optional
+/dependency
+
   /dependencies
 
 !-- skip tests on Windows due CAMEL-8445 --

http://git-wip-us.apache.org/repos/asf/camel/blob/d9526477/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
--
diff --git 
a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
 
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
new file mode 100644
index 000..dafaa08
--- /dev/null
+++ 
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
@@ -0,0 +1,51 @@
+/**
+ * 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.hdfs2;
+
+import org.apache.hadoop.util.ShutdownHookManager;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class HdfsActivator implements BundleActivator {
+
+@Override
+public void start(BundleContext context) throws Exception {
+}
+
+@Override
+public void stop(BundleContext context) throws Exception {
+// There's problem inside OSGi when framwork is being shutdown
+// hadoop.fs code registers some JVM shutdown hooks throughout the 
code and this ordered
+// list of hooks is run in shutdown thread.
+// At that time bundle class loader / bundle wiring is no longer valid 
(bundle is stopped)
+// so ShutdownHookManager can't load additional classes. But there are 
some inner classes
+// loaded when iterating over registered hadoop shutdown hooks.
+// Let's explicitely load these inner classes when bundle is stopped, 
as there's last chance
+// to use valid bundle class loader.
+// This is based on the knowledge of what's contained in SMX bundle
+// org.apache.servicemix.bundles.hadoop-client-*.jar
+// the above is just a warning that hadopp may have some quirks when 
running inside OSGi
+ClassLoader hadoopCl = ShutdownHookManager.class.getClassLoader();
+if (hadoopCl != null) {
+String shm = ShutdownHookManager.class.getName();
+hadoopCl.loadClass(shm + $1);
+hadoopCl.loadClass(shm + $2);
+hadoopCl.loadClass(shm + $HookEntry);
+}
+}
+
+}



camel git commit: CAMEL-8691 Camel-docker: Add FollowRedirects and LoggingFilter options to client configuration

2015-04-23 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 31d504c41 - ae7b52acb


CAMEL-8691 Camel-docker: Add FollowRedirects and LoggingFilter options to 
client configuration


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ae7b52ac
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ae7b52ac
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ae7b52ac

Branch: refs/heads/master
Commit: ae7b52acb04b0f2eddeee506777e482f41e3952b
Parents: 31d504c
Author: ancosen anco...@gmail.com
Authored: Thu Apr 23 09:41:48 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Apr 23 18:05:56 2015 +0200

--
 .../component/docker/DockerClientFactory.java   | 15 +++-
 .../component/docker/DockerClientProfile.java   | 38 +++-
 .../component/docker/DockerConfiguration.java   | 22 
 .../camel/component/docker/DockerConstants.java |  2 ++
 4 files changed, 75 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/ae7b52ac/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerClientFactory.java
--
diff --git 
a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerClientFactory.java
 
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerClientFactory.java
index b95fb5e..fd1994f 100644
--- 
a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerClientFactory.java
+++ 
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerClientFactory.java
@@ -62,7 +62,10 @@ public final class DockerClientFactory {
 String serverAddress = 
DockerHelper.getProperty(DockerConstants.DOCKER_SERVER_ADDRESS, 
dockerConfiguration, message, String.class, 
dockerConfiguration.getServerAddress());
 String certPath = 
DockerHelper.getProperty(DockerConstants.DOCKER_CERT_PATH, dockerConfiguration, 
message, String.class, dockerConfiguration.getCertPath());
 Boolean secure = 
DockerHelper.getProperty(DockerConstants.DOCKER_SECURE, dockerConfiguration, 
message, Boolean.class, dockerConfiguration.isSecure());
-
+Boolean loggingFilter = 
DockerHelper.getProperty(DockerConstants.DOCKER_LOGGING_FILTER, 
dockerConfiguration, message, Boolean.class, 
dockerConfiguration.isLoggingFilterEnabled());
+Boolean followRedirectFilter = 
DockerHelper.getProperty(DockerConstants.DOCKER_FOLLOW_REDIRECT_FILTER, 
dockerConfiguration, message, 
+Boolean.class, 
dockerConfiguration.isFollowRedirectFilterEnabled());
+
 clientProfile.setHost(host);
 clientProfile.setPort(port);
 clientProfile.setEmail(email);
@@ -74,6 +77,8 @@ public final class DockerClientFactory {
 clientProfile.setMaxTotalConnections(maxTotalConnections);
 clientProfile.setMaxPerRouteConnections(maxPerRouteConnections);
 clientProfile.setSecure(secure);
+clientProfile.setFollowRedirectFilter(followRedirectFilter);
+clientProfile.setLoggingFilter(loggingFilter);
 
 DockerClient client = dockerComponent.getClient(clientProfile);
 
@@ -99,7 +104,15 @@ public final class DockerClientFactory {
 if (clientProfile.getCertPath() != null) {
 configBuilder.withDockerCertPath(clientProfile.getCertPath());
 }
+
+if (clientProfile.isFollowRedirectFilterEnabled() != null  
clientProfile.isFollowRedirectFilterEnabled()) {
+
configBuilder.withFollowRedirectsFilter(clientProfile.isFollowRedirectFilterEnabled());
+}
 
+if (clientProfile.isLoggingFilterEnabled() != null  
clientProfile.isLoggingFilterEnabled()) {
+
configBuilder.withLoggingFilter(clientProfile.isLoggingFilterEnabled());
+}
+
 DockerClientConfig config = configBuilder.build();
 DockerCmdExecFactory dockerClientFactory = new 
DockerCmdExecFactoryImpl();
 client = 
DockerClientBuilder.getInstance(config).withDockerCmdExecFactory(dockerClientFactory).build();

http://git-wip-us.apache.org/repos/asf/camel/blob/ae7b52ac/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerClientProfile.java
--
diff --git 
a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerClientProfile.java
 
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerClientProfile.java
index 6aff114..5d7d3fc 100644
--- 
a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerClientProfile.java
+++ 
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerClientProfile.java
@@ -48,6 

camel git commit: [CAMEL-8690] Move hdfs2 BundleActivator to osgi subpackage

2015-04-23 Thread ggrzybek
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x d95264770 - 018244675


[CAMEL-8690] Move hdfs2 BundleActivator to osgi subpackage


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/01824467
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/01824467
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/01824467

Branch: refs/heads/camel-2.15.x
Commit: 018244675f3d7162d22ad1654a9061aee6e8437b
Parents: d952647
Author: Grzegorz Grzybek gr.grzy...@gmail.com
Authored: Thu Apr 23 17:10:10 2015 +0200
Committer: Grzegorz Grzybek gr.grzy...@gmail.com
Committed: Thu Apr 23 17:10:10 2015 +0200

--
 components/camel-hdfs2/pom.xml  |  2 +-
 .../camel/component/hdfs2/HdfsActivator.java| 51 
 .../component/hdfs2/osgi/HdfsActivator.java | 51 
 3 files changed, 52 insertions(+), 52 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/01824467/components/camel-hdfs2/pom.xml
--
diff --git a/components/camel-hdfs2/pom.xml b/components/camel-hdfs2/pom.xml
index 78db5b7..0b89a23 100644
--- a/components/camel-hdfs2/pom.xml
+++ b/components/camel-hdfs2/pom.xml
@@ -47,7 +47,7 @@
   org.apache.hadoop.hdfs.protocol.datatransfer
 /camel.osgi.import.additional
 camel.osgi.activator
-  org.apache.camel.component.hdfs2.HdfsActivator
+  org.apache.camel.component.hdfs2.osgi.HdfsActivator
 /camel.osgi.activator
   /properties
 

http://git-wip-us.apache.org/repos/asf/camel/blob/01824467/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
--
diff --git 
a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
 
b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
deleted file mode 100644
index dafaa08..000
--- 
a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsActivator.java
+++ /dev/null
@@ -1,51 +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.component.hdfs2;
-
-import org.apache.hadoop.util.ShutdownHookManager;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-
-public class HdfsActivator implements BundleActivator {
-
-@Override
-public void start(BundleContext context) throws Exception {
-}
-
-@Override
-public void stop(BundleContext context) throws Exception {
-// There's problem inside OSGi when framwork is being shutdown
-// hadoop.fs code registers some JVM shutdown hooks throughout the 
code and this ordered
-// list of hooks is run in shutdown thread.
-// At that time bundle class loader / bundle wiring is no longer valid 
(bundle is stopped)
-// so ShutdownHookManager can't load additional classes. But there are 
some inner classes
-// loaded when iterating over registered hadoop shutdown hooks.
-// Let's explicitely load these inner classes when bundle is stopped, 
as there's last chance
-// to use valid bundle class loader.
-// This is based on the knowledge of what's contained in SMX bundle
-// org.apache.servicemix.bundles.hadoop-client-*.jar
-// the above is just a warning that hadopp may have some quirks when 
running inside OSGi
-ClassLoader hadoopCl = ShutdownHookManager.class.getClassLoader();
-if (hadoopCl != null) {
-String shm = ShutdownHookManager.class.getName();
-hadoopCl.loadClass(shm + $1);
-hadoopCl.loadClass(shm + $2);
-hadoopCl.loadClass(shm + $HookEntry);
-}
-}
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/01824467/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/osgi/HdfsActivator.java
--
diff --git 

buildbot success in ASF Buildbot on camel-site-production

2015-04-23 Thread buildbot
The Buildbot has detected a restored build on builder camel-site-production 
while building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/camel-site-production/builds/8703

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-cms-slave

Build Reason: The Nightly scheduler named 'camel-site-production' triggered 
this build
Build Source Stamp: [branch camel/website] HEAD
Blamelist: 

Build succeeded!

Sincerely,
 -The Buildbot





camel git commit: Add a bit more javadoc about mock and the message count vs expected bodies override each other.

2015-04-23 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 22cf585a4 - 4118be401


Add a bit more javadoc about mock and the message count vs expected bodies 
override each other.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4118be40
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4118be40
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4118be40

Branch: refs/heads/master
Commit: 4118be40102904b1e393fc68ca739ad68696417d
Parents: 22cf585
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Apr 23 16:39:47 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Apr 23 16:39:47 2015 +0200

--
 .../camel/component/mock/MockEndpoint.java  | 41 +++-
 1 file changed, 40 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/4118be40/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java 
b/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
index 1f7ede6..c6732f1 100644
--- a/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
@@ -85,6 +85,10 @@ import org.slf4j.LoggerFactory;
  * An alternative is to use a 
href=http://camel.apache.org/notifybuilder.html;NotifyBuilder/a, and use 
the notifier
  * to know when Camel is done routing some messages, before you call the 
{@link #assertIsSatisfied()} method on the mocks.
  * This allows you to not use a fixed assert period, to speedup testing times.
+ * p/
+ * bImportant:/b If using {@link #expectedMessageCount(int)} and also 
{@link #expectedBodiesReceived(java.util.List)} or
+ * {@link #expectedHeaderReceived(String, Object)} then the latter overrides 
the number of expected message based on the
+ * number of values provided in the bodies/headers.
  *
  * @version 
  */
@@ -507,6 +511,11 @@ public class MockEndpoint extends DefaultEndpoint 
implements BrowsableEndpoint {
  * p/
  * You can set multiple expectations for different header names.
  * If you set a value of ttnull/tt that means we accept either the 
header is absent, or its value is ttnull/tt
+ * p/
+ * bImportant:/b The number of values must match the expected number 
of messages, so if you expect 3 messages, then
+ * there must be 3 values.
+ * p/
+ * bImportant:/b This overrides any previous set value using {@link 
#expectedMessageCount(int)}
  */
 public void expectedHeaderReceived(final String name, final Object value) {
 if (expectedHeaderValues == null) {
@@ -541,7 +550,12 @@ public class MockEndpoint extends DefaultEndpoint 
implements BrowsableEndpoint {
 
 /**
  * Adds an expectation that the given header values are received by this
- * endpoint in any order
+ * endpoint in any order.
+ * p/
+ * bImportant:/b The number of values must match the expected number 
of messages, so if you expect 3 messages, then
+ * there must be 3 values.
+ * p/
+ * bImportant:/b This overrides any previous set value using {@link 
#expectedMessageCount(int)}
  */
 public void expectedHeaderValuesReceivedInAnyOrder(final String name, 
final List? values) {
 expectedMessageCount(values.size());
@@ -572,6 +586,11 @@ public class MockEndpoint extends DefaultEndpoint 
implements BrowsableEndpoint {
 /**
  * Adds an expectation that the given header values are received by this
  * endpoint in any order
+ * p/
+ * bImportant:/b The number of values must match the expected number 
of messages, so if you expect 3 messages, then
+ * there must be 3 values.
+ * p/
+ * bImportant:/b This overrides any previous set value using {@link 
#expectedMessageCount(int)}
  */
 public void expectedHeaderValuesReceivedInAnyOrder(String name, Object... 
values) {
 ListObject valueList = new ArrayListObject();
@@ -622,6 +641,11 @@ public class MockEndpoint extends DefaultEndpoint 
implements BrowsableEndpoint {
 /**
  * Adds an expectation that the given body values are received by this
  * endpoint in the specified order
+ * p/
+ * bImportant:/b The number of values must match the expected number 
of messages, so if you expect 3 messages, then
+ * there must be 3 values.
+ * p/
+ * bImportant:/b This overrides any previous set value using {@link 
#expectedMessageCount(int)}
  */
 public void expectedBodiesReceived(final List? bodies) {
 expectedMessageCount(bodies.size());
@@ -684,6 +708,11 @@ public class MockEndpoint extends DefaultEndpoint 
implements 

[2/2] camel git commit: CAMEL-8692: Improve the PredicateBuilder with the missing vargs and list or helper method

2015-04-23 Thread cmueller
CAMEL-8692: Improve the PredicateBuilder with the missing vargs and list or 
helper method


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6c246722
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6c246722
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6c246722

Branch: refs/heads/master
Commit: 6c2467222ce47d82323b34afb9434bb41eb5a46e
Parents: 8bcd609
Author: Christian Mueller cmuel...@apache.org
Authored: Thu Apr 23 21:40:17 2015 +0200
Committer: Christian Mueller cmuel...@apache.org
Committed: Thu Apr 23 21:40:17 2015 +0200

--
 .../apache/camel/builder/PredicateBuilder.java  | 30 
 .../camel/builder/PredicateBuilderTest.java |  6 ++--
 2 files changed, 33 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/6c246722/camel-core/src/main/java/org/apache/camel/builder/PredicateBuilder.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/builder/PredicateBuilder.java 
b/camel-core/src/main/java/org/apache/camel/builder/PredicateBuilder.java
index ae9e9c4..c2eb5c9 100644
--- a/camel-core/src/main/java/org/apache/camel/builder/PredicateBuilder.java
+++ b/camel-core/src/main/java/org/apache/camel/builder/PredicateBuilder.java
@@ -105,6 +105,36 @@ public final class PredicateBuilder {
 }
 
 /**
+ * Concat the given predicates into a single predicate, which matches
+ * if at least one predicates matches.
+ *
+ * @param predicates predicates
+ * @return a single predicate containing all the predicates
+ */
+public static Predicate or(ListPredicate predicates) {
+Predicate answer = null;
+for (Predicate predicate : predicates) {
+if (answer == null) {
+answer = predicate;
+} else {
+answer = or(answer, predicate);
+}
+}
+return answer;
+}
+
+/**
+ * Concat the given predicates into a single predicate, which matches
+ * if at least one predicates matches.
+ *
+ * @param predicates predicates
+ * @return a single predicate containing all the predicates
+ */
+public static Predicate or(Predicate... predicates) {
+return or(Arrays.asList(predicates));
+}
+
+/**
  * A helper method to return true if any of the predicates matches.
  */
 public static Predicate in(final Predicate... predicates) {

http://git-wip-us.apache.org/repos/asf/camel/blob/6c246722/camel-core/src/test/java/org/apache/camel/builder/PredicateBuilderTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/builder/PredicateBuilderTest.java 
b/camel-core/src/test/java/org/apache/camel/builder/PredicateBuilderTest.java
index 6ada574..b1c0338 100644
--- 
a/camel-core/src/test/java/org/apache/camel/builder/PredicateBuilderTest.java
+++ 
b/camel-core/src/test/java/org/apache/camel/builder/PredicateBuilderTest.java
@@ -30,10 +30,8 @@ import static org.apache.camel.builder.Builder.constant;
 import static org.apache.camel.builder.PredicateBuilder.in;
 import static org.apache.camel.builder.PredicateBuilder.not;
 
-/**
- * @version 
- */
 public class PredicateBuilderTest extends TestSupport {
+
 protected Exchange exchange = new DefaultExchange(new 
DefaultCamelContext());
 
 public void testRegexPredicates() throws Exception {
@@ -91,9 +89,11 @@ public class PredicateBuilderTest extends TestSupport {
 
 // check method signature with varargs
 assertMatches(PredicateBuilder.in(p1, p2, p3));
+assertMatches(PredicateBuilder.or(p1, p2, p3));
 
 // maybe a list of predicates?
 assertMatches(PredicateBuilder.in(Arrays.asList(p1, p2, p3)));
+assertMatches(PredicateBuilder.or(Arrays.asList(p1, p2, p3)));
 }
 
 public void testCompoundAndOrPredicates() throws Exception {



Git Push Summary

2015-04-23 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/test_acosentino [deleted] 6c2467222


svn commit: r948928 - in /websites/production/camel/content: cache/main.pageCache mongodb.html

2015-04-23 Thread buildbot
Author: buildbot
Date: Thu Apr 23 19:19:38 2015
New Revision: 948928

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/mongodb.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/mongodb.html
==
--- websites/production/camel/content/mongodb.html (original)
+++ websites/production/camel/content/mongodb.html Thu Apr 23 19:19:38 2015
@@ -96,7 +96,7 @@
 /div/divh2 id=MongoDB-URIformatURI format/h2div class=code panel 
pdl style=border-width: 1px;div class=codeContent panelContent pdl
 script class=theme: Default; brush: java; gutter: false 
type=syntaxhighlighter![CDATA[mongodb:connectionBean?database=databaseNameamp;collection=collectionNameamp;operation=operationName[amp;moreOptions...]
 ]]/script
-/div/divh2 id=MongoDB-EndpointoptionsEndpoint options/h2pMongoDB 
endpoints support the following options, depending on whether they are acting 
like a Producer or as a Consumer (options vary based on the consumer type 
too)./pdiv class=confluenceTableSmall#160;/divdiv 
class=table-wraptable class=confluenceTabletbodytrth colspan=1 
rowspan=1 class=confluenceThpName/p/thth colspan=1 rowspan=1 
class=confluenceThpDefault Value/p/thth colspan=1 rowspan=1 
class=confluenceThpDescription/p/thth colspan=1 rowspan=1 
class=confluenceThpProducer/p/thth colspan=1 rowspan=1 
class=confluenceThpTailable Cursor Consumer/p/th/trtrtd 
colspan=1 rowspan=1 
class=confluenceTdpcodedatabase/code/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpnone/p/tdtd colspan=1 rowspan=1 
class=confluenceTdpstrongRequired./strong The name of the database to 
which this endpoint
  will be bound. All operations will be executed against this database unless 
dynamicity is enabled and the#160;codeCamelMongoDbDatabase/code header is 
set./p/tdtd colspan=1 rowspan=1 class=confluenceTdpimg 
class=emoticon emoticon-tick 
src=https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png;
 data-emoticon-name=tick alt=(tick)/p/tdtd colspan=1 rowspan=1 
class=confluenceTdpimg class=emoticon emoticon-tick 
src=https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png;
 data-emoticon-name=tick alt=(tick)/p/td/trtrtd colspan=1 
rowspan=1 class=confluenceTdpcodecollection/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpnone/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpstrongRequired (Except for 
spangetDbStats and command 
 operations)/span./strong The name of the collection (within the specified 
database) to which this endpoint will be bound.#160;All operations will be 
executed against this database unless dynamicity is enabled and 
the#160;codeCamelMongoDbDatabase/code header is set./p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpimg class=emoticon 
emoticon-tick 
src=https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png;
 data-emoticon-name=tick alt=(tick)/p/tdtd colspan=1 rowspan=1 
class=confluenceTdpimg class=emoticon emoticon-tick 
src=https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png;
 data-emoticon-name=tick alt=(tick)/p/td/trtrtd colspan=1 
rowspan=1 class=confluenceTdpcodecollectionIndex/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpnon
 e/p/tdtd colspan=1 rowspan=1 class=confluenceTdpstrongCamel 
2.12:/strong An optional a shape=rect class=external-link 
href=http://docs.mongodb.org/manual/core/index-single/; rel=nofollowsingle 
field index/a or a shape=rect class=external-link 
href=http://docs.mongodb.org/manual/core/index-compound/; 
rel=nofollowcompound index/a to create when inserting new 
collections./p/tdtd colspan=1 rowspan=1 class=confluenceTdpimg 
class=emoticon emoticon-tick 
src=https://cwiki.apache.org/confluence/s/en_GB-1988229788/4109/76e0dbb30bc8580e459c201f3535d84f9283a9ac.1/_/images/icons/emoticons/check.png;
 data-emoticon-name=tick alt=(tick)/p/tdtd colspan=1 rowspan=1 
class=confluenceTdp#160;/p/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdpcodeoperation/code/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpnone/p/tdtd colspan=1 rowspan=1 
class=confluenceTdpstrongRequired for 
 producers./strong The id of the operation this endpoint will execute. Pick 
from the following:/pulliQuery operations: codefindById/code, 
codefindOneByQuery/code, codefindAll/code, 
codecount/code/liliWrite operations: codeinsert/code, 
codesave/code, codeupdate/code/liliDelete operations: 
coderemove/code/liliOther operations: codegetDbStats/code, 

[1/2] camel git commit: fixed CS error

2015-04-23 Thread cmueller
Repository: camel
Updated Branches:
  refs/heads/master ae7b52acb - 6c2467222


fixed CS error


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8bcd609b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8bcd609b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8bcd609b

Branch: refs/heads/master
Commit: 8bcd609b58c2f64764b3d77319ee5ebc7adb9068
Parents: ae7b52a
Author: Christian Mueller cmuel...@apache.org
Authored: Thu Apr 23 21:39:22 2015 +0200
Committer: Christian Mueller cmuel...@apache.org
Committed: Thu Apr 23 21:39:22 2015 +0200

--
 camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/8bcd609b/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java 
b/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
index 4290a88..7367d1e 100644
--- a/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
@@ -1709,7 +1709,7 @@ public final class ObjectHelper {
 }
 
 //check the suppressed exception first
-for (Throwable throwable: exception.getSuppressed()) {
+for (Throwable throwable : exception.getSuppressed()) {
 if (type.isInstance(throwable)) {
 return type.cast(throwable);
 }



camel git commit: Options LoggingFilter and FollowRedirectFilter added to Camel-Docker base test

2015-04-23 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/master 6c2467222 - 8e25eef45


Options LoggingFilter and FollowRedirectFilter added to Camel-Docker base test


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8e25eef4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8e25eef4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8e25eef4

Branch: refs/heads/master
Commit: 8e25eef4557a75140acd20f69d697240e9ea36a6
Parents: 6c24672
Author: ancosen anco...@gmail.com
Authored: Thu Apr 23 23:01:50 2015 +0200
Committer: ancosen anco...@gmail.com
Committed: Thu Apr 23 23:01:50 2015 +0200

--
 .../camel/component/docker/headers/BaseDockerHeaderTest.java   | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/8e25eef4/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BaseDockerHeaderTest.java
--
diff --git 
a/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BaseDockerHeaderTest.java
 
b/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BaseDockerHeaderTest.java
index 56f0bd4..7074797 100644
--- 
a/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BaseDockerHeaderTest.java
+++ 
b/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BaseDockerHeaderTest.java
@@ -125,6 +125,8 @@ public abstract class BaseDockerHeaderTestT extends 
CamelTestSupport {
 clientProfile.setServerAddress(getServerAddress());
 clientProfile.setMaxPerRouteConnections(getMaxPerRouteConnections());
 clientProfile.setMaxTotalConnections(getMaxTotalConnections());
+clientProfile.setLoggingFilter(false);
+clientProfile.setFollowRedirectFilter(false);
 
 return clientProfile;
 



camel git commit: Fixed Camel-Docker Base Test related to options LoggingFilter and RedirectFollowFilter

2015-04-23 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/master 8e25eef45 - 411182eda


Fixed Camel-Docker Base Test related to options LoggingFilter and 
RedirectFollowFilter


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/411182ed
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/411182ed
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/411182ed

Branch: refs/heads/master
Commit: 411182edab557fec185516c08aa03ace5f1acc93
Parents: 8e25eef
Author: ancosen anco...@gmail.com
Authored: Thu Apr 23 23:29:17 2015 +0200
Committer: ancosen anco...@gmail.com
Committed: Thu Apr 23 23:29:17 2015 +0200

--
 .../component/docker/headers/BaseDockerHeaderTest.java| 10 ++
 1 file changed, 10 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/411182ed/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BaseDockerHeaderTest.java
--
diff --git 
a/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BaseDockerHeaderTest.java
 
b/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BaseDockerHeaderTest.java
index 7074797..3789ad8 100644
--- 
a/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BaseDockerHeaderTest.java
+++ 
b/components/camel-docker/src/test/java/org/apache/camel/component/docker/headers/BaseDockerHeaderTest.java
@@ -104,6 +104,14 @@ public abstract class BaseDockerHeaderTestT extends 
CamelTestSupport {
 public T getMockObject() {
 return mockObject;
 }
+
+public boolean getLoggingFilter() {
+return false;
+}
+
+public boolean getFollowRedirectFilter() {
+return false;
+}
 
 protected MapString, Object getDefaultParameters() {
 MapString, Object parameters = new HashMapString, Object();
@@ -113,6 +121,8 @@ public abstract class BaseDockerHeaderTestT extends 
CamelTestSupport {
 parameters.put(DockerConstants.DOCKER_SERVER_ADDRESS, 
getServerAddress());
 parameters.put(DockerConstants.DOCKER_MAX_PER_ROUTE_CONNECTIONS, 
getMaxPerRouteConnections());
 parameters.put(DockerConstants.DOCKER_MAX_TOTAL_CONNECTIONS, 
getMaxTotalConnections());
+parameters.put(DockerConstants.DOCKER_LOGGING_FILTER, 
getLoggingFilter());
+parameters.put(DockerConstants.DOCKER_FOLLOW_REDIRECT_FILTER, 
getFollowRedirectFilter());
 
 return parameters;
 }



svn commit: r948961 - in /websites/production/camel/content: 2015/04/23/ 2015/04/23/welcome-andrea-cosentino-as-the-newest-camel-rider.html cache/main.pageCache index.html news.html

2015-04-23 Thread buildbot
Author: buildbot
Date: Thu Apr 23 22:20:09 2015
New Revision: 948961

Log:
Production update by buildbot for camel

Added:
websites/production/camel/content/2015/04/23/

websites/production/camel/content/2015/04/23/welcome-andrea-cosentino-as-the-newest-camel-rider.html
Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/index.html
websites/production/camel/content/news.html

Added: 
websites/production/camel/content/2015/04/23/welcome-andrea-cosentino-as-the-newest-camel-rider.html
==
--- 
websites/production/camel/content/2015/04/23/welcome-andrea-cosentino-as-the-newest-camel-rider.html
 (added)
+++ 
websites/production/camel/content/2015/04/23/welcome-andrea-cosentino-as-the-newest-camel-rider.html
 Thu Apr 23 22:20:09 2015
@@ -0,0 +1,147 @@
+!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN 
http://www.w3.org/TR/html4/loose.dtd;
+!--
+
+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.
+--
+html
+head
+link href=//camel.apache.org/styles/site.css rel=stylesheet 
type=text/css
+link href=//camel.apache.org/styles/type-settings.css rel=stylesheet 
type=text/css
+script src=//camel.apache.org/styles/prototype.js 
type=text/javascript/script
+script src=//camel.apache.org/styles/rico.js 
type=text/javascript/script
+script src=//camel.apache.org/styles/site.js 
type=text/javascript/script
+
+meta http-equiv=Content-type content=text/html;charset=UTF-8
+
+style type=text/css
+  .maincontent { overflow:hidden; }
+/style
+!--[if IE]
+style type=text/css
+  .maincontent { width:100%; }
+/style
+![endif]--
+
+
+
+title
+Apache Camel: Welcome Andrea Cosentino as the newest Camel Rider
+/title
+/head
+body
+div class=white_box
+div class=header
+  div class=header_l
+div class=header_r
+/div
+  /div
+/div
+div class=content
+  div class=content_l
+div class=content_r
+  div
+  !-- Banner --
+div id=banner-contentdiv id=asf_logo
+   div id=activemq_logo style=height:108px; background:transparent 
url(banner.data/apache-camel-7.png) no-repeat scroll left top;
+a shape=rect style=float:left; 
width:310px;display:block;text-indent:-5000px;text-decoration:none;line-height:140px;
 margin-top:20px; margin-left:18px; href=http://camel.apache.org/;Camel/a
+a shape=rect style=float:right; 
width:180px;display:block;text-indent:-5000px;text-decoration:none;line-height:80px;
 margin-top:45px; margin-right:10px; href=http://www.apache.org;Apache/a
+   /div
+/div/div
+  !-- Banner --
+div class=top_red_bar
+  div id=site-breadcrumbs
+!-- Breadcrumbs --
+a href=../../../index.htmlApache 
Camel/anbsp;gt;nbsp;2015nbsp;gt;nbsp;04nbsp;gt;nbsp;23nbsp;gt;nbsp;a
 href=welcome-andrea-cosentino-as-the-newest-camel-rider.htmlWelcome Andrea 
Cosentino as the newest Camel Rider/a
+  /div
+  !-- Quicklinks --
+div id=site-quicklinkspa shape=rect href=download.htmlDownload/a 
| a shape=rect href=javadoc.htmlJavaDoc/a | a shape=rect 
href=source.htmlSource/a | a shape=rect 
href=discussion-forums.htmlForums/a | a shape=rect 
href=support.htmlSupport/a/p/div
+  !-- Quicklinks --
+/div
+
+   table border=0
+   tbody
+tr
+td valign=top width=100%
+div class=wiki-content maincontentpYesterday, the Camel PMC voted 
another one of the very active and talented contributors to become a 
committer./pp#160;/ppAndrea Cosentino is actively involved with Apache 
Camel since months contributing code and helping other users. Andrea 
contributed many patches / pull requests for helping to maintain the Camel 
components and ensure they are using newer releases of the dependency JARs. He 
is also taking on OSGi and help upgrade and maintain the karaf features as 
well. He is also working on a cassandra Camel component at GitHub, porting this 
good stuff back./pp#160;/ppOn behalf of the Camel PMC, welcome 
aboard#160;Andrea and keep up the great work!/ppChristian/p/div
+/td
+td valign=top
+  div class=navigation
+   

svn commit: r948983 - in /websites/production/camel/content: cache/main.pageCache netty4.html

2015-04-23 Thread buildbot
Author: buildbot
Date: Fri Apr 24 04:20:51 2015
New Revision: 948983

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/netty4.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/netty4.html
==
--- websites/production/camel/content/netty4.html (original)
+++ websites/production/camel/content/netty4.html Fri Apr 24 04:20:51 2015
@@ -97,7 +97,7 @@
 script class=theme: Default; brush: java; gutter: false 
type=syntaxhighlighter![CDATA[netty4:tcp://localhost:9[?options]
 netty4:udp://remotehost:9/[?options]
 ]]/script
-/div/divpThis component supports producer and consumer endpoints for 
both TCP and UDP./ppYou can append query options to the URI in the 
following format, code?option=valueamp;option=valueamp;.../code/ph3 
id=Netty4-OptionsOptions/h3div class=confluenceTableSmalldiv 
class=table-wraptable class=confluenceTabletbodytrth colspan=1 
rowspan=1 class=confluenceThpName/p/thth colspan=1 rowspan=1 
class=confluenceThpDefault Value/p/thth colspan=1 rowspan=1 
class=confluenceThpDescription/p/th/trtrtd colspan=1 
rowspan=1 class=confluenceTdpcodekeepAlive/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpcodetrue/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpSetting to ensure socket is not 
closed due to inactivity/p/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdpcodetcpNoDelay/code/p/tdtd colspan=1 
rowspan=1 class=confluenceTdp
 codetrue/code/p/tdtd colspan=1 rowspan=1 
 class=confluenceTdpSetting to improve TCP protocol 
 performance/p/td/trtrtd colspan=1 rowspan=1 
 class=confluenceTdpcodebacklog/code/p/tdtd colspan=1 
 rowspan=1 class=confluenceTdp#160;/p/tdtd colspan=1 
 rowspan=1 class=confluenceTdpAllows to configure a backlog for netty 
 consumer (server). Note the backlog is just a best effort depending on the 
 OS. Setting this option to a value such as code200/code, code500/code 
 or code1000/code, tells the TCP stack how long the accept queue can be. 
 If this option is not configured, then the backlog depends on OS 
 setting./p/td/trtrtd colspan=1 rowspan=1 
 class=confluenceTdpcodebroadcast/code/p/tdtd colspan=1 
 rowspan=1 class=confluenceTdpcodefalse/code/p/tdtd 
 colspan=1 rowspan=1 class=confluenceTdpSetting to choose Multicast 
 over UDP/p/td/trtrtd colspan=1 rowspan=1
  class=confluenceTdpcodeconnectTimeout/code/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpcode1/code/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpTime to wait for a socket connection to be 
available. Value is in millis./p/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdpcodereuseAddress/code/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpcodetrue/code/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpSetting to facilitate socket 
multiplexing/p/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdpcodesync/code/p/tdtd colspan=1 rowspan=1 
class=confluenceTdpcodetrue/code/p/tdtd colspan=1 rowspan=1 
class=confluenceTdpSetting to set endpoint as one-way or 
request-response/p/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdpcodesynchronous/code/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpcodefalse/code/p
 /tdtd colspan=1 rowspan=1 class=confluenceTdpWhether a 
shape=rect href=asynchronous-routing-engine.htmlAsynchronous Routing 
Engine/a is not in use. codefalse/code then the a shape=rect 
href=asynchronous-routing-engine.htmlAsynchronous Routing Engine/a is 
used, codetrue/code to force processing synchronous./p/td/trtrtd 
colspan=1 rowspan=1 class=confluenceTdpcodessl/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpcodefalse/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpSetting to specify whether SSL 
encryption is applied to this endpoint/p/td/trtrtd colspan=1 
rowspan=1 
class=confluenceTdpcodesslClientCertHeaders/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpcodefalse/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpWhen enabled and in SSL mode, 
then the Netty consumer will enrich the Camel a shape=rect 
href=message.htmlMess
 age/a with headers having information about the client certificate such as 
subject name, issuer name, serial number, and the valid date 
range./p/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdpcodesendBufferSize/code/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpcode65536 bytes/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpThe TCP/UDP buffer sizes to be 
used during outbound communication. Size is bytes./p/td/trtrtd 
colspan=1 rowspan=1 
class=confluenceTdpcodereceiveBufferSize/code/p/tdtd colspan=1 
rowspan=1 class=confluenceTdpcode65536 bytes/code/p/tdtd 
colspan=1 rowspan=1 class=confluenceTdpThe TCP/UDP buffer sizes to be 
used during inbound communication. Size is bytes./p/td/trtrtd 

[1/2] camel git commit: CAMEL-8687 Fixed the build error

2015-04-23 Thread ningjiang
Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x 3e041ab5c - 6a1bfc63c
  refs/heads/camel-2.15.x 018244675 - 29f7fade8


CAMEL-8687 Fixed the build error


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/29f7fade
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/29f7fade
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/29f7fade

Branch: refs/heads/camel-2.15.x
Commit: 29f7fade8298a261e3059921e80e42f6c55aef9c
Parents: 0182446
Author: Willem Jiang willem.ji...@gmail.com
Authored: Fri Apr 24 12:19:22 2015 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Fri Apr 24 12:19:22 2015 +0800

--
 .../org/apache/camel/component/syslog/NettyRfc5425Test.java | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/29f7fade/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
--
diff --git 
a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
 
b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
index 890842f..a795177 100644
--- 
a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
+++ 
b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
@@ -26,6 +26,7 @@ import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.camel.test.junit4.CamelTestSupport;
+import org.jboss.netty.buffer.BigEndianHeapChannelBuffer;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -67,12 +68,12 @@ public class NettyRfc5425Test extends CamelTestSupport {
 
 assertMockEndpointsSatisfied();
 }
-
+
 @Test
 public void testStructuredData() throws Exception {
 MockEndpoint mock = getMockEndpoint(mock:syslogReceiver);
 mock.expectedMessageCount(1);
-
+
 template.sendBody(direct:checkStructuredData, 
rfc5424WithStructuredData);
 }
 
@@ -93,8 +94,8 @@ public class NettyRfc5425Test extends CamelTestSupport {
 assertTrue(ex.getIn().getBody() instanceof 
SyslogMessage);
 }
 
}).to(mock:syslogReceiver).marshal(syslogDataFormat).to(mock:syslogReceiver2);
-
-
+
+
 
from(direct:checkStructuredData).unmarshal(syslogDataFormat).process(new 
Processor() {
 @Override
 public void process(Exchange ex) {



Git Push Summary

2015-04-23 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/test_acosentino [created] 6c2467222


[4/4] camel git commit: CAMEL-8687 Fixed the rfc5424 structured data issue in camel-syslog

2015-04-23 Thread ningjiang
CAMEL-8687 Fixed the rfc5424 structured data issue in camel-syslog


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/02b0fbd4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/02b0fbd4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/02b0fbd4

Branch: refs/heads/camel-2.14.x
Commit: 02b0fbd40ed0852a9093e9bbe9c8b258323d10fb
Parents: 9054cee
Author: Willem Jiang willem.ji...@gmail.com
Authored: Thu Apr 23 14:29:15 2015 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Apr 23 14:30:54 2015 +0800

--
 .../camel/component/syslog/SyslogConverter.java |  9 -
 .../component/syslog/NettyRfc5425Test.java  | 21 +++-
 2 files changed, 28 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/02b0fbd4/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
--
diff --git 
a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
 
b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
index ea91800..e872498 100644
--- 
a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
+++ 
b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
@@ -228,7 +228,14 @@ public final class SyslogConverter {
 rfc5424SyslogMessage.setMsgId(msgId.toString());
 
 StringBuilder structuredData = new StringBuilder();
-while ((charFound = (char) (byteBuffer.get()  0xff)) != ' ') {
+boolean inblock = false;
+while (((charFound = (char) (byteBuffer.get()  0xff)) != ' ') || 
inblock) {
+if (charFound == '[') {
+inblock = true;
+} 
+if (charFound == ']') {
+inblock = false;
+}
 structuredData.append(charFound);
 }
 rfc5424SyslogMessage.setStructuredData(structuredData.toString());

http://git-wip-us.apache.org/repos/asf/camel/blob/02b0fbd4/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
--
diff --git 
a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
 
b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
index 81134b8..890842f 100644
--- 
a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
+++ 
b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
@@ -26,7 +26,6 @@ import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.jboss.netty.buffer.BigEndianHeapChannelBuffer;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -37,6 +36,8 @@ public class NettyRfc5425Test extends CamelTestSupport {
 private final String rfc3164Message = 165Aug  4 05:34:00 mymachine 
myproc[10]: %% It's\n time to make the do-nuts.  %%  Ingredients: 
Mix=OK, Jelly=OK #\n
   +  Devices: Mixer=OK, 
Jelly_Injector=OK, Frier=OK # Transport:\n +  Conveyer1=OK, 
Conveyer2=OK # %%;
 private final String rfc5424Message = 341 2003-10-11T22:14:15.003Z 
mymachine.example.com su - ID47 - BOM'su root' failed for lonvick on 
/dev/pts/8;
+private final String rfc5424WithStructuredData = 341 
2003-10-11T22:14:15.003Z mymachine.example.com su - ID47 
++ [exampleSDID@32473 iut=\3\ eventSource=\Application\ 
eventID=\1011\] BOM'su root' failed for lonvick on /dev/pts/8;
 
 @BeforeClass
 public static void initPort() {
@@ -66,6 +67,14 @@ public class NettyRfc5425Test extends CamelTestSupport {
 
 assertMockEndpointsSatisfied();
 }
+
+@Test
+public void testStructuredData() throws Exception {
+MockEndpoint mock = getMockEndpoint(mock:syslogReceiver);
+mock.expectedMessageCount(1);
+
+template.sendBody(direct:checkStructuredData, 
rfc5424WithStructuredData);
+}
 
 @Override
 protected RouteBuilder createRouteBuilder() throws Exception {
@@ -84,6 +93,16 @@ public class NettyRfc5425Test extends CamelTestSupport {
 assertTrue(ex.getIn().getBody() instanceof 
SyslogMessage);
 }
 
}).to(mock:syslogReceiver).marshal(syslogDataFormat).to(mock:syslogReceiver2);
+
+
+  

[1/4] camel git commit: CAMEL-8075 Camel ftp should send a command to check if the connection is broken before pulling the files

2015-04-23 Thread ningjiang
Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x e53e97de0 - 02b0fbd40
  refs/heads/camel-2.15.x 5a73ecf3b - 24fc1a67b


CAMEL-8075 Camel ftp should send a command to check if the connection is broken 
before pulling the files


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5a03b104
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5a03b104
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5a03b104

Branch: refs/heads/camel-2.15.x
Commit: 5a03b1040a62c8d7cd33ef4f8210cb5d0c9723ee
Parents: 5a73ecf
Author: Willem Jiang willem.ji...@gmail.com
Authored: Thu Apr 23 11:15:04 2015 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Apr 23 14:30:30 2015 +0800

--
 .../camel/component/file/remote/RemoteFileConsumer.java   | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/5a03b104/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java
--
diff --git 
a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java
 
b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java
index 1bf501d..80576bf 100644
--- 
a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java
+++ 
b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java
@@ -185,7 +185,15 @@ public abstract class RemoteFileConsumerT extends 
GenericFileConsumerT {
 }
 
 protected void connectIfNecessary() throws IOException {
-if (!loggedIn) {
+// We need to send a noop first to check if the connection is still 
open 
+boolean isConnected = false;
+try {
+isConnected = getOperations().sendNoop();
+} catch (Exception ex) {
+// here we just ignore the exception and try to reconnect 
+}
+
+if (!loggedIn || !isConnected) {
 if (log.isDebugEnabled()) {
 log.debug(Not connected/logged in, connecting to: {}, 
remoteServer());
 }



[2/4] camel git commit: CAMEL-8687 Fixed the rfc5424 structured data issue in camel-syslog

2015-04-23 Thread ningjiang
CAMEL-8687 Fixed the rfc5424 structured data issue in camel-syslog


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/24fc1a67
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/24fc1a67
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/24fc1a67

Branch: refs/heads/camel-2.15.x
Commit: 24fc1a67b39c79604cc5cb5bf9e2701a692af129
Parents: 5a03b10
Author: Willem Jiang willem.ji...@gmail.com
Authored: Thu Apr 23 14:29:15 2015 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Apr 23 14:30:38 2015 +0800

--
 .../camel/component/syslog/SyslogConverter.java |  9 -
 .../component/syslog/NettyRfc5425Test.java  | 21 +++-
 2 files changed, 28 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/24fc1a67/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
--
diff --git 
a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
 
b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
index ea91800..e872498 100644
--- 
a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
+++ 
b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
@@ -228,7 +228,14 @@ public final class SyslogConverter {
 rfc5424SyslogMessage.setMsgId(msgId.toString());
 
 StringBuilder structuredData = new StringBuilder();
-while ((charFound = (char) (byteBuffer.get()  0xff)) != ' ') {
+boolean inblock = false;
+while (((charFound = (char) (byteBuffer.get()  0xff)) != ' ') || 
inblock) {
+if (charFound == '[') {
+inblock = true;
+} 
+if (charFound == ']') {
+inblock = false;
+}
 structuredData.append(charFound);
 }
 rfc5424SyslogMessage.setStructuredData(structuredData.toString());

http://git-wip-us.apache.org/repos/asf/camel/blob/24fc1a67/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
--
diff --git 
a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
 
b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
index 81134b8..890842f 100644
--- 
a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
+++ 
b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
@@ -26,7 +26,6 @@ import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.jboss.netty.buffer.BigEndianHeapChannelBuffer;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -37,6 +36,8 @@ public class NettyRfc5425Test extends CamelTestSupport {
 private final String rfc3164Message = 165Aug  4 05:34:00 mymachine 
myproc[10]: %% It's\n time to make the do-nuts.  %%  Ingredients: 
Mix=OK, Jelly=OK #\n
   +  Devices: Mixer=OK, 
Jelly_Injector=OK, Frier=OK # Transport:\n +  Conveyer1=OK, 
Conveyer2=OK # %%;
 private final String rfc5424Message = 341 2003-10-11T22:14:15.003Z 
mymachine.example.com su - ID47 - BOM'su root' failed for lonvick on 
/dev/pts/8;
+private final String rfc5424WithStructuredData = 341 
2003-10-11T22:14:15.003Z mymachine.example.com su - ID47 
++ [exampleSDID@32473 iut=\3\ eventSource=\Application\ 
eventID=\1011\] BOM'su root' failed for lonvick on /dev/pts/8;
 
 @BeforeClass
 public static void initPort() {
@@ -66,6 +67,14 @@ public class NettyRfc5425Test extends CamelTestSupport {
 
 assertMockEndpointsSatisfied();
 }
+
+@Test
+public void testStructuredData() throws Exception {
+MockEndpoint mock = getMockEndpoint(mock:syslogReceiver);
+mock.expectedMessageCount(1);
+
+template.sendBody(direct:checkStructuredData, 
rfc5424WithStructuredData);
+}
 
 @Override
 protected RouteBuilder createRouteBuilder() throws Exception {
@@ -84,6 +93,16 @@ public class NettyRfc5425Test extends CamelTestSupport {
 assertTrue(ex.getIn().getBody() instanceof 
SyslogMessage);
 }
 
}).to(mock:syslogReceiver).marshal(syslogDataFormat).to(mock:syslogReceiver2);
+
+
+  

camel git commit: CAMEL-8687 Fixed the rfc5424 structured data issue in camel-syslog

2015-04-23 Thread ningjiang
Repository: camel
Updated Branches:
  refs/heads/master 559bdb126 - c68c78215


CAMEL-8687 Fixed the rfc5424 structured data issue in camel-syslog


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c68c7821
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c68c7821
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c68c7821

Branch: refs/heads/master
Commit: c68c7821566f6298810eec2a2b87e1385f415587
Parents: 559bdb1
Author: Willem Jiang willem.ji...@gmail.com
Authored: Thu Apr 23 14:29:15 2015 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Apr 23 14:29:15 2015 +0800

--
 .../camel/component/syslog/SyslogConverter.java |  9 -
 .../component/syslog/NettyRfc5425Test.java  | 21 +++-
 2 files changed, 28 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c68c7821/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
--
diff --git 
a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
 
b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
index ea91800..e872498 100644
--- 
a/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
+++ 
b/components/camel-syslog/src/main/java/org/apache/camel/component/syslog/SyslogConverter.java
@@ -228,7 +228,14 @@ public final class SyslogConverter {
 rfc5424SyslogMessage.setMsgId(msgId.toString());
 
 StringBuilder structuredData = new StringBuilder();
-while ((charFound = (char) (byteBuffer.get()  0xff)) != ' ') {
+boolean inblock = false;
+while (((charFound = (char) (byteBuffer.get()  0xff)) != ' ') || 
inblock) {
+if (charFound == '[') {
+inblock = true;
+} 
+if (charFound == ']') {
+inblock = false;
+}
 structuredData.append(charFound);
 }
 rfc5424SyslogMessage.setStructuredData(structuredData.toString());

http://git-wip-us.apache.org/repos/asf/camel/blob/c68c7821/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
--
diff --git 
a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
 
b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
index 05eca0f..595fe28 100644
--- 
a/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
+++ 
b/components/camel-syslog/src/test/java/org/apache/camel/component/syslog/NettyRfc5425Test.java
@@ -26,7 +26,6 @@ import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.jboss.netty.buffer.BigEndianHeapChannelBuffer;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -38,6 +37,8 @@ public class NettyRfc5425Test extends CamelTestSupport {
 private final String rfc3164Message = 165Aug  4 05:34:00 mymachine 
myproc[10]: %% It's\n time to make the do-nuts.  %%  Ingredients: 
Mix=OK, Jelly=OK #\n
   +  Devices: Mixer=OK, 
Jelly_Injector=OK, Frier=OK # Transport:\n +  Conveyer1=OK, 
Conveyer2=OK # %%;
 private final String rfc5424Message = 341 2003-10-11T22:14:15.003Z 
mymachine.example.com su - ID47 - BOM'su root' failed for lonvick on 
/dev/pts/8;
+private final String rfc5424WithStructuredData = 341 
2003-10-11T22:14:15.003Z mymachine.example.com su - ID47 
++ [exampleSDID@32473 iut=\3\ eventSource=\Application\ 
eventID=\1011\] BOM'su root' failed for lonvick on /dev/pts/8;
 
 @BeforeClass
 public static void initPort() {
@@ -68,6 +69,14 @@ public class NettyRfc5425Test extends CamelTestSupport {
 
 assertMockEndpointsSatisfied();
 }
+
+@Test
+public void testStructuredData() throws Exception {
+MockEndpoint mock = getMockEndpoint(mock:syslogReceiver);
+mock.expectedMessageCount(1);
+
+template.sendBody(direct:checkStructuredData, 
rfc5424WithStructuredData);
+}
 
 @Override
 protected RouteBuilder createRouteBuilder() throws Exception {
@@ -86,6 +95,16 @@ public class NettyRfc5425Test extends CamelTestSupport {
 assertTrue(ex.getIn().getBody() instanceof 
SyslogMessage);
 }
 

[3/4] camel git commit: CAMEL-8075 Camel ftp should send a command to check if the connection is broken before pulling the files

2015-04-23 Thread ningjiang
CAMEL-8075 Camel ftp should send a command to check if the connection is broken 
before pulling the files


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9054cee5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9054cee5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9054cee5

Branch: refs/heads/camel-2.14.x
Commit: 9054cee5bb89fefa2b17891aed70198244e3aae7
Parents: e53e97d
Author: Willem Jiang willem.ji...@gmail.com
Authored: Thu Apr 23 11:15:04 2015 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Apr 23 14:30:51 2015 +0800

--
 .../camel/component/file/remote/RemoteFileConsumer.java   | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/9054cee5/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java
--
diff --git 
a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java
 
b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java
index fb32885..5b4b12c 100644
--- 
a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java
+++ 
b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConsumer.java
@@ -149,7 +149,15 @@ public abstract class RemoteFileConsumerT extends 
GenericFileConsumerT {
 }
 
 protected void connectIfNecessary() throws IOException {
-if (!loggedIn) {
+// We need to send a noop first to check if the connection is still 
open 
+boolean isConnected = false;
+try {
+isConnected = getOperations().sendNoop();
+} catch (Exception ex) {
+// here we just ignore the exception and try to reconnect 
+}
+
+if (!loggedIn || !isConnected) {
 if (log.isDebugEnabled()) {
 log.debug(Not connected/logged in, connecting to: {}, 
remoteServer());
 }



camel git commit: CAMEL-8665: Throttler EIP - Using method call for message per sec exp fails in spring

2015-04-23 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x 02b0fbd40 - 46c52d24f


CAMEL-8665: Throttler EIP - Using method call for message per sec exp fails in 
spring


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/46c52d24
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/46c52d24
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/46c52d24

Branch: refs/heads/camel-2.14.x
Commit: 46c52d24f4f96c42eb5e66b51d00e280ebeeffcc
Parents: 02b0fbd
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Apr 23 08:58:06 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Apr 23 08:58:14 2015 +0200

--
 .../src/main/java/org/apache/camel/model/ThrottleDefinition.java| 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/46c52d24/camel-core/src/main/java/org/apache/camel/model/ThrottleDefinition.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/ThrottleDefinition.java 
b/camel-core/src/main/java/org/apache/camel/model/ThrottleDefinition.java
index aeb395c..eb08e06 100644
--- a/camel-core/src/main/java/org/apache/camel/model/ThrottleDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/ThrottleDefinition.java
@@ -27,6 +27,7 @@ import javax.xml.bind.annotation.XmlTransient;
 import org.apache.camel.Expression;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.ExpressionBuilder;
+import org.apache.camel.model.language.ExpressionDefinition;
 import org.apache.camel.processor.Throttler;
 import org.apache.camel.spi.RouteContext;
 



svn commit: r948855 - in /websites/production/camel/content: cache/main.pageCache irc-room.html

2015-04-23 Thread buildbot
Author: buildbot
Date: Thu Apr 23 07:20:10 2015
New Revision: 948855

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/irc-room.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/irc-room.html
==
--- websites/production/camel/content/irc-room.html (original)
+++ websites/production/camel/content/irc-room.html Thu Apr 23 07:20:10 2015
@@ -75,29 +75,7 @@
tbody
 tr
 td valign=top width=100%
-div class=wiki-content maincontenth2 id=IRCRoom-IRCIRC/h2
-
-pYou can hang out on IRC with other Camel developers and users./p
-
-pIf you are using Mozilla you can just click on the IRC link or read the 
log/p
-
-ullia shape=rect class=external-link 
href=irc://irc.codehaus.org/camel rel=nofollow#camel at 
irc.codehaus.org/a/lilia shape=rect class=external-link 
href=http://irclogs.dankulp.com/logs/irclogger_logs/camel; rel=nofollowIRC 
Log/a/li/ul
-
-
-
-h3 id=IRCRoom-UsinganIRCclientUsing an IRC client/h3
-
-pHere are the connection details. For an IRC client we recommend a 
shape=rect class=external-link href=http://www.xchat.org/; 
rel=nofollowXChat/a or a shape=rect class=external-link 
href=http://xchataqua.sourceforge.net/; rel=nofollowXChatAqua/a on OS 
X/p
-
-div class=table-wraptable class=confluenceTabletbodytrtd 
colspan=1 rowspan=1 class=confluenceTdp server /p/tdtd 
colspan=1 rowspan=1 class=confluenceTdp irc.codehaus.org 
/p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp port 
/p/tdtd colspan=1 rowspan=1 class=confluenceTdp 6667 
/p/td/trtrtd colspan=1 rowspan=1 class=confluenceTdp room 
/p/tdtd colspan=1 rowspan=1 class=confluenceTdp #camel 
/p/td/tr/tbody/table/div
-
-
-h3 id=IRCRoom-WebclientsWeb clients/h3
-
-pTry one of these/p
-
-ullia shape=rect class=external-link href=http://irc.codehaus.org; 
rel=nofollowirc.codehaus.org/a/lilia shape=rect 
class=external-link href=http://www.mibbit.com/; 
rel=nofollowmibbit.com/a/li/ul
-/div
+div class=wiki-content maincontenth2 id=IRCRoom-IRCIRC/h2pYou can 
hang out on IRC in the #apache-camel room at freenode with other Apache Camel 
developers and users./ph3 id=IRCRoom-UsinganIRCclientUsing an IRC 
client/h3pHere are the connection details.#160;/pdiv 
class=table-wraptable class=confluenceTabletbodytrtd colspan=1 
rowspan=1 class=confluenceTdpserver/p/tdtd colspan=1 rowspan=1 
class=confluenceTdpirc.freenode.net/p/td/trtrtd colspan=1 
rowspan=1 class=confluenceTdpport/p/tdtd colspan=1 rowspan=1 
class=confluenceTdp6667/p/td/trtrtd colspan=1 rowspan=1 
class=confluenceTdproom/p/tdtd colspan=1 rowspan=1 
class=confluenceTdp#apache-camel/p/td/tr/tbody/table/div/div
 /td
 td valign=top
   div class=navigation




camel git commit: CAMEL-8689 Fix Camel Dozer class loading issue when using multiple contexts with different classloaders.

2015-04-23 Thread raulk
Repository: camel
Updated Branches:
  refs/heads/fix/CAMEL-8689-camel-dozer-classloading-issue [created] 87eebc6c0


CAMEL-8689 Fix Camel Dozer class loading issue when using multiple contexts 
with different classloaders.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/87eebc6c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/87eebc6c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/87eebc6c

Branch: refs/heads/fix/CAMEL-8689-camel-dozer-classloading-issue
Commit: 87eebc6c04f5364c6ebdab15e9c69efa40e5c5cd
Parents: 42de535
Author: Raul Kripalani ra...@apache.org
Authored: Thu Apr 23 13:46:35 2015 +0100
Committer: Raul Kripalani ra...@apache.org
Committed: Thu Apr 23 13:46:35 2015 +0100

--
 .../dozer/CamelToDozerClassResolverAdapter.java | 46 ---
 .../converter/dozer/DozerTypeConverter.java | 23 +-
 .../dozer/DozerTypeConverterLoader.java | 28 +--
 .../dozer/ThreadContextClassLoader.java | 83 
 4 files changed, 126 insertions(+), 54 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/87eebc6c/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/CamelToDozerClassResolverAdapter.java
--
diff --git 
a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/CamelToDozerClassResolverAdapter.java
 
b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/CamelToDozerClassResolverAdapter.java
deleted file mode 100644
index ad913d1..000
--- 
a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/CamelToDozerClassResolverAdapter.java
+++ /dev/null
@@ -1,46 +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.converter.dozer;
-
-import java.net.URL;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.impl.DefaultClassResolver;
-import org.apache.camel.spi.ClassResolver;
-import org.dozer.util.DozerClassLoader;
-
-public final class CamelToDozerClassResolverAdapter implements 
DozerClassLoader {
-
-private final ClassResolver classResolver;
-
-public CamelToDozerClassResolverAdapter() {
-// must have a default nor-arg constructor to allow Dozer to work with 
OSGi
-classResolver = new DefaultClassResolver();
-}
-
-public CamelToDozerClassResolverAdapter(CamelContext camelContext) {
-classResolver = camelContext.getClassResolver();
-}
-
-public Class? loadClass(String name) {
-return classResolver.resolveClass(name);
-}
-
-public URL loadResource(String name) {
-return DozerTypeConverterLoader.loadMappingFile(classResolver, name);
-}
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/87eebc6c/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java
--
diff --git 
a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java
 
b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java
index f1ab849..3bc6135 100644
--- 
a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java
+++ 
b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverter.java
@@ -23,6 +23,8 @@ import org.apache.camel.TypeConverter;
 import org.apache.camel.support.TypeConverterSupport;
 import org.dozer.DozerBeanMapper;
 import org.dozer.Mapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * codeDozerTypeConverter/code is a standard {@link TypeConverter} that
@@ -36,6 +38,8 @@ import org.dozer.Mapper;
  */
 public class DozerTypeConverter extends TypeConverterSupport {
 
+private static final Logger LOG = 
LoggerFactory.getLogger(DozerTypeConverter.class);
+
 private final DozerBeanMapper mapper;
 
 public DozerTypeConverter(DozerBeanMapper mapper) {
@@ -48,6 +52,23 @@ public 

camel git commit: CAMEL-8607 Fixed the issue of Camel endpoint RAW password unsafe characters

2015-04-23 Thread ningjiang
Repository: camel
Updated Branches:
  refs/heads/master c68c78215 - f5098d138


CAMEL-8607 Fixed the issue of Camel endpoint RAW password unsafe characters


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f5098d13
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f5098d13
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f5098d13

Branch: refs/heads/master
Commit: f5098d13847933d8e2fc185bdad1e67366840bfb
Parents: c68c782
Author: Willem Jiang willem.ji...@gmail.com
Authored: Thu Apr 23 16:22:27 2015 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Apr 23 16:22:27 2015 +0800

--
 .../main/java/org/apache/camel/impl/DefaultComponent.java| 3 ++-
 .../apache/camel/component/http4/HttpEndpointURLTest.java| 8 
 2 files changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f5098d13/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
index a832e4d..c7ab7ff 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
@@ -64,7 +64,8 @@ public abstract class DefaultComponent extends ServiceSupport 
implements Compone
 String encodedUri = UnsafeUriCharactersEncoder.encode(uri);
 if (!encodedUri.equals(uri)) {
 // uri supplied is not really valid
-LOG.warn(Supplied URI '{}' contains unsafe characters, please 
check encoding, uri);
+// we just don't want to log the password setting here
+LOG.warn(Supplied URI '{}' contains unsafe characters, please 
check encoding, URISupport.sanitizeUri(uri));
 }
 return encodedUri;
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/f5098d13/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
--
diff --git 
a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
 
b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
index af09699..c86e5a6b 100644
--- 
a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
+++ 
b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.http4;
 
 import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.URISupport;
 import org.apache.http.conn.HttpClientConnectionManager;
 import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 import org.junit.Test;
@@ -61,5 +62,12 @@ public class HttpEndpointURLTest extends CamelTestSupport {
 assertEquals(Get a wrong setting of maxTotalConnections, 40, 
poolManager.getMaxTotal());
 assertEquals(Get a wrong setting of connectionsPerRoute, 5, 
poolManager.getDefaultMaxPerRoute());
 }
+
+@Test
+// Just for CAMEL-8607
+public void testRawWithUnsafeCharacters() throws Exception {
+HttpEndpoint http1 = 
context.getEndpoint(http4://www.google.com?authenticationPreemptive=trueauthPassword=RAW(foo%bar)authUsername=RAW(username),
 HttpEndpoint.class);
+assertTrue(The password is not loggged, 
URISupport.sanitizeUri(http1.getEndpointUri()).indexOf(authPassword=xx)  
0);
+}
 
 }



[2/2] camel git commit: CAMEL-8607 Fixed the issue of Camel endpoint RAW password unsafe characters

2015-04-23 Thread ningjiang
CAMEL-8607 Fixed the issue of Camel endpoint RAW password unsafe characters


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3e041ab5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3e041ab5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3e041ab5

Branch: refs/heads/camel-2.14.x
Commit: 3e041ab5c0ccf051ba019cfff347f91a38b04516
Parents: 46c52d2
Author: Willem Jiang willem.ji...@gmail.com
Authored: Thu Apr 23 16:22:27 2015 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Apr 23 16:23:15 2015 +0800

--
 .../main/java/org/apache/camel/impl/DefaultComponent.java| 3 ++-
 .../apache/camel/component/http4/HttpEndpointURLTest.java| 8 
 2 files changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3e041ab5/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
index bad9b0c..a3b19d0 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
@@ -64,7 +64,8 @@ public abstract class DefaultComponent extends ServiceSupport 
implements Compone
 String encodedUri = UnsafeUriCharactersEncoder.encode(uri);
 if (!encodedUri.equals(uri)) {
 // uri supplied is not really valid
-LOG.warn(Supplied URI '{}' contains unsafe characters, please 
check encoding, uri);
+// we just don't want to log the password setting here
+LOG.warn(Supplied URI '{}' contains unsafe characters, please 
check encoding, URISupport.sanitizeUri(uri));
 }
 return encodedUri;
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/3e041ab5/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
--
diff --git 
a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
 
b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
index af09699..c86e5a6b 100644
--- 
a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
+++ 
b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.http4;
 
 import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.URISupport;
 import org.apache.http.conn.HttpClientConnectionManager;
 import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 import org.junit.Test;
@@ -61,5 +62,12 @@ public class HttpEndpointURLTest extends CamelTestSupport {
 assertEquals(Get a wrong setting of maxTotalConnections, 40, 
poolManager.getMaxTotal());
 assertEquals(Get a wrong setting of connectionsPerRoute, 5, 
poolManager.getDefaultMaxPerRoute());
 }
+
+@Test
+// Just for CAMEL-8607
+public void testRawWithUnsafeCharacters() throws Exception {
+HttpEndpoint http1 = 
context.getEndpoint(http4://www.google.com?authenticationPreemptive=trueauthPassword=RAW(foo%bar)authUsername=RAW(username),
 HttpEndpoint.class);
+assertTrue(The password is not loggged, 
URISupport.sanitizeUri(http1.getEndpointUri()).indexOf(authPassword=xx)  
0);
+}
 
 }



[1/2] camel git commit: CAMEL-8607 Fixed the issue of Camel endpoint RAW password unsafe characters

2015-04-23 Thread ningjiang
Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x 46c52d24f - 3e041ab5c
  refs/heads/camel-2.15.x 24fc1a67b - d409c4874


CAMEL-8607 Fixed the issue of Camel endpoint RAW password unsafe characters


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d409c487
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d409c487
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d409c487

Branch: refs/heads/camel-2.15.x
Commit: d409c487416921117345a213a2c846eb36964033
Parents: 24fc1a6
Author: Willem Jiang willem.ji...@gmail.com
Authored: Thu Apr 23 16:22:27 2015 +0800
Committer: Willem Jiang willem.ji...@gmail.com
Committed: Thu Apr 23 16:23:03 2015 +0800

--
 .../main/java/org/apache/camel/impl/DefaultComponent.java| 3 ++-
 .../apache/camel/component/http4/HttpEndpointURLTest.java| 8 
 2 files changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d409c487/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
index a832e4d..c7ab7ff 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultComponent.java
@@ -64,7 +64,8 @@ public abstract class DefaultComponent extends ServiceSupport 
implements Compone
 String encodedUri = UnsafeUriCharactersEncoder.encode(uri);
 if (!encodedUri.equals(uri)) {
 // uri supplied is not really valid
-LOG.warn(Supplied URI '{}' contains unsafe characters, please 
check encoding, uri);
+// we just don't want to log the password setting here
+LOG.warn(Supplied URI '{}' contains unsafe characters, please 
check encoding, URISupport.sanitizeUri(uri));
 }
 return encodedUri;
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/d409c487/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
--
diff --git 
a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
 
b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
index af09699..c86e5a6b 100644
--- 
a/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
+++ 
b/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointURLTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.http4;
 
 import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.URISupport;
 import org.apache.http.conn.HttpClientConnectionManager;
 import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
 import org.junit.Test;
@@ -61,5 +62,12 @@ public class HttpEndpointURLTest extends CamelTestSupport {
 assertEquals(Get a wrong setting of maxTotalConnections, 40, 
poolManager.getMaxTotal());
 assertEquals(Get a wrong setting of connectionsPerRoute, 5, 
poolManager.getDefaultMaxPerRoute());
 }
+
+@Test
+// Just for CAMEL-8607
+public void testRawWithUnsafeCharacters() throws Exception {
+HttpEndpoint http1 = 
context.getEndpoint(http4://www.google.com?authenticationPreemptive=trueauthPassword=RAW(foo%bar)authUsername=RAW(username),
 HttpEndpoint.class);
+assertTrue(The password is not loggged, 
URISupport.sanitizeUri(http1.getEndpointUri()).indexOf(authPassword=xx)  
0);
+}
 
 }



[1/2] camel git commit: CAMEL-8684: Fixed load balancer model to not implement LoadBalancer/Processor as that is runtime. Also ensure Java DSL build the routes using the model classes instead of cheat

2015-04-23 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x d409c4874 - 31fac1262


CAMEL-8684: Fixed load balancer model to not implement LoadBalancer/Processor 
as that is runtime. Also ensure Java DSL build the routes using the model 
classes instead of cheating.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7f13dcf4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7f13dcf4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7f13dcf4

Branch: refs/heads/camel-2.15.x
Commit: 7f13dcf4494bd0eda8d4f3af52b365c234a4832c
Parents: d409c48
Author: Claus Ibsen davscl...@apache.org
Authored: Wed Apr 22 14:29:31 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Apr 23 15:55:05 2015 +0200

--
 .../camel/model/LoadBalanceDefinition.java  | 57 
 .../camel/model/LoadBalancerDefinition.java | 41 +-
 .../CircuitBreakerLoadBalancerDefinition.java   | 27 --
 .../FailoverLoadBalancerDefinition.java | 31 +--
 .../DoubleLoadBalancerMisconfigurationTest.java |  6 +--
 5 files changed, 75 insertions(+), 87 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/7f13dcf4/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java 
b/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
index 05fc76b..c2d8291 100644
--- a/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
@@ -38,16 +38,7 @@ import 
org.apache.camel.model.loadbalancer.RoundRobinLoadBalancerDefinition;
 import org.apache.camel.model.loadbalancer.StickyLoadBalancerDefinition;
 import org.apache.camel.model.loadbalancer.TopicLoadBalancerDefinition;
 import org.apache.camel.model.loadbalancer.WeightedLoadBalancerDefinition;
-import org.apache.camel.processor.loadbalancer.CircuitBreakerLoadBalancer;
-import org.apache.camel.processor.loadbalancer.FailOverLoadBalancer;
 import org.apache.camel.processor.loadbalancer.LoadBalancer;
-import org.apache.camel.processor.loadbalancer.RandomLoadBalancer;
-import org.apache.camel.processor.loadbalancer.RoundRobinLoadBalancer;
-import org.apache.camel.processor.loadbalancer.StickyLoadBalancer;
-import org.apache.camel.processor.loadbalancer.TopicLoadBalancer;
-import org.apache.camel.processor.loadbalancer.WeightedLoadBalancer;
-import org.apache.camel.processor.loadbalancer.WeightedRandomLoadBalancer;
-import org.apache.camel.processor.loadbalancer.WeightedRoundRobinLoadBalancer;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.RouteContext;
 import org.apache.camel.util.CollectionStringBuffer;
@@ -204,10 +195,11 @@ public class LoadBalanceDefinition extends 
ProcessorDefinitionLoadBalanceDefini
  * @return the builder
  */
 public LoadBalanceDefinition failover(int maximumFailoverAttempts, boolean 
inheritErrorHandler, boolean roundRobin, Class?... exceptions) {
-FailOverLoadBalancer failover = new 
FailOverLoadBalancer(Arrays.asList(exceptions));
-failover.setMaximumFailoverAttempts(maximumFailoverAttempts);
-failover.setRoundRobin(roundRobin);
-setLoadBalancerType(new LoadBalancerDefinition(failover));
+FailoverLoadBalancerDefinition def = new 
FailoverLoadBalancerDefinition();
+def.setExceptionTypes(Arrays.asList(exceptions));
+def.setMaximumFailoverAttempts(maximumFailoverAttempts);
+def.setRoundRobin(roundRobin);
+setLoadBalancerType(def);
 this.setInheritErrorHandler(inheritErrorHandler);
 return this;
 }
@@ -232,11 +224,11 @@ public class LoadBalanceDefinition extends 
ProcessorDefinitionLoadBalanceDefini
  * @return the builder
  */
 public LoadBalanceDefinition circuitBreaker(int threshold, long 
halfOpenAfter, Class?... exceptions) {
-CircuitBreakerLoadBalancer breakerLoadBalancer = new 
CircuitBreakerLoadBalancer(Arrays.asList(exceptions));
-breakerLoadBalancer.setThreshold(threshold);
-breakerLoadBalancer.setHalfOpenAfter(halfOpenAfter);
-
-setLoadBalancerType(new LoadBalancerDefinition(breakerLoadBalancer));
+CircuitBreakerLoadBalancerDefinition def = new 
CircuitBreakerLoadBalancerDefinition();
+def.setExceptionTypes(Arrays.asList(exceptions));
+def.setThreshold(threshold);
+def.setHalfOpenAfter(halfOpenAfter);
+setLoadBalancerType(def);
 return this;
 }
 
@@ -249,20 +241,11 @@ public class LoadBalanceDefinition extends 
ProcessorDefinitionLoadBalanceDefini
  * @return the builder
 

camel git commit: CAMEL-8683: Using load balancer in onException adds duplicate outputs for each route defined

2015-04-23 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 963506415 - 22cf585a4


CAMEL-8683: Using load balancer in onException adds duplicate outputs for each 
route defined


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/22cf585a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/22cf585a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/22cf585a

Branch: refs/heads/master
Commit: 22cf585a4770fcd825c505c16776874d12617dff
Parents: 9635064
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Apr 23 15:48:02 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Apr 23 15:48:02 2015 +0200

--
 .../camel/model/LoadBalanceDefinition.java  | 68 ++--
 .../camel/model/LoadBalancerDefinition.java | 36 ---
 .../CustomLoadBalancerDefinition.java   | 24 ++-
 .../AdviceWithOnExceptionAndInterceptTest.java  | 26 
 .../OnExceptionLoadBalancerDoubleIssueTest.java | 58 +
 ...gOnExceptionLoadBalancerDoubleIssueTest.java | 33 ++
 .../OnExceptionLoadBalancerDoubleIssueTest.xml  | 58 +
 7 files changed, 221 insertions(+), 82 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/22cf585a/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java 
b/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
index c2d8291..32ec236 100644
--- a/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
@@ -18,11 +18,9 @@ package org.apache.camel.model;
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.List;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElementRef;
 import javax.xml.bind.annotation.XmlElements;
@@ -50,9 +48,6 @@ import org.apache.camel.util.CollectionStringBuffer;
 @XmlRootElement(name = loadBalance)
 @XmlAccessorType(XmlAccessType.FIELD)
 public class LoadBalanceDefinition extends 
ProcessorDefinitionLoadBalanceDefinition {
-@XmlAttribute
-@Deprecated
-private String ref;
 @XmlElements({
 @XmlElement(required = false, name = failover, type = 
FailoverLoadBalancerDefinition.class),
 @XmlElement(required = false, name = random, type = 
RandomLoadBalancerDefinition.class),
@@ -88,21 +83,6 @@ public class LoadBalanceDefinition extends 
ProcessorDefinitionLoadBalanceDefini
 return true;
 }
 
-public String getRef() {
-return ref;
-}
-
-/**
- * To use a custom load balancer.
- * This option is deprecated, use the custom load balancer type instead.
- *
- * @deprecated use custom load balancer
- */
-@Deprecated
-public void setRef(String ref) {
-this.ref = ref;
-}
-
 public LoadBalancerDefinition getLoadBalancerType() {
 return loadBalancerType;
 }
@@ -117,30 +97,26 @@ public class LoadBalanceDefinition extends 
ProcessorDefinitionLoadBalanceDefini
 loadBalancerType = loadbalancer;
 }
 
-protected Processor createOutputsProcessor(RouteContext routeContext,
-CollectionProcessorDefinition? outputs) throws Exception {
-
-LoadBalancer loadBalancer = 
LoadBalancerDefinition.getLoadBalancer(routeContext, loadBalancerType, ref);
-for (ProcessorDefinition? processorType : outputs) {
-Processor processor = createProcessor(routeContext, processorType);
-loadBalancer.addProcessor(processor);
-}
-return loadBalancer;
-}
-
 @Override
 public Processor createProcessor(RouteContext routeContext) throws 
Exception {
-LoadBalancer loadBalancer = 
LoadBalancerDefinition.getLoadBalancer(routeContext, loadBalancerType, ref);
-for (ProcessorDefinition? processorType : getOutputs()) {
-// output must not be another load balancer
-// check for instanceof as the code below as there is compilation 
errors on earlier versions of JDK6
-// on Windows boxes or with IBM JDKs etc.
-if (LoadBalanceDefinition.class.isInstance(processorType)) {
-throw new IllegalArgumentException(Loadbalancer already 
configured to:  + loadBalancerType + . Cannot set it to:  + processorType);
+// the load balancer is stateful so we should only create it once in 
case its used from a context scoped error 

[2/2] camel git commit: CAMEL-8683: Using load balancer in onException adds duplicate outputs for each route defined

2015-04-23 Thread davsclaus
CAMEL-8683: Using load balancer in onException adds duplicate outputs for each 
route defined


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/31fac126
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/31fac126
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/31fac126

Branch: refs/heads/camel-2.15.x
Commit: 31fac12620f0b493be51d872acbd8c33e5f2835c
Parents: 7f13dcf
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Apr 23 15:48:02 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Apr 23 15:55:19 2015 +0200

--
 .../camel/model/LoadBalanceDefinition.java  | 68 ++--
 .../camel/model/LoadBalancerDefinition.java | 36 ---
 .../CustomLoadBalancerDefinition.java   | 24 ++-
 .../AdviceWithOnExceptionAndInterceptTest.java  | 26 
 .../OnExceptionLoadBalancerDoubleIssueTest.java | 58 +
 ...gOnExceptionLoadBalancerDoubleIssueTest.java | 33 ++
 .../OnExceptionLoadBalancerDoubleIssueTest.xml  | 58 +
 7 files changed, 221 insertions(+), 82 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/31fac126/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java 
b/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
index c2d8291..32ec236 100644
--- a/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
@@ -18,11 +18,9 @@ package org.apache.camel.model;
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.List;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElementRef;
 import javax.xml.bind.annotation.XmlElements;
@@ -50,9 +48,6 @@ import org.apache.camel.util.CollectionStringBuffer;
 @XmlRootElement(name = loadBalance)
 @XmlAccessorType(XmlAccessType.FIELD)
 public class LoadBalanceDefinition extends 
ProcessorDefinitionLoadBalanceDefinition {
-@XmlAttribute
-@Deprecated
-private String ref;
 @XmlElements({
 @XmlElement(required = false, name = failover, type = 
FailoverLoadBalancerDefinition.class),
 @XmlElement(required = false, name = random, type = 
RandomLoadBalancerDefinition.class),
@@ -88,21 +83,6 @@ public class LoadBalanceDefinition extends 
ProcessorDefinitionLoadBalanceDefini
 return true;
 }
 
-public String getRef() {
-return ref;
-}
-
-/**
- * To use a custom load balancer.
- * This option is deprecated, use the custom load balancer type instead.
- *
- * @deprecated use custom load balancer
- */
-@Deprecated
-public void setRef(String ref) {
-this.ref = ref;
-}
-
 public LoadBalancerDefinition getLoadBalancerType() {
 return loadBalancerType;
 }
@@ -117,30 +97,26 @@ public class LoadBalanceDefinition extends 
ProcessorDefinitionLoadBalanceDefini
 loadBalancerType = loadbalancer;
 }
 
-protected Processor createOutputsProcessor(RouteContext routeContext,
-CollectionProcessorDefinition? outputs) throws Exception {
-
-LoadBalancer loadBalancer = 
LoadBalancerDefinition.getLoadBalancer(routeContext, loadBalancerType, ref);
-for (ProcessorDefinition? processorType : outputs) {
-Processor processor = createProcessor(routeContext, processorType);
-loadBalancer.addProcessor(processor);
-}
-return loadBalancer;
-}
-
 @Override
 public Processor createProcessor(RouteContext routeContext) throws 
Exception {
-LoadBalancer loadBalancer = 
LoadBalancerDefinition.getLoadBalancer(routeContext, loadBalancerType, ref);
-for (ProcessorDefinition? processorType : getOutputs()) {
-// output must not be another load balancer
-// check for instanceof as the code below as there is compilation 
errors on earlier versions of JDK6
-// on Windows boxes or with IBM JDKs etc.
-if (LoadBalanceDefinition.class.isInstance(processorType)) {
-throw new IllegalArgumentException(Loadbalancer already 
configured to:  + loadBalancerType + . Cannot set it to:  + processorType);
+// the load balancer is stateful so we should only create it once in 
case its used from a context scoped error handler
+
+LoadBalancer loadBalancer = 

[1/2] camel git commit: Added uripath endpoint mapping for spring-ws route endpoints

2015-04-23 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master f5098d138 - 735ca601a


Added uripath endpoint mapping for spring-ws route endpoints


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/321b0dc1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/321b0dc1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/321b0dc1

Branch: refs/heads/master
Commit: 321b0dc127c1d8fb0b3fa2425184474fab603893
Parents: f5098d1
Author: christophd deppi...@consol.de
Authored: Thu Apr 16 11:58:24 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Apr 23 13:31:33 2015 +0200

--
 .../spring/ws/bean/CamelEndpointMapping.java| 63 ++--
 .../spring/ws/type/EndpointMappingType.java |  1 +
 ...ndpointMappingResponseHandlingRouteTest.java | 60 ++-
 .../ws/ConsumerEndpointMappingRouteTest.java| 51 +++-
 ...MappingResponseHandlingRouteTest-context.xml |  8 +++
 ...ConsumerEndpointMappingRouteTest-context.xml |  8 +++
 6 files changed, 144 insertions(+), 47 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/321b0dc1/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelEndpointMapping.java
--
diff --git 
a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelEndpointMapping.java
 
b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelEndpointMapping.java
index 5e2896f..0bce22c 100644
--- 
a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelEndpointMapping.java
+++ 
b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelEndpointMapping.java
@@ -16,19 +16,6 @@
  */
 package org.apache.camel.component.spring.ws.bean;
 
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
-
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.component.spring.ws.type.EndpointMappingKey;
 import org.apache.camel.component.spring.ws.type.EndpointMappingType;
@@ -37,9 +24,7 @@ import org.springframework.beans.factory.InitializingBean;
 import org.springframework.util.Assert;
 import org.springframework.util.StringUtils;
 import org.springframework.ws.context.MessageContext;
-import org.springframework.ws.server.EndpointInterceptor;
-import org.springframework.ws.server.EndpointInvocationChain;
-import org.springframework.ws.server.EndpointMapping;
+import org.springframework.ws.server.*;
 import org.springframework.ws.server.endpoint.MessageEndpoint;
 import org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping;
 import org.springframework.ws.server.endpoint.support.PayloadRootUtils;
@@ -50,6 +35,18 @@ import org.springframework.ws.transport.WebServiceConnection;
 import org.springframework.ws.transport.context.TransportContext;
 import org.springframework.ws.transport.context.TransportContextHolder;
 import org.springframework.xml.xpath.XPathExpression;
+import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * Spring {@link EndpointMapping} for mapping messages to corresponding Camel
@@ -84,6 +81,7 @@ import org.springframework.xml.xpath.XPathExpression;
 public class CamelEndpointMapping extends AbstractEndpointMapping implements 
InitializingBean, CamelSpringWSEndpointMapping, SoapEndpointMapping {
 
 private static final String DOUBLE_QUOTE = \;
+private static final String URI_PATH_WILDCARD = *;
 private MapEndpointMappingKey, MessageEndpoint endpoints = new 
ConcurrentHashMapEndpointMappingKey, MessageEndpoint();
 private TransformerFactory transformerFactory;
 private XmlConverter xmlConverter;
@@ -95,7 +93,7 @@ public class CamelEndpointMapping extends 
AbstractEndpointMapping implements Ini
 @Override
 protected Object getEndpointInternal(MessageContext messageContext) throws 
Exception {
 for (EndpointMappingKey key : endpoints.keySet()) {
-Object messageKey = null;
+  

[2/2] camel git commit: CAMEL-8670: Fixed CS

2015-04-23 Thread davsclaus
CAMEL-8670: Fixed CS


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/735ca601
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/735ca601
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/735ca601

Branch: refs/heads/master
Commit: 735ca601a60d7c4d9da5cc0e0a9a385c391f8814
Parents: 321b0dc
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Apr 23 13:36:06 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Apr 23 13:36:06 2015 +0200

--
 .../spring/ws/bean/CamelEndpointMapping.java| 28 +++-
 ...ndpointMappingResponseHandlingRouteTest.java | 14 +-
 .../ws/ConsumerEndpointMappingRouteTest.java| 12 -
 3 files changed, 29 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/735ca601/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelEndpointMapping.java
--
diff --git 
a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelEndpointMapping.java
 
b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelEndpointMapping.java
index 0bce22c..1359281 100644
--- 
a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelEndpointMapping.java
+++ 
b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/bean/CamelEndpointMapping.java
@@ -16,6 +16,19 @@
  */
 package org.apache.camel.component.spring.ws.bean;
 
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+
+import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
+
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.component.spring.ws.type.EndpointMappingKey;
 import org.apache.camel.component.spring.ws.type.EndpointMappingType;
@@ -24,7 +37,9 @@ import org.springframework.beans.factory.InitializingBean;
 import org.springframework.util.Assert;
 import org.springframework.util.StringUtils;
 import org.springframework.ws.context.MessageContext;
-import org.springframework.ws.server.*;
+import org.springframework.ws.server.EndpointInterceptor;
+import org.springframework.ws.server.EndpointInvocationChain;
+import org.springframework.ws.server.EndpointMapping;
 import org.springframework.ws.server.endpoint.MessageEndpoint;
 import org.springframework.ws.server.endpoint.mapping.AbstractEndpointMapping;
 import org.springframework.ws.server.endpoint.support.PayloadRootUtils;
@@ -35,18 +50,7 @@ import org.springframework.ws.transport.WebServiceConnection;
 import org.springframework.ws.transport.context.TransportContext;
 import org.springframework.ws.transport.context.TransportContextHolder;
 import org.springframework.xml.xpath.XPathExpression;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
 
-import javax.xml.namespace.QName;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * Spring {@link EndpointMapping} for mapping messages to corresponding Camel

http://git-wip-us.apache.org/repos/asf/camel/blob/735ca601/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingResponseHandlingRouteTest.java
--
diff --git 
a/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingResponseHandlingRouteTest.java
 
b/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingResponseHandlingRouteTest.java
index b54c342..f5cc01d 100644
--- 
a/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingResponseHandlingRouteTest.java
+++ 
b/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingResponseHandlingRouteTest.java
@@ -16,6 +16,13 @@
  */
 package org.apache.camel.component.spring.ws;
 
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.net.URI;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
 import 

[2/2] camel git commit: CAMEL-7378: Fixed CS

2015-04-23 Thread davsclaus
CAMEL-7378: Fixed CS


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/96350641
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/96350641
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/96350641

Branch: refs/heads/master
Commit: 9635064159305c781f97ef26efdfa9758d4f44ce
Parents: 97f4a7c
Author: Claus Ibsen davscl...@apache.org
Authored: Thu Apr 23 13:49:36 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Apr 23 13:49:36 2015 +0200

--
 .../camel/component/mongodb/MongoDbEndpoint.java  | 14 +++---
 .../camel/component/mongodb/MongoDbProducer.java  |  4 ++--
 .../component/mongodb/MongoDbOutputTypeTest.java  | 11 +--
 3 files changed, 14 insertions(+), 15 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/96350641/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
--
diff --git 
a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
 
b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
index f31faa7..dc6ccb8 100644
--- 
a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
+++ 
b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
@@ -147,15 +147,15 @@ public class MongoDbEndpoint extends DefaultEndpoint {
 /**
  * Check if outputType is compatible with operation. DbCursor and 
DBObjectList applies to findAll. DBObject applies to others.
  */
-private void validateOutputType(){
-if(!ObjectHelper.isEmpty(outputType)){
-if(MongoDbOutputType.DBObjectList.equals(outputType)  
!(MongoDbOperation.findAll.equals(operation)) ){
+private void validateOutputType() {
+if (!ObjectHelper.isEmpty(outputType)) {
+if (MongoDbOutputType.DBObjectList.equals(outputType)  
!(MongoDbOperation.findAll.equals(operation))) {
 throw new IllegalArgumentException(outputType DBObjectList is 
only compatible with operation findAll);
 }
-if(MongoDbOutputType.DBCursor.equals(outputType)  
!(MongoDbOperation.findAll.equals(operation)) ){
+if (MongoDbOutputType.DBCursor.equals(outputType)  
!(MongoDbOperation.findAll.equals(operation))) {
 throw new IllegalArgumentException(outputType DBCursor is 
only compatible with operation findAll);
 }
-if(MongoDbOutputType.DBObject.equals(outputType)  
(MongoDbOperation.findAll.equals(operation)) ){
+if (MongoDbOutputType.DBObject.equals(outputType)  
(MongoDbOperation.findAll.equals(operation))) {
 throw new IllegalArgumentException(outputType DBObject is not 
compatible with operation findAll);
 }
 }
@@ -323,7 +323,7 @@ public class MongoDbEndpoint extends DefaultEndpoint {
 
 /**
  * Sets the name of the MongoDB collection to bind to this endpoint
- * 
+ *
  * @param collection collection name
  */
 public void setCollection(String collection) {
@@ -347,8 +347,8 @@ public class MongoDbEndpoint extends DefaultEndpoint {
 
 /**
  * Sets the operation this endpoint will execute against MongoDB. For 
possible values, see {@link MongoDbOperation}.
+ *
  * @param operation name of the operation as per catalogued values
- * 
  * @throws CamelMongoDbException
  */
 public void setOperation(String operation) throws CamelMongoDbException {

http://git-wip-us.apache.org/repos/asf/camel/blob/96350641/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbProducer.java
--
diff --git 
a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbProducer.java
 
b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbProducer.java
index b6b9939..a70e52c 100644
--- 
a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbProducer.java
+++ 
b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbProducer.java
@@ -331,9 +331,9 @@ public class MongoDbProducer extends DefaultProducer {
 }
 
 Message resultMessage = prepareResponseMessage(exchange, 
MongoDbOperation.findAll);
-if(MongoDbOutputType.DBCursor.equals(endpoint.getOutputType())){
+if (MongoDbOutputType.DBCursor.equals(endpoint.getOutputType())) {
 resultMessage.setBody(ret.iterator());
-}else{
+} else {
 resultMessage.setBody(ret.toArray());
 

[1/2] camel git commit: CAMEL-7378 Adding outputType to allow user to choose between a List or a DBCursor while performing a findAll operation.

2015-04-23 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 735ca601a - 963506415


CAMEL-7378 Adding outputType to allow user to choose between a List or a 
DBCursor while performing a findAll operation.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/97f4a7cf
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/97f4a7cf
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/97f4a7cf

Branch: refs/heads/master
Commit: 97f4a7cfab29056c5054fc46d6e7fca288e803c1
Parents: 735ca60
Author: Pierre-Alban DEWITTE padewi...@gmail.com
Authored: Tue Mar 31 21:25:24 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Thu Apr 23 13:45:55 2015 +0200

--
 .../component/mongodb/MongoDbEndpoint.java  |  38 -
 .../component/mongodb/MongoDbOutputType.java|  21 +++
 .../component/mongodb/MongoDbProducer.java  |  10 +-
 .../mongodb/MongoDbOutputTypeTest.java  | 139 +++
 4 files changed, 202 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/97f4a7cf/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
--
diff --git 
a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
 
b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
index abe930b..f31faa7 100644
--- 
a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
+++ 
b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbEndpoint.java
@@ -94,6 +94,9 @@ public class MongoDbEndpoint extends DefaultEndpoint {
 private String tailTrackField;
 private MongoDbTailTrackingConfig tailTrackingConfig;
 
+@UriParam
+private MongoDbOutputType outputType;
+
 private DBCollection dbCollection;
 private DB db;
 
@@ -141,6 +144,23 @@ public class MongoDbEndpoint extends DefaultEndpoint {
 return consumer;
 }
 
+/**
+ * Check if outputType is compatible with operation. DbCursor and 
DBObjectList applies to findAll. DBObject applies to others.
+ */
+private void validateOutputType(){
+if(!ObjectHelper.isEmpty(outputType)){
+if(MongoDbOutputType.DBObjectList.equals(outputType)  
!(MongoDbOperation.findAll.equals(operation)) ){
+throw new IllegalArgumentException(outputType DBObjectList is 
only compatible with operation findAll);
+}
+if(MongoDbOutputType.DBCursor.equals(outputType)  
!(MongoDbOperation.findAll.equals(operation)) ){
+throw new IllegalArgumentException(outputType DBCursor is 
only compatible with operation findAll);
+}
+if(MongoDbOutputType.DBObject.equals(outputType)  
(MongoDbOperation.findAll.equals(operation)) ){
+throw new IllegalArgumentException(outputType DBObject is not 
compatible with operation findAll);
+}
+}
+}
+
 private void validateOptions(char role) throws IllegalArgumentException {
 // make our best effort to validate, options with defaults are checked 
against their defaults, which is not always a guarantee that
 // they haven't been explicitly set, but it is enough
@@ -151,11 +171,10 @@ public class MongoDbEndpoint extends DefaultEndpoint {
 }
 } else if (role == 'C') {
 if (!ObjectHelper.isEmpty(operation) || 
!ObjectHelper.isEmpty(writeConcern) || writeConcernRef != null
-   || dynamicity) {
-throw new IllegalArgumentException(operation, writeConcern, 
writeConcernRef, dynamicity, invokeGetLastError 
+   || dynamicity || outputType != null) {
+throw new IllegalArgumentException(operation, writeConcern, 
writeConcernRef, dynamicity, outputType 
 + options cannot appear on a consumer endpoint);
 }
-
 if (consumerType == MongoDbConsumerType.tailable) {
 if (tailTrackIncreasingField == null) {
 throw new 
IllegalArgumentException(tailTrackIncreasingField option must be set for 
tailable cursor MongoDB consumer endpoint);
@@ -605,4 +624,17 @@ public class MongoDbEndpoint extends DefaultEndpoint {
 this.writeResultAsHeader = writeResultAsHeader;
 }
 
+public MongoDbOutputType getOutputType() {
+return outputType;
+}
+
+/**
+ * Convert the output of the producer to the selected type : 
DBObjectList, DBObject or DBCursor.
+ * DBObjectList or DBObject applies to findAll.
+ * DBCursor applies to all other operations.
+ * @param outputType
+ */
+public void 

[2/2] camel git commit: CAMEL-8693: HTTP related component should parse query lenient to ignore trailing markers which can happen when using HTTP

2015-04-23 Thread davsclaus
CAMEL-8693: HTTP related component should parse query lenient to ignore 
trailing  markers which can happen when using HTTP


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f51e0616
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f51e0616
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f51e0616

Branch: refs/heads/camel-2.15.x
Commit: f51e06167a230c7da6a248b0e7b941bda3d1406c
Parents: 29f7fad
Author: Claus Ibsen davscl...@apache.org
Authored: Fri Apr 24 07:41:19 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Fri Apr 24 07:44:39 2015 +0200

--
 .../java/org/apache/camel/util/URISupport.java  | 30 
 .../org/apache/camel/util/URISupportTest.java   | 15 ++
 .../camel/component/gae/http/GHttpEndpoint.java |  2 +-
 .../camel/component/http/HttpProducer.java  |  2 +-
 .../camel/component/http4/HttpProducer.java |  2 +-
 .../component/jetty/JettyHttpProducer.java  |  2 +-
 .../netty/http/DefaultNettyHttpBinding.java |  4 +--
 .../netty4/http/DefaultNettyHttpBinding.java|  4 +--
 .../component/netty4/http/NettyHttpBinding.java |  6 ++--
 9 files changed, 50 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f51e0616/camel-core/src/main/java/org/apache/camel/util/URISupport.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/util/URISupport.java 
b/camel-core/src/main/java/org/apache/camel/util/URISupport.java
index 45f831c..90229a6 100644
--- a/camel-core/src/main/java/org/apache/camel/util/URISupport.java
+++ b/camel-core/src/main/java/org/apache/camel/util/URISupport.java
@@ -22,7 +22,6 @@ import java.net.URISyntaxException;
 import java.net.URLDecoder;
 import java.net.URLEncoder;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
@@ -148,13 +147,34 @@ public final class URISupport {
  * @see #RAW_TOKEN_END
  */
 public static MapString, Object parseQuery(String uri, boolean useRaw) 
throws URISyntaxException {
+return parseQuery(uri, useRaw, false);
+}
+
+/**
+ * Parses the query part of the uri (eg the parameters).
+ * p/
+ * The URI parameters will by default be URI encoded. However you can 
define a parameter
+ * values with the syntax: ttkey=RAW(value)/tt which tells Camel to 
not encode the value,
+ * and use the value as is (eg key=value) and the value has bnot/b 
been encoded.
+ *
+ * @param uri the uri
+ * @param useRaw whether to force using raw values
+ * @param lenient whether to parse lenient and ignore trailing  markers 
which has no key or value which can happen when using HTTP components
+ * @return the parameters, or an empty map if no parameters (eg never null)
+ * @throws URISyntaxException is thrown if uri has invalid syntax.
+ * @see #RAW_TOKEN_START
+ * @see #RAW_TOKEN_END
+ */
+public static MapString, Object parseQuery(String uri, boolean useRaw, 
boolean lenient) throws URISyntaxException {
 // must check for trailing  as the uri.split() will ignore those
-if (uri != null  uri.endsWith()) {
-throw new URISyntaxException(uri, Invalid uri syntax: Trailing  
marker found. 
-+ Check the uri and remove the trailing  marker.);
+if (!lenient) {
+if (uri != null  uri.endsWith()) {
+throw new URISyntaxException(uri, Invalid uri syntax: 
Trailing  marker found. 
++ Check the uri and remove the trailing  marker.);
+}
 }
 
-if (ObjectHelper.isEmpty(uri)) {
+if (uri == null || ObjectHelper.isEmpty(uri)) {
 // return an empty map
 return new LinkedHashMapString, Object(0);
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/f51e0616/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
--
diff --git a/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java 
b/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
index 4291f3c..1b8d5a4 100644
--- a/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
+++ b/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
@@ -17,6 +17,7 @@
 package org.apache.camel.util;
 
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -280,6 +281,20 @@ public class URISupportTest extends ContextTestSupport {
 assertEquals(somechat, map.get(serviceName));
 }
 
+public void 

[1/2] camel git commit: CAMEL-8693: HTTP related component should parse query lenient to ignore trailing markers which can happen when using HTTP

2015-04-23 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x 29f7fade8 - f51e06167
  refs/heads/master 411182eda - 157c7366f


CAMEL-8693: HTTP related component should parse query lenient to ignore 
trailing  markers which can happen when using HTTP


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/157c7366
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/157c7366
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/157c7366

Branch: refs/heads/master
Commit: 157c7366feb7af15ed4d08c6fb055c400f91b654
Parents: 411182e
Author: Claus Ibsen davscl...@apache.org
Authored: Fri Apr 24 07:41:19 2015 +0200
Committer: Claus Ibsen davscl...@apache.org
Committed: Fri Apr 24 07:41:19 2015 +0200

--
 .../java/org/apache/camel/util/URISupport.java  | 30 
 .../org/apache/camel/util/URISupportTest.java   | 15 ++
 .../camel/component/gae/http/GHttpEndpoint.java |  2 +-
 .../camel/component/http/HttpProducer.java  |  2 +-
 .../camel/component/http4/HttpProducer.java |  2 +-
 .../component/jetty/JettyHttpProducer.java  |  2 +-
 .../netty/http/DefaultNettyHttpBinding.java |  4 +--
 .../netty4/http/DefaultNettyHttpBinding.java|  4 +--
 .../component/netty4/http/NettyHttpBinding.java |  6 ++--
 9 files changed, 50 insertions(+), 17 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/157c7366/camel-core/src/main/java/org/apache/camel/util/URISupport.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/util/URISupport.java 
b/camel-core/src/main/java/org/apache/camel/util/URISupport.java
index 45f831c..90229a6 100644
--- a/camel-core/src/main/java/org/apache/camel/util/URISupport.java
+++ b/camel-core/src/main/java/org/apache/camel/util/URISupport.java
@@ -22,7 +22,6 @@ import java.net.URISyntaxException;
 import java.net.URLDecoder;
 import java.net.URLEncoder;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
@@ -148,13 +147,34 @@ public final class URISupport {
  * @see #RAW_TOKEN_END
  */
 public static MapString, Object parseQuery(String uri, boolean useRaw) 
throws URISyntaxException {
+return parseQuery(uri, useRaw, false);
+}
+
+/**
+ * Parses the query part of the uri (eg the parameters).
+ * p/
+ * The URI parameters will by default be URI encoded. However you can 
define a parameter
+ * values with the syntax: ttkey=RAW(value)/tt which tells Camel to 
not encode the value,
+ * and use the value as is (eg key=value) and the value has bnot/b 
been encoded.
+ *
+ * @param uri the uri
+ * @param useRaw whether to force using raw values
+ * @param lenient whether to parse lenient and ignore trailing  markers 
which has no key or value which can happen when using HTTP components
+ * @return the parameters, or an empty map if no parameters (eg never null)
+ * @throws URISyntaxException is thrown if uri has invalid syntax.
+ * @see #RAW_TOKEN_START
+ * @see #RAW_TOKEN_END
+ */
+public static MapString, Object parseQuery(String uri, boolean useRaw, 
boolean lenient) throws URISyntaxException {
 // must check for trailing  as the uri.split() will ignore those
-if (uri != null  uri.endsWith()) {
-throw new URISyntaxException(uri, Invalid uri syntax: Trailing  
marker found. 
-+ Check the uri and remove the trailing  marker.);
+if (!lenient) {
+if (uri != null  uri.endsWith()) {
+throw new URISyntaxException(uri, Invalid uri syntax: 
Trailing  marker found. 
++ Check the uri and remove the trailing  marker.);
+}
 }
 
-if (ObjectHelper.isEmpty(uri)) {
+if (uri == null || ObjectHelper.isEmpty(uri)) {
 // return an empty map
 return new LinkedHashMapString, Object(0);
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/157c7366/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
--
diff --git a/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java 
b/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
index 4291f3c..1b8d5a4 100644
--- a/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
+++ b/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
@@ -17,6 +17,7 @@
 package org.apache.camel.util;
 
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -280,6 +281,20 @@ public class URISupportTest