Hello all, I'm looking at using Spring's new-ish AbstractRoutingDataSource to hit multiple DataSources with iBATIS. I think it'll work fine in terms of routing to the right DataSource via a ThreadLocal, but I'm concerned about the iBATIS caching mechanism.
Specifically, it seems to me that if I have a single SqlMapClientFactoryBean with RoutingDataSource as the DataSource, the cache in the SqlMapClient won't know which 'real' DataSource the results came from and mix them all together. So if the databases in question have the same schemas and some overlapping OIDs, the cache would be messed up. Does that sound about right? Is there a way to avoid that other than not using cache? Is there a better way to use Spring and iBATIS with multiple DataSources? Thanks, Chris