I believe beans are used however the container defines them. If you're
using prototype beans, then I'd imagine it creates a new one for every
lookup, but that would depend on how Spring works under the hood.


On 3 September 2014 09:12, rickaroni <rgfa...@directv.com> wrote:

> Hi Claus,
>
> I'm still a bit confused with precisely how the Camel "bean" tag works and
> interacts with Spring prototype beans.
>
> With similar ESB's to Camel, I've seen folks write their own Spring custom
> scope such that the same bean is used from when the input message received
> by the ESB to when the output message sent from the ESB to the next stage.
>
> After reading your great reply to this post
> (http://camel.465427.n5.nabble.com/Bean-s-scope-in-Camel-td5737137.html),
> I
> started thinking that I might not need to write this.
>
> Accordingly, I had some follow-up questions here that I hope are clear:
>
> http://camel.465427.n5.nabble.com/lt-to-quot-bean-xxx-quot-or-not-lt-to-quot-bean-xxx-quot-Getting-clarity-on-bean-scope-td5754593.html
>
> Basically, if I have a spring prototype bean declared in my spring config
> (e.g. myAwesomeBean), and multiple calls to it in one or more routes (e.g.
> calls to myBeanMethod2, 3, and 4 in ROUTE2 and ROUTE3), is the same bean
> instance used throughout???
>
> Where can I look to get a better understanding of Camel "bean" tag usage
> (or
> use of a bean as a "to" destination) and the lifetime of a Spring
> "prototype" bean within a Camel route??
>
> Many thanks in advance for any help you can offer.
>
> Rick
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Claus-Need-better-understanding-of-Camel-bean-tag-usage-with-Spring-prototype-beans-tp5756009.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Matt Sicker <boa...@gmail.com>

Reply via email to