2011/11/25 Björn Bength <[email protected]>: > Hi > > a theory: when camel searches for properties, (anything in it's > "registry") it looks in Exchange.getCamelContext... > and as the exchange (when using the vm: component) is created in one > camelcontext and sent by reference to another camel context in the > same jvm, > the second context receives the exchange and then tries to use things > on the camelcontext specified on the exchange.
Yes this is what would happen. The vm component need to create a new Exchange and copy from the previous Exchange to ensure it's properly setup to run in the CamelContext where its hosted. Feel free to create a JIRA ticket. > This has happened a lot to me regarding error handlers and other > components available in one context but not another, but they are then > usable in the context > they are not supposed to be. > Does that make sense? > If, on the other hand, JMS or some other component is used, the first > camel context is not copied by reference to the other context, but the > JMS component > knows it's own camel context. > > /Björn > > > > On Fri, Nov 25, 2011 at 2:45 PM, Claus Ibsen <[email protected]> wrote: >> Hi >> >> Can you paste a sample of the routes you use? >> >> >> >> On Fri, Nov 25, 2011 at 2:03 PM, kudrevatykh <[email protected]> wrote: >>> Hello, today I tried to use properties as defined in examples. >>> And found that with vm: uri when sender uses one context and receiver >>> another, property searched in sender context, instead of receiver, where >>> route is defined. >>> When using activemq anything is fine and properties searched in receiver. >>> camel version is 2.8.1 >>> can anybody explain, why expression parser behave in such way, or, if it >>> unexpexted behaviour create bug in bug tracker :) >>> >>> Thanks, Alexander. >>> >>> -- >>> View this message in context: >>> http://camel.465427.n5.nabble.com/using-vm-with-different-camelContexts-and-property-parser-tp5022731p5022731.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >>> >> >> >> >> -- >> Claus Ibsen >> ----------------- >> FuseSource >> Email: [email protected] >> Web: http://fusesource.com >> Twitter: davsclaus, fusenews >> Blog: http://davsclaus.blogspot.com/ >> Author of Camel in Action: http://www.manning.com/ibsen/ >> > -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
