Author: davsclaus
Date: Sat Aug 27 08:02:25 2011
New Revision: 1162310
URL: http://svn.apache.org/viewvc?rev=1162310&view=rev
Log:
Merged revisions 1162309 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
Modified:
camel/branches/camel-2.8.x/ (props changed)
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/LoggingExceptionHandler.java
Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Aug 27 08:02:25 2011
@@ -1 +1 @@
-/camel/trunk:1150651,1151054,1155230,1156108,1156260,1156524,1157348,1157798,1157831,1157878,1158153,1159171,1159174,1159457,1159460,1159606,1159867,1160547,1160637,1161010,1161082,1161524
+/camel/trunk:1150651,1151054,1155230,1156108,1156260,1156524,1157348,1157798,1157831,1157878,1158153,1159171,1159174,1159457,1159460,1159606,1159867,1160547,1160637,1161010,1161082,1161524,1162309
Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java?rev=1162310&r1=1162309&r2=1162310&view=diff
==============================================================================
---
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java
(original)
+++
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/file/GenericFileOnCompletion.java
Sat Aug 27 08:02:25 2011
@@ -17,6 +17,7 @@
package org.apache.camel.component.file;
import org.apache.camel.Exchange;
+import org.apache.camel.LoggingLevel;
import org.apache.camel.impl.LoggingExceptionHandler;
import org.apache.camel.spi.ExceptionHandler;
import org.apache.camel.spi.Synchronization;
@@ -81,12 +82,8 @@ public class GenericFileOnCompletion<T>
// commit the file strategy if there was no failure or already
handled by the DeadLetterChannel
processStrategyCommit(processStrategy, exchange, file);
committed = true;
- } else {
- if (exchange.getException() != null) {
- // if the failure was an exception then handle it
- handleException(exchange.getException());
- }
}
+ // if we failed, then it will be handled by the rollback in the
finally block below
} finally {
if (!committed) {
processStrategyRollback(processStrategy, exchange, file);
Modified:
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/LoggingExceptionHandler.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/LoggingExceptionHandler.java?rev=1162310&r1=1162309&r2=1162310&view=diff
==============================================================================
---
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/LoggingExceptionHandler.java
(original)
+++
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/LoggingExceptionHandler.java
Sat Aug 27 08:02:25 2011
@@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory;
* A default implementation of {@link ExceptionHandler} which uses a {@link
org.apache.camel.processor.CamelLogger} to
* log the exception.
* <p/>
- * This implementation will by default log the exception with stack trace at
DEBUG level.
+ * This implementation will by default log the exception with stack trace at
ERROR level.
*
* @version
*/
@@ -36,7 +36,11 @@ public class LoggingExceptionHandler imp
private final CamelLogger logger;
public LoggingExceptionHandler(Class<?> ownerType) {
- this(new CamelLogger(LoggerFactory.getLogger(ownerType),
LoggingLevel.DEBUG));
+ this(new CamelLogger(LoggerFactory.getLogger(ownerType),
LoggingLevel.ERROR));
+ }
+
+ public LoggingExceptionHandler(Class<?> ownerType, LoggingLevel level) {
+ this(new CamelLogger(LoggerFactory.getLogger(ownerType), level));
}
public LoggingExceptionHandler(CamelLogger logger) {