Hi,

I would like to know if the following routes are equivalent in term of
transaction/rollback strategy (for file component, DB insert/update, ...)
when they are linked using direct endpoint or without ? More precisely I
would like to know if direct endpoint is a cosmetic one or made some
restrictions on transaction propagation, error handling, ... ?

from(file)
.transacted()
.doTry()
    .to(beanA)
    .to(beanB)
    .to(directAA)
.doCatch()
    .exception()
    .to(log)
    .rollback()

from(directAA)
.doTry()
    .to(beanC)
    .to(beanD)
    .to(QueueZZ)
.doCatch()
    .exception()
    .to(log)
    .rollback() // if error occurs during bean process execution (C, D) then
rollback is done on bean A, B, C, D and file is not deleted

OR

from(file)
.transacted()
.doTry()
    .to(beanA)
    .to(beanB)
    .to(directAA)
    .to(beanC)
    .to(beanD)
    .to(QueueZZ)
.doCatch()
    .exception()
    .to(log)
    .rollback()

Could they be written in an equivalent way ?

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com

Reply via email to