According to this article, you can use the AbstractRoutingDataSource from Spring Framework to dynamically change the data source used by the application.
I have implemented this approach for 30 datasources and they are currently running in a Production environment without any issues. If you are using JPA you can have a look at my config: