类 LocalDataSourceConnectionProvider
- java.lang.Object
- org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
- 所有已实现的接口:
org.hibernate.connection.ConnectionProvider
@Deprecated public class LocalDataSourceConnectionProvider extends Object implements org.hibernate.connection.ConnectionProvider
已过时。as of Spring 4.3, in favor of Hibernate 4.x/5.xHibernate connection provider for local DataSource instances in an application context. This provider will be used if LocalSessionFactoryBean's "dataSource" property is set without a Hibernate TransactionManagerLookup.- 从以下版本开始:
- 1.2
- 作者:
- Juergen Hoeller
- 另请参阅:
AbstractSessionFactoryBean.setDataSource(javax.sql.DataSource)
构造器概要
构造器 构造器 说明 LocalDataSourceConnectionProvider()
已过时。
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 void
close()
已过时。This implementation does nothing: We're dealing with an externally managed DataSource.void
closeConnection(Connection con)
已过时。This implementation callsDataSourceUtils.doCloseConnection(java.sql.Connection, javax.sql.DataSource)
, checking against aSmartDataSource
.void
configure(Properties props)
已过时。Connection
getConnection()
已过时。This implementation delegates to the underlying DataSource.DataSource
getDataSource()
已过时。Return the DataSource that this ConnectionProvider wraps.protected DataSource
getDataSourceToUse(DataSource originalDataSource)
已过时。Return the DataSource to use for retrieving Connections.boolean
supportsAggressiveRelease()
已过时。This implementation returnsfalse
: We cannot guarantee to receive the same Connection within a transaction, not even when dealing with a JNDI DataSource.
构造器详细资料
LocalDataSourceConnectionProvider
public LocalDataSourceConnectionProvider()
已过时。
方法详细资料
configure
public void configure(Properties props) throws HibernateException
已过时。- 指定者:
configure
在接口中org.hibernate.connection.ConnectionProvider
- 抛出:
HibernateException
getDataSourceToUse
protected DataSource getDataSourceToUse(DataSource originalDataSource)
已过时。Return the DataSource to use for retrieving Connections.This implementation returns the passed-in DataSource as-is.
- 参数:
originalDataSource
- the DataSource as configured by the user on LocalSessionFactoryBean- 返回:
- the DataSource to actually retrieve Connections from (potentially wrapped)
- 另请参阅:
AbstractSessionFactoryBean.setDataSource(javax.sql.DataSource)
getDataSource
public DataSource getDataSource()
已过时。Return the DataSource that this ConnectionProvider wraps.
getConnection
public Connection getConnection() throws SQLException
已过时。This implementation delegates to the underlying DataSource.- 指定者:
getConnection
在接口中org.hibernate.connection.ConnectionProvider
- 抛出:
SQLException
- 另请参阅:
DataSource.getConnection()
closeConnection
public void closeConnection(Connection con) throws SQLException
已过时。This implementation callsDataSourceUtils.doCloseConnection(java.sql.Connection, javax.sql.DataSource)
, checking against aSmartDataSource
.- 指定者:
closeConnection
在接口中org.hibernate.connection.ConnectionProvider
- 抛出:
SQLException
close
public void close()
已过时。This implementation does nothing: We're dealing with an externally managed DataSource.- 指定者:
close
在接口中org.hibernate.connection.ConnectionProvider
supportsAggressiveRelease
public boolean supportsAggressiveRelease()
已过时。This implementation returnsfalse
: We cannot guarantee to receive the same Connection within a transaction, not even when dealing with a JNDI DataSource.- 指定者:
supportsAggressiveRelease
在接口中org.hibernate.connection.ConnectionProvider