You can define a factory bean to instantiate the data source.
When the object export with the name A, camel can look it up from the Spring 
application context.

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On November 20, 2014 at 1:21:38 PM, Camel Guy (ca...@devguy.com) wrote:
> Hello,
>  
> I was wondering if a route could invoke a bean (or run, say, a groovy
> script) that registered a new datasource.
>  
> Something like:
>  
> route ::
> 1) Instantiate datasource
> 2) Add datasource instance to the registry under key A
> 3) recipientList("jdbc:A?...")
>  
> This datasource needs to be created long after Camel starts up.
>  
> I'm using Spring XML.
>  
>  
> Thank you,
> ~cg
>  

Reply via email to