In Spring, you can set the scope='prototype' on a bean to stop it from
being, effectively, a singleton.
The same may work for your context, but I am not sure.

G'luck.

-mox

On Sat, Jul 20, 2013 at 2:01 PM, SyedBhai <syedahmed.c...@hotmail.com>wrote:

> Hi Guys,
>   I have configured camel context in a spring file.
>   Sample configuration is
>     <camelContext id="c1" xmlns="http://camel.apache.org/schema/spring";>
>      <route>
>       <from uri="direct:start1"/>
>       <to
> uri="http://localhost:8080/AirpostDSP1/webresources/getAd/airportAd"/>
>      </route>
>     </camelContext>
>
>   But I have noticed that if I invoke getBean("c1") method of spring
> application context, I am getting the same object for every call.  I mean
> the hashcode is same.
>
>   I actually want to have a new instance of camel context everytime I
> invoke
> the getBean("c1") method.
>
>   Is it possible?  If yes, how?
>
> Thanks,
> Syed.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/New-Instance-of-CamelContext-from-Spring-tp5735942.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to