On Sun, Mar 17, 2013 at 11:19 AM, helander <leh...@gmail.com> 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: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to