See the cache option on the bean component

On Tue, Aug 4, 2015 at 9:33 PM, Christian Müller
<[email protected]> wrote:
> 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?
>
> Best,
> Christian
> -----------------
>
> Software Integration Specialist
>
> Apache Member
> V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer
> Apache Incubator PMC Member
>
> https://www.linkedin.com/pub/christian-mueller/11/551/642
>
> On Tue, Aug 4, 2015 at 1:40 PM, fxthomas <[email protected]> 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:
>> http://camel.465427.n5.nabble.com/Some-Stupid-Questions-tp5770217p5770275.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2

Reply via email to