Abstract DataSource implementation that routes getConnection()
calls to one of various target DataSources based on a lookup key. The latter is usually
(but not necessarily) determined through some thread-bound transaction context.
public void setTargetDataSources(java.util.Map<java.lang.Object,java.lang.Object> targetDataSources)
Specify the map of target DataSources, with the lookup key as key.
The mapped value can either be a corresponding DataSource
instance or a data source name String (to be resolved via a