Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

New Instance of CamelContext from Spring

$
0
0
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.

Viewing all articles
Browse latest Browse all 5648

Latest Images

Trending Articles



Latest Images