Hi,
Thanks for the reply.We are able to achieve the complete Exchange rollback
by shareUnitOfWork option on splitter with camel-core-9.2.0 when an
exception occurs during unmarshalling. And further spillting of exchange
stops.But all the exchange's before unmarshaller exception still aggregates
and invokes my endpoint("direct:sub") which takes care of DB Insertions.I
want to achieve rollback of these exchange from DB as well.
Note: I am able to rollback the DB insertions in case of any SQL exception
using transacted().
My current route now looks like
from( "seda:xyz”)
.onException(Exception.class).maximumRedeliveries(0).rollback()
.end()
.transacted()
.split(new SplitterExpression(inputFile)).shareUnitOfWork()
.streaming()
.stopOnException()
.transform( new Unmarshaller()) .aggregate(aggregationStrategy)
.completionSize(10)
.completionTimeout(2000)
.eagerCheckCompletion()
.to("direct:sub”)
from("direct:sub")
.transacted()
.choice()
.when(condition1).process( new myBean(myDAO))
.when(condition2).process(new myBean1(myDAO))
--
View this message in context:
http://camel.465427.n5.nabble.com/Unable-to-rollback-exchange-while-unmarshalling-a-file-tp5666851p5692877.html
Sent from the Camel - Users mailing list archive at Nabble.com.