Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

OnCompletion and rollbacked transaction.

$
0
0
Hi,

I'm facing a problem using OnCompletion and a Transacted route.
Let me show an example:

this.from("servlet:///test").routeId("CamelTestRoute")
.onCompletion()
.bean(this.logCompletionRoute)
.end()
.onException(Exception.class)
.log(LoggingLevel.ERROR, this.log, "Error on processing
message. Sending Rollback command!")
.log(LoggingLevel.ERROR, this.log,
"${exception.stacktrace}")
*/.rollback()/*
.handled(true)
.end()
.transacted(RouteTransactionConfiguration.PROPAGATION_REQUIRED)
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
throw new Exception();
}});

When I use the "rollback()" method, the logCompletionRoute bean is not
executed. When a erase that line the onCompletion bean is executed at the
route's end.

Is it a bug or a wrong configuration (or understanding)?

Thanks,

André Souza

Viewing all articles
Browse latest Browse all 5648

Trending Articles