Visit our blog

News & Events

Blog Entry: Dynamic DataSource Routing

Mark Fisher has written a blog entry on Dynamic DataSource Routing with Spring 2.0's AbstractRoutingDataSource. In most Java applications using DataSources (usually equating to a connection pool), there is one static DataSource, or if there are multiple DataSources, they are static to the DAOs using them. However it is sometimes desireable to be able to dynamically select a DataSoure based on some sort of environmental context, and this article shows one way to achive this.

 

 

Upcoming Training

Newsletter Subscription

Our monthly newsletter is packed full of techniques, tutorials, tips and tricks to get you on your way to Spring nirvana. View Archive