public class JndiDataSourceLookup extends JndiLocatorSupport implements DataSourceLookup
DataSourceLookup
implementation.
For specific JNDI configuration, it is recommended to configure the "jndiEnvironment"/"jndiTemplate" properties.
JndiAccessor.setJndiEnvironment(java.util.Properties)
,
JndiAccessor.setJndiTemplate(org.springframework.jndi.JndiTemplate)
CONTAINER_PREFIX
logger
Constructor and Description |
---|
JndiDataSourceLookup() |
Modifier and Type | Method and Description |
---|---|
javax.sql.DataSource |
getDataSource(java.lang.String dataSourceName)
Retrieve the DataSource identified by the given name.
|
convertJndiName, isResourceRef, lookup, lookup, setResourceRef
getJndiEnvironment, getJndiTemplate, setJndiEnvironment, setJndiTemplate
public javax.sql.DataSource getDataSource(java.lang.String dataSourceName) throws DataSourceLookupFailureException
DataSourceLookup
getDataSource
in interface DataSourceLookup
dataSourceName
- the name of the DataSourcenull
)DataSourceLookupFailureException
- if the lookup failed