camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <>
Subject Re: Some Stupid Questions
Date Tue, 04 Aug 2015 19:33:26 GMT
It will create a new instance for each call to the registry. But if you
inject this bean to another bean (which has the singleton scope), than
there is only one instance of this bean.
A workaround could be to call the registry by yourself to get a fresh copy
of this bean.
The solution is to make your bean thread safe. What kind of state do you
have to maintain?


Software Integration Specialist

Apache Member
V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
Apache Incubator PMC Member

On Tue, Aug 4, 2015 at 1:40 PM, fxthomas <> wrote:

> Thanks for your answers I will try them out whatever possible.
> I tried the Below things too.
> 1) I checked the bean construction the saw that it being created only once
> so i change the bean defination to below
> <bean id="CustomProcessorCSV" class="com.XXXX.CustomProcessor"
> scope="prototype">
>       <constructor-arg value="CSV"/>
>     </bean
> But still I see only one Instance being created on the Logs, isn',t scope
> prototype supposed to return from registry a new instance so in turn it
> should create multiple instance of the bean. Hope my understanding  is okay
> ?
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message