Top Description Fields Constructors Methods
org.springframework.jdbc.datasource.lookup

public Class JndiDataSourceLookup

extends JndiLocatorSupport
implements DataSourceLookup
Class Inheritance
All Implemented Interfaces
org.springframework.jdbc.datasource.lookup.DataSourceLookup
Imports
javax.naming.NamingException, javax.sql.DataSource, org.springframework.jndi.JndiLocatorSupport

JNDI-based DataSourceLookup implementation.

For specific JNDI configuration, it is recommended to configure the "jndiEnvironment"/"jndiTemplate" properties.

Authors
Costin Leau, Juergen Hoeller
Since
2.0
See Also
setJndiEnvironment, setJndiTemplate

Field Summary

Inherited from org.springframework.jndi.JndiLocatorSupport:
CONTAINER_PREFIX

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public DataSource
getDataSource(String
the name of the DataSource
dataSourceName
)

Implements org.springframework.jdbc.datasource.lookup.DataSourceLookup.getDataSource.

Retrieve the DataSource identified by the given name.

Inherited from org.springframework.jndi.JndiLocatorSupport:
convertJndiNameisResourceReflookuplookupsetResourceRef

Constructor Detail

JndiDataSourceLookupback to summary
public JndiDataSourceLookup()

Method Detail

getDataSourceback to summary
public DataSource getDataSource(String dataSourceName) throws DataSourceLookupFailureException

Implements org.springframework.jdbc.datasource.lookup.DataSourceLookup.getDataSource.

Doc from org.springframework.jdbc.datasource.lookup.DataSourceLookup.getDataSource.

Retrieve the DataSource identified by the given name.

Parameters
dataSourceName:String

the name of the DataSource

Returns:DataSource

the DataSource (never null)

Annotations
@Override
Exceptions
DataSourceLookupFailureException:
if the lookup failed