camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From priya <>
Subject Unable to rollback exchange while unmarshalling a file
Date Thu, 26 Apr 2012 06:50:11 GMT
We are having trouble while maintaining the transactions in a route which
involves unmarshalling of a file and then writing its content into DB.
Route is like:

from( "seda:xyz”)
.split(new SplitterExpression(inputFile))
	.transform( new Unmarshaller())		.aggregate(aggregationStrategy)
	.when(condition1).process( new myBean(myDAO))
	.when(condition2).process(new myBean1(myDAO))

// myDAO class deals with insertions and updation of records in DB.

we are able to maintain and rollback JDBC transaction (i.e on any SQL
exception all the DB inserts are rolled back) but 
If any exception occurs while unmarshalling the InputFile say if  we have 20
records in my file and there is an illegal argument present at 15th record
then I am not able to rollback the entire exchange and DB Insertions happens
for first 14 records present in the input file.
Please tell if there is any way to rollback the complete exchange on file
operation Exception and DB rollback also happens for all the records.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message