The key can be of arbitrary type; this class implements the generic lookup process only.
Allows for arbitrary keys. The returned key needs to match the stored lookup key type, as resolved by the AbstractRoutingDataSource.resolveSpecifiedLookupKey method.
The default implementation handles DataSource instances and data source names (to be resolved via a AbstractRoutingDataSource.setDataSourceLookup DataSourceLookup ). Parameters: dataSource - the data source value object as specified in theAbstractRoutingDataSource.setTargetDataSources targetDataSources map the resolved DataSource (never null)throws: IllegalArgumentException - in case of an unsupported value type
null
The default implementation simply returns the given key as-is. Parameters: lookupKey - the lookup key object as specified by the user the lookup key as needed for matching
Default is a JndiDataSourceLookup , allowing the JNDI names of application server DataSources to be specified directly.
This DataSource will be used as target if none of the keyed AbstractRoutingDataSource.setTargetDataSources targetDataSources match the AbstractRoutingDataSource.determineCurrentLookupKey() current lookup key}.
The key can be of arbitrary type; this class implements the generic lookup process only. The concrete key representation will be handled by AbstractRoutingDataSource.resolveSpecifiedLookupKey(Object) and AbstractRoutingDataSource.determineCurrentLookupKey() .