Author: davsclaus
Date: Wed Apr 18 11:31:58 2012
New Revision: 1327449
URL: http://svn.apache.org/viewvc?rev=1327449&view=rev
Log:
CAMEL-5178: File consumer should use exception handler to handle all component
specific exceptions. Add example how to plugin a custom exception handler and
send that to a Camel route so Camel routing onException can deal with the
exception. Reduce the out of the box logging exception handler to WARN level.
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java?rev=1327449&r1=1327448&r2=1327449&view=diff
==============================================================================
---
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java
(original)
+++
camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileConsumerCustomExceptionHandlerTest.java
Wed Apr 18 11:31:58 2012
@@ -56,6 +56,7 @@ public class FileConsumerCustomException
return jndi;
}
+ // START SNIPPET: e2
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@@ -84,6 +85,7 @@ public class FileConsumerCustomException
}
};
}
+ // END SNIPPET: e1
// START SNIPPET: e1
/**
@@ -127,7 +129,6 @@ public class FileConsumerCustomException
}
// END SNIPPET: e1
-
// used for simulating exception during acquiring a lock on the file
private class MyReadLockStrategy implements
GenericFileExclusiveReadLockStrategy {