Claus, thank you very much for the feedback. Regarding sending an exchange to another context I was thinking about when you use the camel-context component. Is your statement about ONLY still valid , considering that case?
I read somewhere (think it was in "Camel in Action") that UnitOfWork is bound to route, but that it is bound to Exchange makes more sense :). Thanks Lars Skickat från min iPhone 18 mar 2013 kl. 09:26 skrev Claus Ibsen <[email protected]>: > On Sun, Mar 17, 2013 at 11:19 AM, helander <[email protected]> wrote: >> Can someone clarify the following: >> >> When an exhange is passed between routes, e.g. using "direct" or >> "direct-vm", is then a new exhange created or is it the same exhange that >> will be used in the "target" route? > > Its the same. > > > >> If it is the latter, will the context bound to the exhange be updated or >> will it retain its binding to the original context (if the two routes are >> from different contexts)? > > The direct component can ONLY be used within the same CamelContext. > > The direct-vm is a bit special, and was created to aid the osgi > people. So you can comminication between CamelContexts' running in the > same JVM container. > > The direct-vm will update the exchange content to bind it to the > current CamelContext. And restore it when returning etc. Though that > improvement was done recently - there is a JIRA somewhere. > >> Reading about UnitOfWork, I understood that the unit of work is bound to an >> exchange within a single route, is there some way to create a unit of work >> that would cover multiple ruotes thar are "connected" to the same "exchange" >> (e.g. via "direct" or "direct-vm") ? > > No the UoW is bound to the exchange lifecycle, and is done when the > Exchange is done, (eg when its routing is fully done). > > > >> Thanks >> >> Lars >> >> >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/Exchange-lifecycle-tp5729310.html >> Sent from the Camel - Users mailing list archive at Nabble.com. > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > FuseSource is now part of Red Hat > Email: [email protected] > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen
