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

2015-10-27 Thread davsclaus
CAMEL-9225: Fixed CS


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

Branch: refs/heads/master
Commit: 678252004165755c64bfca78f150718538f994df
Parents: 534b4a8
Author: Claus Ibsen 
Authored: Tue Oct 27 09:37:53 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 09:37:53 2015 +0100

--
 .../camel/component/exec/ExecException.java |  6 ++---
 .../exec/impl/DefaultExecCommandExecutor.java   | 20 +++
 .../component/exec/ExecJavaProcessTest.java | 26 +---
 .../ProvokeExceptionExecCommandExecutor.java| 15 +--
 4 files changed, 33 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/67825200/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecException.java
--
diff --git 
a/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecException.java
 
b/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecException.java
index afc762a..ff05b92 100644
--- 
a/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecException.java
+++ 
b/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecException.java
@@ -23,13 +23,13 @@ import org.apache.camel.RuntimeCamelException;
  * Exception thrown when there is an execution failure.
  */
 public class ExecException extends RuntimeCamelException {
-
+
+private static final long serialVersionUID = 7808703605527644487L;
+
 private final int exitValue;
 private final InputStream stdout;
 private final InputStream stderr;
 
-private static final long serialVersionUID = 7808703605527644487L;
-
 public ExecException(String message, final InputStream stdout, final 
InputStream stderr, final int exitValue) {
 super(message);
 this.exitValue = exitValue;

http://git-wip-us.apache.org/repos/asf/camel/blob/67825200/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
--
diff --git 
a/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
 
b/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
index 3cbce5b..9e6d549e 100644
--- 
a/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
+++ 
b/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with this
- * work for additional information regarding copyright ownership. The ASF
- * licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * 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
+ *  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.
+ * 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.exec.impl;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/67825200/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJavaProcessTest.java
--
diff --git 
a/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJavaProcessTest.java
 
b/components/camel-exec/src/test/java/org/apache/camel/component/exec/ExecJavaProcessTest.java
index 224f38a..af1339d 100644

[3/3] camel git commit: CAMEL-9255: DocumentType not used for XPath predicates in XML DSL. Thanks to Stephan Siano for the patch.

2015-10-27 Thread davsclaus
CAMEL-9255: DocumentType not used for XPath predicates in XML DSL. Thanks to 
Stephan Siano for the patch.


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

Branch: refs/heads/camel-2.15.x
Commit: 20f7f63c0f0c14c64e943f699a581142a0e4e506
Parents: d9a19d7
Author: Claus Ibsen 
Authored: Tue Oct 27 08:50:42 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 08:53:32 2015 +0100

--
 .../java/org/apache/camel/model/language/XPathExpression.java | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/20f7f63c/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java 
b/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
index 4a01417..ac5f838 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
@@ -202,6 +202,13 @@ public class XPathExpression extends 
NamespaceAwareExpression {
 
 @Override
 public Predicate createPredicate(CamelContext camelContext) {
+if (documentType == null && documentTypeName != null) {
+try {
+documentType = 
camelContext.getClassResolver().resolveMandatoryClass(documentTypeName);
+} catch (ClassNotFoundException e) {
+throw ObjectHelper.wrapRuntimeCamelException(e);
+}
+}
 resolveXPathFactory(camelContext);
 return super.createPredicate(camelContext);
 }



[1/3] camel git commit: CAMEL-9255: DocumentType not used for XPath predicates in XML DSL. Thanks to Stephan Siano for the patch.

2015-10-27 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x d9a19d70c -> 20f7f63c0
  refs/heads/camel-2.16.x 8ad367357 -> a8ecbd9e9
  refs/heads/master 84a7a0536 -> b6c2e1dd2


CAMEL-9255: DocumentType not used for XPath predicates in XML DSL. Thanks to 
Stephan Siano for the patch.


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

Branch: refs/heads/master
Commit: b6c2e1dd251d63295273c54e857f9da4bf39b873
Parents: 84a7a05
Author: Claus Ibsen 
Authored: Tue Oct 27 08:50:42 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 08:50:42 2015 +0100

--
 .../java/org/apache/camel/model/language/XPathExpression.java | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b6c2e1dd/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java 
b/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
index 8fc05e4..8f6aadd 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
@@ -202,6 +202,13 @@ public class XPathExpression extends 
NamespaceAwareExpression {
 
 @Override
 public Predicate createPredicate(CamelContext camelContext) {
+if (documentType == null && documentTypeName != null) {
+try {
+documentType = 
camelContext.getClassResolver().resolveMandatoryClass(documentTypeName);
+} catch (ClassNotFoundException e) {
+throw ObjectHelper.wrapRuntimeCamelException(e);
+}
+}
 resolveXPathFactory(camelContext);
 return super.createPredicate(camelContext);
 }



[2/3] camel git commit: CAMEL-9255: DocumentType not used for XPath predicates in XML DSL. Thanks to Stephan Siano for the patch.

2015-10-27 Thread davsclaus
CAMEL-9255: DocumentType not used for XPath predicates in XML DSL. Thanks to 
Stephan Siano for the patch.


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

Branch: refs/heads/camel-2.16.x
Commit: a8ecbd9e930785c81bbb85457b8b1ede11d14f31
Parents: 8ad3673
Author: Claus Ibsen 
Authored: Tue Oct 27 08:50:42 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 08:51:34 2015 +0100

--
 .../java/org/apache/camel/model/language/XPathExpression.java | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a8ecbd9e/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java 
b/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
index 8fc05e4..8f6aadd 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
@@ -202,6 +202,13 @@ public class XPathExpression extends 
NamespaceAwareExpression {
 
 @Override
 public Predicate createPredicate(CamelContext camelContext) {
+if (documentType == null && documentTypeName != null) {
+try {
+documentType = 
camelContext.getClassResolver().resolveMandatoryClass(documentTypeName);
+} catch (ClassNotFoundException e) {
+throw ObjectHelper.wrapRuntimeCamelException(e);
+}
+}
 resolveXPathFactory(camelContext);
 return super.createPredicate(camelContext);
 }



[1/2] camel git commit: CAMEL-9225: camel-exec - Enrich exception with stdout/stderr. Thanks to Timo Bruckner for the patch.

2015-10-27 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master b6c2e1dd2 -> 678252004


CAMEL-9225: camel-exec - Enrich exception with stdout/stderr. Thanks to Timo 
Bruckner for the patch.


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

Branch: refs/heads/master
Commit: 534b4a8ef3b89b35bd266c7c779f7fbd4b3ce03a
Parents: b6c2e1d
Author: Claus Ibsen 
Authored: Tue Oct 27 09:35:17 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 09:35:17 2015 +0100

--
 .../camel/component/exec/ExecException.java | 30 +--
 .../exec/impl/DefaultExecCommandExecutor.java   | 53 ++-
 .../component/exec/ExecJavaProcessTest.java | 92 +---
 .../ProvokeExceptionExecCommandExecutor.java| 46 ++
 4 files changed, 176 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/534b4a8e/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecException.java
--
diff --git 
a/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecException.java
 
b/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecException.java
index d32a38b..afc762a 100644
--- 
a/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecException.java
+++ 
b/components/camel-exec/src/main/java/org/apache/camel/component/exec/ExecException.java
@@ -16,27 +16,43 @@
  */
 package org.apache.camel.component.exec;
 
+import java.io.InputStream;
 import org.apache.camel.RuntimeCamelException;
 
 /**
  * Exception thrown when there is an execution failure.
  */
 public class ExecException extends RuntimeCamelException {
+
+private final int exitValue;
+private final InputStream stdout;
+private final InputStream stderr;
 
 private static final long serialVersionUID = 7808703605527644487L;
 
-public ExecException() {
-}
-
-public ExecException(String message) {
+public ExecException(String message, final InputStream stdout, final 
InputStream stderr, final int exitValue) {
 super(message);
+this.exitValue = exitValue;
+this.stderr = stderr;
+this.stdout = stdout;
 }
 
-public ExecException(String message, Throwable cause) {
+public ExecException(String message, final InputStream stdout, final 
InputStream stderr, final int exitValue, Throwable cause) {
 super(message, cause);
+this.exitValue = exitValue;
+this.stderr = stderr;
+this.stdout = stdout;
+}
+
+public int getExitValue() {
+return exitValue;
+}
+
+public InputStream getStdout() {
+return stdout;
 }
 
-public ExecException(Throwable cause) {
-super(cause);
+public InputStream getStderr() {
+return stderr;
 }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/534b4a8e/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
--
diff --git 
a/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
 
b/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
index b2ed60e..3cbce5b 100644
--- 
a/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
+++ 
b/components/camel-exec/src/main/java/org/apache/camel/component/exec/impl/DefaultExecCommandExecutor.java
@@ -1,18 +1,18 @@
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * 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
+ * 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 

[3/4] camel git commit: Fixed CS

2015-10-27 Thread davsclaus
Fixed CS


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

Branch: refs/heads/master
Commit: bc11cef6985ebbe026143cfc1b3fa431fe24dd70
Parents: f4d689c
Author: Claus Ibsen 
Authored: Tue Oct 27 14:14:36 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 14:14:36 2015 +0100

--
 .../org/apache/camel/management/mbean/ManagedCamelContext.java  | 5 +++--
 .../java/org/apache/camel/management/mbean/ManagedRoute.java| 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/bc11cef6/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
index 758d3b1..91ffac0 100644
--- 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
+++ 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
@@ -37,8 +37,6 @@ import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.TabularData;
 import javax.management.openmbean.TabularDataSupport;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 
 import org.apache.camel.CamelContext;
@@ -66,6 +64,9 @@ import org.apache.camel.util.CamelContextHelper;
 import org.apache.camel.util.JsonSchemaHelper;
 import org.apache.camel.util.ObjectHelper;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * @version
  */

http://git-wip-us.apache.org/repos/asf/camel/blob/bc11cef6/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
index a4722fa..47760f3 100644
--- 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
+++ 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
@@ -54,9 +54,10 @@ import org.slf4j.LoggerFactory;
 @ManagedResource(description = "Managed Route")
 public class ManagedRoute extends ManagedPerformanceCounter implements 
TimerListener, ManagedRouteMBean {
 
+public static final String VALUE_UNKNOWN = "Unknown";
+
 private static final Logger LOG = 
LoggerFactory.getLogger(ManagedRoute.class);
 
-public static final String VALUE_UNKNOWN = "Unknown";
 protected final Route route;
 protected final String description;
 protected final ModelCamelContext context;



[4/4] camel git commit: Fixed CS

2015-10-27 Thread davsclaus
Fixed CS


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

Branch: refs/heads/camel-2.16.x
Commit: 3c3bee15ab8c91caa454e78451117b03a920f9e1
Parents: 86782ae
Author: Claus Ibsen 
Authored: Tue Oct 27 14:14:36 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 14:14:48 2015 +0100

--
 .../org/apache/camel/management/mbean/ManagedCamelContext.java  | 5 +++--
 .../java/org/apache/camel/management/mbean/ManagedRoute.java| 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3c3bee15/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
index 758d3b1..91ffac0 100644
--- 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
+++ 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
@@ -37,8 +37,6 @@ import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.TabularData;
 import javax.management.openmbean.TabularDataSupport;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 
 import org.apache.camel.CamelContext;
@@ -66,6 +64,9 @@ import org.apache.camel.util.CamelContextHelper;
 import org.apache.camel.util.JsonSchemaHelper;
 import org.apache.camel.util.ObjectHelper;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 /**
  * @version
  */

http://git-wip-us.apache.org/repos/asf/camel/blob/3c3bee15/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
index a4722fa..47760f3 100644
--- 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
+++ 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
@@ -54,9 +54,10 @@ import org.slf4j.LoggerFactory;
 @ManagedResource(description = "Managed Route")
 public class ManagedRoute extends ManagedPerformanceCounter implements 
TimerListener, ManagedRouteMBean {
 
+public static final String VALUE_UNKNOWN = "Unknown";
+
 private static final Logger LOG = 
LoggerFactory.getLogger(ManagedRoute.class);
 
-public static final String VALUE_UNKNOWN = "Unknown";
 protected final Route route;
 protected final String description;
 protected final ModelCamelContext context;



[1/4] camel git commit: Add warn logging when updating routes with xml over jmx api failed

2015-10-27 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x 7caa9bbdd -> 3c3bee15a
  refs/heads/master d461a3d57 -> bc11cef69


Add warn logging when updating routes with xml over jmx api failed


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

Branch: refs/heads/master
Commit: f4d689c5d857e7b5e2915e91b88815bb5eecb0a1
Parents: d461a3d
Author: Claus Ibsen 
Authored: Tue Oct 27 13:53:46 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 13:53:46 2015 +0100

--
 .../management/mbean/ManagedCamelContext.java | 16 ++--
 .../camel/management/mbean/ManagedRoute.java  | 18 --
 2 files changed, 30 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f4d689c5/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
index cd3ed4a..758d3b1 100644
--- 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
+++ 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
@@ -37,6 +37,8 @@ import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.TabularData;
 import javax.management.openmbean.TabularDataSupport;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 
 import org.apache.camel.CamelContext;
@@ -69,6 +71,9 @@ import org.apache.camel.util.ObjectHelper;
  */
 @ManagedResource(description = "Managed CamelContext")
 public class ManagedCamelContext extends ManagedPerformanceCounter implements 
TimerListener, ManagedCamelContextMBean {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(ManagedCamelContext.class);
+
 private final ModelCamelContext context;
 private final LoadTriplet load = new LoadTriplet();
 
@@ -382,8 +387,15 @@ public class ManagedCamelContext extends 
ManagedPerformanceCounter implements Ti
 return;
 }
 
-// add will remove existing route first
-context.addRouteDefinitions(def.getRoutes());
+try {
+// add will remove existing route first
+context.addRouteDefinitions(def.getRoutes());
+} catch (Exception e) {
+// log the error as warn as the management api may be invoked 
remotely over JMX which does not propagate such exception
+String msg = "Error updating routes from xml: " + xml + " due: " + 
e.getMessage();
+LOG.warn(msg, e);
+throw e;
+}
 }
 
 public String dumpRoutesStatsAsXml(boolean fullStats, boolean 
includeProcessors) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/f4d689c5/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
index 2f11b41..a4722fa 100644
--- 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
+++ 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
@@ -48,9 +48,14 @@ import org.apache.camel.model.RouteDefinition;
 import org.apache.camel.spi.ManagementStrategy;
 import org.apache.camel.spi.RoutePolicy;
 import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @ManagedResource(description = "Managed Route")
 public class ManagedRoute extends ManagedPerformanceCounter implements 
TimerListener, ManagedRouteMBean {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(ManagedRoute.class);
+
 public static final String VALUE_UNKNOWN = "Unknown";
 protected final Route route;
 protected final String description;
@@ -275,8 +280,17 @@ public class ManagedRoute extends 
ManagedPerformanceCounter implements TimerList
 + getRouteId() + ", routeId from XML: " + def.getId());
 }
 
-// add will remove existing route first
-context.addRouteDefinition(def);
+LOG.debug("Updating route: {} from xml: {}", def.getId(), xml);
+
+try {
+// add will remove existing route first
+context.addRouteDefinition(def);
+} catch (Exception e) {
+// log the error as warn 

[2/4] camel git commit: Add warn logging when updating routes with xml over jmx api failed

2015-10-27 Thread davsclaus
Add warn logging when updating routes with xml over jmx api failed


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

Branch: refs/heads/camel-2.16.x
Commit: 86782ae4751077e239e872ce266ba28eb0716df6
Parents: 7caa9bb
Author: Claus Ibsen 
Authored: Tue Oct 27 13:53:46 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 14:10:51 2015 +0100

--
 .../management/mbean/ManagedCamelContext.java | 16 ++--
 .../camel/management/mbean/ManagedRoute.java  | 18 --
 2 files changed, 30 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/86782ae4/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
index cd3ed4a..758d3b1 100644
--- 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
+++ 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
@@ -37,6 +37,8 @@ import javax.management.openmbean.CompositeType;
 import javax.management.openmbean.TabularData;
 import javax.management.openmbean.TabularDataSupport;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
 
 import org.apache.camel.CamelContext;
@@ -69,6 +71,9 @@ import org.apache.camel.util.ObjectHelper;
  */
 @ManagedResource(description = "Managed CamelContext")
 public class ManagedCamelContext extends ManagedPerformanceCounter implements 
TimerListener, ManagedCamelContextMBean {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(ManagedCamelContext.class);
+
 private final ModelCamelContext context;
 private final LoadTriplet load = new LoadTriplet();
 
@@ -382,8 +387,15 @@ public class ManagedCamelContext extends 
ManagedPerformanceCounter implements Ti
 return;
 }
 
-// add will remove existing route first
-context.addRouteDefinitions(def.getRoutes());
+try {
+// add will remove existing route first
+context.addRouteDefinitions(def.getRoutes());
+} catch (Exception e) {
+// log the error as warn as the management api may be invoked 
remotely over JMX which does not propagate such exception
+String msg = "Error updating routes from xml: " + xml + " due: " + 
e.getMessage();
+LOG.warn(msg, e);
+throw e;
+}
 }
 
 public String dumpRoutesStatsAsXml(boolean fullStats, boolean 
includeProcessors) throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/86782ae4/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
index 2f11b41..a4722fa 100644
--- 
a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
+++ 
b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
@@ -48,9 +48,14 @@ import org.apache.camel.model.RouteDefinition;
 import org.apache.camel.spi.ManagementStrategy;
 import org.apache.camel.spi.RoutePolicy;
 import org.apache.camel.util.ObjectHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @ManagedResource(description = "Managed Route")
 public class ManagedRoute extends ManagedPerformanceCounter implements 
TimerListener, ManagedRouteMBean {
+
+private static final Logger LOG = 
LoggerFactory.getLogger(ManagedRoute.class);
+
 public static final String VALUE_UNKNOWN = "Unknown";
 protected final Route route;
 protected final String description;
@@ -275,8 +280,17 @@ public class ManagedRoute extends 
ManagedPerformanceCounter implements TimerList
 + getRouteId() + ", routeId from XML: " + def.getId());
 }
 
-// add will remove existing route first
-context.addRouteDefinition(def);
+LOG.debug("Updating route: {} from xml: {}", def.getId(), xml);
+
+try {
+// add will remove existing route first
+context.addRouteDefinition(def);
+} catch (Exception e) {
+// log the error as warn as the management api may be invoked 
remotely over JMX which does not propagate such exception
+String msg = 

[2/2] camel git commit: Update reflections bundle

2015-10-27 Thread davsclaus
Update reflections bundle


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

Branch: refs/heads/camel-2.16.x
Commit: 7caa9bbddeb6c53bb969a658a33587c99dc93d4e
Parents: ecbde96
Author: Claus Ibsen 
Authored: Tue Oct 27 13:25:34 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 13:25:34 2015 +0100

--
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/7caa9bbd/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 3630d94..5d95f94 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -416,7 +416,7 @@
 2.2.1
 1.6.0_1
 3.5.4
-0.9.10_1
+0.9.10_2
 1.4_1
 2.3.1
 1.7R2_3



[3/3] camel git commit: CAMEL-9238: Fixed potential NPE in file rename when using move/moveFailed.

2015-10-27 Thread davsclaus
CAMEL-9238: Fixed potential NPE in file rename when using move/moveFailed.


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

Branch: refs/heads/camel-2.15.x
Commit: 4e10ede0d684e58f642dc924e91ebf223b5662ad
Parents: 20f7f63
Author: Claus Ibsen 
Authored: Tue Oct 27 11:52:30 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 12:38:28 2015 +0100

--
 .../camel/component/file/GenericFile.java   |  2 +-
 .../file/FileMoveAndMoveFailedIssueTest.java| 63 
 2 files changed, 64 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/4e10ede0/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java 
b/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
index 907de21..e517550 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
@@ -185,7 +185,7 @@ public class GenericFile implements WrappedFile  {
 
 // Make sure the names is normalized.
 String newFileName = FileUtil.normalizePath(newName);
-String newEndpointPath = FileUtil.normalizePath(endpointPath);
+String newEndpointPath = 
FileUtil.normalizePath(endpointPath.endsWith("" + File.separatorChar) ? 
endpointPath : endpointPath + File.separatorChar);
 
 LOG.trace("Normalized endpointPath: {}", newEndpointPath);
 LOG.trace("Normalized newFileName: ()", newFileName);

http://git-wip-us.apache.org/repos/asf/camel/blob/4e10ede0/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
 
b/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
new file mode 100644
index 000..a9d8ece
--- /dev/null
+++ 
b/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
@@ -0,0 +1,63 @@
+/**
+ * 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.file;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+
+public class FileMoveAndMoveFailedIssueTest extends ContextTestSupport {
+
+@Override
+protected void setUp() throws Exception {
+deleteDirectory("target/input");
+super.setUp();
+}
+
+public void testMove() throws Exception {
+getMockEndpoint("mock:result").expectedMessageCount(1);
+
getMockEndpoint("mock:result").expectedFileExists("target/input/target/input.bak/somedate/hello.txt");
+
+template.sendBodyAndHeader("file:target/input", "Hello World", 
Exchange.FILE_NAME, "hello.txt");
+
+assertMockEndpointsSatisfied();
+}
+
+public void testMoveFailed() throws Exception {
+getMockEndpoint("mock:result").expectedMessageCount(0);
+
getMockEndpoint("mock:result").expectedFileExists("target/input/target/input.err/somedate/bomb.txt");
+
+template.sendBodyAndHeader("file:target/input", "Kaboom", 
Exchange.FILE_NAME, "bomb.txt");
+
+assertMockEndpointsSatisfied();
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws Exception {
+
from("file:./target/input?move=${file:parent}.bak/somedate/${file:onlyname}=${file:parent}.err/somedate/${file:onlyname}")
+

[2/3] camel git commit: CAMEL-9238: Fixed potential NPE in file rename when using move/moveFailed.

2015-10-27 Thread davsclaus
CAMEL-9238: Fixed potential NPE in file rename when using move/moveFailed.


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

Branch: refs/heads/camel-2.16.x
Commit: 0bfb0da5625a1b88a654cc82861fd08b99195a85
Parents: a8ecbd9
Author: Claus Ibsen 
Authored: Tue Oct 27 11:52:30 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 12:38:14 2015 +0100

--
 .../camel/component/file/GenericFile.java   |  2 +-
 .../file/FileMoveAndMoveFailedIssueTest.java| 63 
 2 files changed, 64 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/0bfb0da5/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java 
b/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
index 907de21..e517550 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
@@ -185,7 +185,7 @@ public class GenericFile implements WrappedFile  {
 
 // Make sure the names is normalized.
 String newFileName = FileUtil.normalizePath(newName);
-String newEndpointPath = FileUtil.normalizePath(endpointPath);
+String newEndpointPath = 
FileUtil.normalizePath(endpointPath.endsWith("" + File.separatorChar) ? 
endpointPath : endpointPath + File.separatorChar);
 
 LOG.trace("Normalized endpointPath: {}", newEndpointPath);
 LOG.trace("Normalized newFileName: ()", newFileName);

http://git-wip-us.apache.org/repos/asf/camel/blob/0bfb0da5/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
 
b/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
new file mode 100644
index 000..a9d8ece
--- /dev/null
+++ 
b/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
@@ -0,0 +1,63 @@
+/**
+ * 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.file;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+
+public class FileMoveAndMoveFailedIssueTest extends ContextTestSupport {
+
+@Override
+protected void setUp() throws Exception {
+deleteDirectory("target/input");
+super.setUp();
+}
+
+public void testMove() throws Exception {
+getMockEndpoint("mock:result").expectedMessageCount(1);
+
getMockEndpoint("mock:result").expectedFileExists("target/input/target/input.bak/somedate/hello.txt");
+
+template.sendBodyAndHeader("file:target/input", "Hello World", 
Exchange.FILE_NAME, "hello.txt");
+
+assertMockEndpointsSatisfied();
+}
+
+public void testMoveFailed() throws Exception {
+getMockEndpoint("mock:result").expectedMessageCount(0);
+
getMockEndpoint("mock:result").expectedFileExists("target/input/target/input.err/somedate/bomb.txt");
+
+template.sendBodyAndHeader("file:target/input", "Kaboom", 
Exchange.FILE_NAME, "bomb.txt");
+
+assertMockEndpointsSatisfied();
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws Exception {
+
from("file:./target/input?move=${file:parent}.bak/somedate/${file:onlyname}=${file:parent}.err/somedate/${file:onlyname}")
+

[1/3] camel git commit: CAMEL-9238: Fixed potential NPE in file rename when using move/moveFailed.

2015-10-27 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x 20f7f63c0 -> 4e10ede0d
  refs/heads/camel-2.16.x a8ecbd9e9 -> 0bfb0da56
  refs/heads/master 678252004 -> 169b981e4


CAMEL-9238: Fixed potential NPE in file rename when using move/moveFailed.


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

Branch: refs/heads/master
Commit: 169b981e4552a3a38fe350a1466493e19372573a
Parents: 6782520
Author: Claus Ibsen 
Authored: Tue Oct 27 11:52:30 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 11:52:30 2015 +0100

--
 .../camel/component/file/GenericFile.java   |  2 +-
 .../file/FileMoveAndMoveFailedIssueTest.java| 63 
 2 files changed, 64 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/169b981e/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java 
b/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
index 907de21..e517550 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java
@@ -185,7 +185,7 @@ public class GenericFile implements WrappedFile  {
 
 // Make sure the names is normalized.
 String newFileName = FileUtil.normalizePath(newName);
-String newEndpointPath = FileUtil.normalizePath(endpointPath);
+String newEndpointPath = 
FileUtil.normalizePath(endpointPath.endsWith("" + File.separatorChar) ? 
endpointPath : endpointPath + File.separatorChar);
 
 LOG.trace("Normalized endpointPath: {}", newEndpointPath);
 LOG.trace("Normalized newFileName: ()", newFileName);

http://git-wip-us.apache.org/repos/asf/camel/blob/169b981e/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
 
b/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
new file mode 100644
index 000..a9d8ece
--- /dev/null
+++ 
b/camel-core/src/test/java/org/apache/camel/component/file/FileMoveAndMoveFailedIssueTest.java
@@ -0,0 +1,63 @@
+/**
+ * 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.file;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+
+public class FileMoveAndMoveFailedIssueTest extends ContextTestSupport {
+
+@Override
+protected void setUp() throws Exception {
+deleteDirectory("target/input");
+super.setUp();
+}
+
+public void testMove() throws Exception {
+getMockEndpoint("mock:result").expectedMessageCount(1);
+
getMockEndpoint("mock:result").expectedFileExists("target/input/target/input.bak/somedate/hello.txt");
+
+template.sendBodyAndHeader("file:target/input", "Hello World", 
Exchange.FILE_NAME, "hello.txt");
+
+assertMockEndpointsSatisfied();
+}
+
+public void testMoveFailed() throws Exception {
+getMockEndpoint("mock:result").expectedMessageCount(0);
+
getMockEndpoint("mock:result").expectedFileExists("target/input/target/input.err/somedate/bomb.txt");
+
+template.sendBodyAndHeader("file:target/input", "Kaboom", 
Exchange.FILE_NAME, "bomb.txt");
+
+assertMockEndpointsSatisfied();
+}
+
+@Override
+protected RouteBuilder createRouteBuilder() throws Exception {
+return new RouteBuilder() {
+@Override
+public void configure() throws Exception {
+   

[3/3] camel git commit: CAMEL-9259: Fixed enableTrace on Camel Main. Thanks to Charles Moulliard for spotting this

2015-10-27 Thread davsclaus
CAMEL-9259: Fixed enableTrace on Camel Main. Thanks to Charles Moulliard for 
spotting this


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

Branch: refs/heads/camel-2.15.x
Commit: 7b84f410e7ada3fd98127816279543c66167539d
Parents: 4e10ede
Author: Claus Ibsen 
Authored: Tue Oct 27 12:43:45 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 12:44:24 2015 +0100

--
 .../java/org/apache/camel/main/MainSupport.java|  6 +++---
 .../test/java/org/apache/camel/main/MainTest.java  | 17 +
 2 files changed, 12 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/7b84f410/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/main/MainSupport.java 
b/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
index 4fb30fe..f4dbb0d 100644
--- a/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
+++ b/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
@@ -306,9 +306,6 @@ public abstract class MainSupport extends ServiceSupport {
 
 public void enableTrace() {
 this.trace = true;
-for (CamelContext context : camelContexts) {
-context.setTracing(true);
-}
 }
 
 public void setRoutesOutputFile(String routesOutputFile) {
@@ -470,6 +467,9 @@ public abstract class MainSupport extends ServiceSupport {
 }
 
 protected void postProcessCamelContext(CamelContext camelContext) throws 
Exception {
+if (trace) {
+camelContext.setTracing(true);
+}
 // try to load the route builders from the routeBuilderClasses
 loadRouteBuilders(camelContext);
 for (RouteBuilder routeBuilder : routeBuilders) {

http://git-wip-us.apache.org/repos/asf/camel/blob/7b84f410/camel-core/src/test/java/org/apache/camel/main/MainTest.java
--
diff --git a/camel-core/src/test/java/org/apache/camel/main/MainTest.java 
b/camel-core/src/test/java/org/apache/camel/main/MainTest.java
index 0acfd53..132c5dc 100644
--- a/camel-core/src/test/java/org/apache/camel/main/MainTest.java
+++ b/camel-core/src/test/java/org/apache/camel/main/MainTest.java
@@ -19,11 +19,9 @@ package org.apache.camel.main;
 import java.util.List;
 
 import junit.framework.TestCase;
-
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.impl.DefaultCamelContext;
 
 /**
  * @version 
@@ -34,19 +32,21 @@ public class MainTest extends TestCase {
 // lets make a simple route
 Main main = new Main();
 main.addRouteBuilder(new MyRouteBuilder());
+main.enableTrace();
 main.bind("foo", new Integer(31));
 main.start();
 
-main.getCamelTemplate().sendBody("direct:start", 
"1");
-
 List contextList = main.getCamelContexts();
 assertNotNull(contextList);
 assertEquals("Did not get the expected count of Camel contexts", 1, 
contextList.size());
 CamelContext camelContext = contextList.get(0);
-assertEquals("Could not find the registry bound object", 31, 
((DefaultCamelContext) camelContext).getRegistry().lookupByName("foo"));
+assertEquals("Could not find the registry bound object", 31, 
camelContext.getRegistry().lookupByName("foo"));
 
 MockEndpoint endpoint = camelContext.getEndpoint("mock:results", 
MockEndpoint.class);
 endpoint.expectedMinimumMessageCount(1);
+
+main.getCamelTemplate().sendBody("direct:start", 
"1");
+
 endpoint.assertIsSatisfied();
 
 main.stop();
@@ -57,9 +57,7 @@ public class MainTest extends TestCase {
 // let the main load the MyRouteBuilder
 main.parseArguments(new String[]{"-r", 
"org.apache.camel.main.MainTest$MyRouteBuilder"});
 main.start();
-
-main.getCamelTemplate().sendBody("direct:start", 
"1");
-
+
 List contextList = main.getCamelContexts();
 assertNotNull(contextList);
 assertEquals("Did not get the expected count of Camel contexts", 1, 
contextList.size());
@@ -67,6 +65,9 @@ public class MainTest extends TestCase {
 
 MockEndpoint endpoint = camelContext.getEndpoint("mock:results", 
MockEndpoint.class);
 endpoint.expectedMinimumMessageCount(1);
+
+main.getCamelTemplate().sendBody("direct:start", 
"1");
+
 

[1/3] camel git commit: CAMEL-9259: Fixed enableTrace on Camel Main. Thanks to Charles Moulliard for spotting this

2015-10-27 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x 4e10ede0d -> 7b84f410e
  refs/heads/camel-2.16.x 0bfb0da56 -> ecbde96e1
  refs/heads/master 169b981e4 -> aacce6c53


CAMEL-9259: Fixed enableTrace on Camel Main. Thanks to Charles Moulliard for 
spotting this


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

Branch: refs/heads/master
Commit: aacce6c53a8099f73184180858d6794e4bbc6ecf
Parents: 169b981
Author: Claus Ibsen 
Authored: Tue Oct 27 12:43:45 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 12:43:45 2015 +0100

--
 .../java/org/apache/camel/main/MainSupport.java|  6 +++---
 .../test/java/org/apache/camel/main/MainTest.java  | 17 +
 2 files changed, 12 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/aacce6c5/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/main/MainSupport.java 
b/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
index ab403d9..eb151ec 100644
--- a/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
+++ b/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
@@ -308,9 +308,6 @@ public abstract class MainSupport extends ServiceSupport {
 
 public void enableTrace() {
 this.trace = true;
-for (CamelContext context : camelContexts) {
-context.setTracing(true);
-}
 }
 
 protected void doStop() throws Exception {
@@ -419,6 +416,9 @@ public abstract class MainSupport extends ServiceSupport {
 }
 
 protected void postProcessCamelContext(CamelContext camelContext) throws 
Exception {
+if (trace) {
+camelContext.setTracing(true);
+}
 // try to load the route builders from the routeBuilderClasses
 loadRouteBuilders(camelContext);
 for (RouteBuilder routeBuilder : routeBuilders) {

http://git-wip-us.apache.org/repos/asf/camel/blob/aacce6c5/camel-core/src/test/java/org/apache/camel/main/MainTest.java
--
diff --git a/camel-core/src/test/java/org/apache/camel/main/MainTest.java 
b/camel-core/src/test/java/org/apache/camel/main/MainTest.java
index 0acfd53..132c5dc 100644
--- a/camel-core/src/test/java/org/apache/camel/main/MainTest.java
+++ b/camel-core/src/test/java/org/apache/camel/main/MainTest.java
@@ -19,11 +19,9 @@ package org.apache.camel.main;
 import java.util.List;
 
 import junit.framework.TestCase;
-
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.impl.DefaultCamelContext;
 
 /**
  * @version 
@@ -34,19 +32,21 @@ public class MainTest extends TestCase {
 // lets make a simple route
 Main main = new Main();
 main.addRouteBuilder(new MyRouteBuilder());
+main.enableTrace();
 main.bind("foo", new Integer(31));
 main.start();
 
-main.getCamelTemplate().sendBody("direct:start", 
"1");
-
 List contextList = main.getCamelContexts();
 assertNotNull(contextList);
 assertEquals("Did not get the expected count of Camel contexts", 1, 
contextList.size());
 CamelContext camelContext = contextList.get(0);
-assertEquals("Could not find the registry bound object", 31, 
((DefaultCamelContext) camelContext).getRegistry().lookupByName("foo"));
+assertEquals("Could not find the registry bound object", 31, 
camelContext.getRegistry().lookupByName("foo"));
 
 MockEndpoint endpoint = camelContext.getEndpoint("mock:results", 
MockEndpoint.class);
 endpoint.expectedMinimumMessageCount(1);
+
+main.getCamelTemplate().sendBody("direct:start", 
"1");
+
 endpoint.assertIsSatisfied();
 
 main.stop();
@@ -57,9 +57,7 @@ public class MainTest extends TestCase {
 // let the main load the MyRouteBuilder
 main.parseArguments(new String[]{"-r", 
"org.apache.camel.main.MainTest$MyRouteBuilder"});
 main.start();
-
-main.getCamelTemplate().sendBody("direct:start", 
"1");
-
+
 List contextList = main.getCamelContexts();
 assertNotNull(contextList);
 assertEquals("Did not get the expected count of Camel contexts", 1, 
contextList.size());
@@ -67,6 +65,9 @@ public class MainTest extends TestCase {
 
 MockEndpoint endpoint = camelContext.getEndpoint("mock:results", 

[2/3] camel git commit: CAMEL-9259: Fixed enableTrace on Camel Main. Thanks to Charles Moulliard for spotting this

2015-10-27 Thread davsclaus
CAMEL-9259: Fixed enableTrace on Camel Main. Thanks to Charles Moulliard for 
spotting this


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

Branch: refs/heads/camel-2.16.x
Commit: ecbde96e17825dc8617c51acaeb1e680dcba3cb5
Parents: 0bfb0da
Author: Claus Ibsen 
Authored: Tue Oct 27 12:43:45 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 12:44:14 2015 +0100

--
 .../java/org/apache/camel/main/MainSupport.java|  6 +++---
 .../test/java/org/apache/camel/main/MainTest.java  | 17 +
 2 files changed, 12 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/ecbde96e/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/main/MainSupport.java 
b/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
index ab403d9..eb151ec 100644
--- a/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
+++ b/camel-core/src/main/java/org/apache/camel/main/MainSupport.java
@@ -308,9 +308,6 @@ public abstract class MainSupport extends ServiceSupport {
 
 public void enableTrace() {
 this.trace = true;
-for (CamelContext context : camelContexts) {
-context.setTracing(true);
-}
 }
 
 protected void doStop() throws Exception {
@@ -419,6 +416,9 @@ public abstract class MainSupport extends ServiceSupport {
 }
 
 protected void postProcessCamelContext(CamelContext camelContext) throws 
Exception {
+if (trace) {
+camelContext.setTracing(true);
+}
 // try to load the route builders from the routeBuilderClasses
 loadRouteBuilders(camelContext);
 for (RouteBuilder routeBuilder : routeBuilders) {

http://git-wip-us.apache.org/repos/asf/camel/blob/ecbde96e/camel-core/src/test/java/org/apache/camel/main/MainTest.java
--
diff --git a/camel-core/src/test/java/org/apache/camel/main/MainTest.java 
b/camel-core/src/test/java/org/apache/camel/main/MainTest.java
index 0acfd53..132c5dc 100644
--- a/camel-core/src/test/java/org/apache/camel/main/MainTest.java
+++ b/camel-core/src/test/java/org/apache/camel/main/MainTest.java
@@ -19,11 +19,9 @@ package org.apache.camel.main;
 import java.util.List;
 
 import junit.framework.TestCase;
-
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.impl.DefaultCamelContext;
 
 /**
  * @version 
@@ -34,19 +32,21 @@ public class MainTest extends TestCase {
 // lets make a simple route
 Main main = new Main();
 main.addRouteBuilder(new MyRouteBuilder());
+main.enableTrace();
 main.bind("foo", new Integer(31));
 main.start();
 
-main.getCamelTemplate().sendBody("direct:start", 
"1");
-
 List contextList = main.getCamelContexts();
 assertNotNull(contextList);
 assertEquals("Did not get the expected count of Camel contexts", 1, 
contextList.size());
 CamelContext camelContext = contextList.get(0);
-assertEquals("Could not find the registry bound object", 31, 
((DefaultCamelContext) camelContext).getRegistry().lookupByName("foo"));
+assertEquals("Could not find the registry bound object", 31, 
camelContext.getRegistry().lookupByName("foo"));
 
 MockEndpoint endpoint = camelContext.getEndpoint("mock:results", 
MockEndpoint.class);
 endpoint.expectedMinimumMessageCount(1);
+
+main.getCamelTemplate().sendBody("direct:start", 
"1");
+
 endpoint.assertIsSatisfied();
 
 main.stop();
@@ -57,9 +57,7 @@ public class MainTest extends TestCase {
 // let the main load the MyRouteBuilder
 main.parseArguments(new String[]{"-r", 
"org.apache.camel.main.MainTest$MyRouteBuilder"});
 main.start();
-
-main.getCamelTemplate().sendBody("direct:start", 
"1");
-
+
 List contextList = main.getCamelContexts();
 assertNotNull(contextList);
 assertEquals("Did not get the expected count of Camel contexts", 1, 
contextList.size());
@@ -67,6 +65,9 @@ public class MainTest extends TestCase {
 
 MockEndpoint endpoint = camelContext.getEndpoint("mock:results", 
MockEndpoint.class);
 endpoint.expectedMinimumMessageCount(1);
+
+main.getCamelTemplate().sendBody("direct:start", 
"1");
+
 endpoint.assertIsSatisfied();
 

[1/2] camel git commit: Update reflections bundle

2015-10-27 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x ecbde96e1 -> 7caa9bbdd
  refs/heads/master aacce6c53 -> d461a3d57


Update reflections bundle


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

Branch: refs/heads/master
Commit: d461a3d57ee7eee4b70e01e7637e0cca31c66c40
Parents: aacce6c
Author: Claus Ibsen 
Authored: Tue Oct 27 13:24:31 2015 +0100
Committer: Claus Ibsen 
Committed: Tue Oct 27 13:24:31 2015 +0100

--
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d461a3d5/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index d988015..d63c987 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -421,7 +421,7 @@
 2.2.2
 1.6.0_1
 3.5.6
-0.9.10_1
+0.9.10_2
 1.4_1
 2.3.1
 1.7R2_3



[1/3] camel git commit: Upgrade Undertow to version 1.3.3.Final

2015-10-27 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/master bc11cef69 -> c0ff13750


Upgrade Undertow to version 1.3.3.Final


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

Branch: refs/heads/master
Commit: 463b9feb5754e7198bcc10c7a24ef77fab299cae
Parents: bc11cef
Author: Andrea Cosentino 
Authored: Tue Oct 27 16:53:37 2015 +0100
Committer: Andrea Cosentino 
Committed: Tue Oct 27 16:53:38 2015 +0100

--
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/463b9feb/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index d63c987..3d01149 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -506,7 +506,7 @@
 6.8.21
 4.0.4_1
 4.0.4
-1.3.0.Final
+1.3.3.Final
 1.5.6
 
2015-01-27T15-02-14
 
1.0.0



[3/3] camel git commit: Upgrade Weld to version 2.3.1.Final

2015-10-27 Thread acosentino
Upgrade Weld to version 2.3.1.Final


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

Branch: refs/heads/master
Commit: c0ff137506ae1ee2fa640afa50a8b6fff530de99
Parents: f39dc0b
Author: Andrea Cosentino 
Authored: Tue Oct 27 17:03:37 2015 +0100
Committer: Andrea Cosentino 
Committed: Tue Oct 27 17:09:04 2015 +0100

--
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c0ff1375/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 4c761f4..eda6610 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -518,7 +518,7 @@
 1.7
 3.1.0
 0.7
-2.3.0.Final
+2.3.1.Final
 0.9.4_5
 4.4.1
 1.0.2_2



[2/3] camel git commit: Upgrade Apache Classmate to version 1.3.1

2015-10-27 Thread acosentino
Upgrade Apache Classmate to version 1.3.1


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

Branch: refs/heads/master
Commit: f39dc0ba4f3651e72c1300ff6a9d7b429f565b22
Parents: 463b9fe
Author: Andrea Cosentino 
Authored: Tue Oct 27 16:57:39 2015 +0100
Committer: Andrea Cosentino 
Committed: Tue Oct 27 17:02:57 2015 +0100

--
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f39dc0ba/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 3d01149..4c761f4 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -90,7 +90,7 @@
 3.1_1
 3.1
 3.0.1
-1.3.0
+1.3.1
 0.13.0
 6.1.11
 2.4.3



svn commit: r970381 [1/2] - in /websites/production/camel/content: activemq.html book-component-appendix.html book-in-one-page.html cache/main.pageCache

2015-10-27 Thread buildbot
Author: buildbot
Date: Tue Oct 27 15:21:50 2015
New Revision: 970381

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/activemq.html
websites/production/camel/content/book-component-appendix.html
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/cache/main.pageCache

Modified: websites/production/camel/content/activemq.html
==
--- websites/production/camel/content/activemq.html (original)
+++ websites/production/camel/content/activemq.html Tue Oct 27 15:21:50 2015
@@ -41,7 +41,6 @@
   
   
   
-  
   
   
   SyntaxHighlighter.defaults['toolbar'] = false;
@@ -86,69 +85,23 @@

 
 
-

ActiveMQ Component

- -

The ActiveMQ component allows messages to be sent to a http://java.sun.com/products/jms/"; rel="nofollow">JMS Queue or Topic or messages to be consumed from a JMS Queue or Topic using http://activemq.apache.org/"; title="The most popular and powerful open source message broker">Apache ActiveMQ.

- -

This component is based on JMS Component and uses Spring's JMS support for declarative transactions, using Spring's JmsTemplate for sending and a MessageListenerContainer for consuming. All the options from the JMS component also applies for this component.

- -

To use this component make sure you have the activemq.jar or activemq-core.jar on your classpath along with any Camel dependencies such as camel-core.jar, camel-spring.jar and camel-jms.jar.

- -

Transacted and caching

-

See section Transactions and Cache Levels below on JMS page if you are using transactions with JMS as it can impact performance.

- -

URI format

- -
-