On Tue, May 29, 2012 at 2:44 PM, cgiera <christoph.gi...@mic-cust.com> wrote: > > Claus Ibsen-2 wrote >> >> When using .bean in the DSL, then the bean is looked up / created once >> / etc when the route is being initialized / started. >> And thus there is no thread safe issue at runtime, as the beans is >> already created. >> >> When using bean with a class type, the bean is created once (eg >> singleton scope). >> And that is by design. >> >> If you want prototype scope or something like that, then use a beanRef >> and refer to a bean in a bean container that supports that such as >> spring etc. >> >> > Yes, I use beanRef, but when I use the cxf-Endpoint I still have multi > threading problems. The method RegistryBean.getBean() is - as i mentioned > above - not thread safe I think. > > Do you agree with that, or is something wrong with my assumptions? >
You use an old version of Camel. You can upgrade to have this fixed. When Camel start the routes it initializes the resources and thus also bean / beanRef, where it will setup this logic. That logic runs single threaded. > kind regards, > Christoph > > -- > View this message in context: > http://camel.465427.n5.nabble.com/ClassCastException-using-cxf-bean-tp5599810p5713678.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen