类 JndiDataSourceLookup
- java.lang.Object
- org.springframework.jndi.JndiAccessor
- org.springframework.jndi.JndiLocatorSupport
- org.springframework.jdbc.datasource.lookup.JndiDataSourceLookup
- 所有已实现的接口:
DataSourceLookup
public class JndiDataSourceLookup extends JndiLocatorSupport implements DataSourceLookup
JNDI-basedDataSourceLookup
implementation.For specific JNDI configuration, it is recommended to configure the "jndiEnvironment"/"jndiTemplate" properties.
- 从以下版本开始:
- 2.0
- 作者:
- Costin Leau, Juergen Hoeller
- 另请参阅:
JndiAccessor.setJndiEnvironment(java.util.Properties)
,JndiAccessor.setJndiTemplate(org.springframework.jndi.JndiTemplate)
字段概要
从类继承的字段 org.springframework.jndi.JndiLocatorSupport
CONTAINER_PREFIX
从类继承的字段 org.springframework.jndi.JndiAccessor
logger
构造器概要
构造器 构造器 说明 JndiDataSourceLookup()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 DataSource
getDataSource(String dataSourceName)
Retrieve the DataSource identified by the given name.从类继承的方法 org.springframework.jndi.JndiLocatorSupport
convertJndiName, isResourceRef, lookup, lookup, setResourceRef
从类继承的方法 org.springframework.jndi.JndiAccessor
getJndiEnvironment, getJndiTemplate, setJndiEnvironment, setJndiTemplate
构造器详细资料
JndiDataSourceLookup
public JndiDataSourceLookup()
方法详细资料
getDataSource
public DataSource getDataSource(String dataSourceName) throws DataSourceLookupFailureException
从接口复制的说明:DataSourceLookup
Retrieve the DataSource identified by the given name.- 指定者:
getDataSource
在接口中DataSourceLookup
- 参数:
dataSourceName
- the name of the DataSource- 返回:
- the DataSource (never
null
) - 抛出:
DataSourceLookupFailureException
- if the lookup failed