Hmm... I wonder if it would be possible to update the datasource mapping
later? Its true that I don't know the datasources at init time but I do know
them as soon as the first servlet class is loaded. Can the targetDataSource
Map get updated after the AbstractRoutingDataSource has been created?

Paul

Chris Lamey wrote:
> 
> Yea, Spring has a new AbstractRoutingDataSource that can route to a
> different datasource based on a ThreadLocal.  The problem is that the
> iBATIS SqlMapClient doesn't know the datasource isn't the same between
> calls, so your caching gets horked.
> 
> I don't know if it'll work for you because your datasources have to be
> known in advance and it sounds like yours may not be.
> 
> Cheers,
> Chris
> 


-- 
View this message in context: 
http://www.nabble.com/How-can-I-change-datasource-connect-info-on-the-fly-w-iBATIS-and-Spring--tf3573169.html#a10043460
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Reply via email to