camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickaroni <>
Subject Claus - Need better understanding of Camel "bean" tag usage with Spring prototype beans
Date Wed, 03 Sep 2014 14:12:07 GMT
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
(, I
started thinking that I might not need to write this.

Accordingly, I had some follow-up questions here that I hope are clear:

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.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message