org.ow2.jonas.camel.component
Class FailureResistentExceptionHandlerProcessor
java.lang.Object
org.ow2.jonas.camel.component.FailureResistentExceptionHandlerProcessor
- All Implemented Interfaces:
- org.apache.camel.Processor
public class FailureResistentExceptionHandlerProcessor
- extends Object
- implements org.apache.camel.Processor
Camel processor for error handling which is resistent to failures.
Let's assume a route like the following:
from("file:///a?delete=true").to("file:///b");
onException(Throwable.class).handled(true).to("file:///data/error");
If for some reason the /data/error folder is not accessible, the
onException clause will stop; but will have set
handled to true. As a result, the file will be
LOST.
In order to avoid such a case, this processor handles such failures and makes
sure the file in folder /a stays there after the failure (as a
result, stays "not processed yet").
FailureResistentExceptionHandlerProcessor
public FailureResistentExceptionHandlerProcessor(String destination)
process
public void process(org.apache.camel.Exchange exchange)
throws Exception
- Specified by:
process in interface org.apache.camel.Processor
- Throws:
Exception
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2013 OW2 Consortium. All Rights Reserved.