@FunctionalInterface
public interface DataSourceLookup
Used, for example, to resolve data source names in JPA
persistence.xml
files.
DefaultPersistenceUnitManager.setDataSourceLookup(org.springframework.jdbc.datasource.lookup.DataSourceLookup)
Modifier and Type | Method and Description |
---|---|
javax.sql.DataSource |
getDataSource(java.lang.String dataSourceName)
Retrieve the DataSource identified by the given name.
|
javax.sql.DataSource getDataSource(java.lang.String dataSourceName) throws DataSourceLookupFailureException
dataSourceName
- the name of the DataSourcenull
)DataSourceLookupFailureException
- if the lookup failed