@Deprecated public class LocalDataSourceConnectionProvider extends java.lang.Object implements org.hibernate.connection.ConnectionProvider
AbstractSessionFactoryBean.setDataSource(javax.sql.DataSource)| Constructor and Description | 
|---|
LocalDataSourceConnectionProvider()
Deprecated.  
  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
close()
Deprecated.  
This implementation does nothing:
 We're dealing with an externally managed DataSource. 
 | 
void | 
closeConnection(java.sql.Connection con)
Deprecated.  
This implementation calls  
DataSourceUtils.doCloseConnection(java.sql.Connection, javax.sql.DataSource),
 checking against a SmartDataSource. | 
void | 
configure(java.util.Properties props)
Deprecated.  
  | 
java.sql.Connection | 
getConnection()
Deprecated.  
This implementation delegates to the underlying DataSource. 
 | 
javax.sql.DataSource | 
getDataSource()
Deprecated.  
Return the DataSource that this ConnectionProvider wraps. 
 | 
protected javax.sql.DataSource | 
getDataSourceToUse(javax.sql.DataSource originalDataSource)
Deprecated.  
Return the DataSource to use for retrieving Connections. 
 | 
boolean | 
supportsAggressiveRelease()
Deprecated.  
This implementation returns  
false: We cannot guarantee
 to receive the same Connection within a transaction, not even when
 dealing with a JNDI DataSource. | 
public LocalDataSourceConnectionProvider()
public void configure(java.util.Properties props)
               throws HibernateException
configure in interface org.hibernate.connection.ConnectionProviderHibernateExceptionprotected javax.sql.DataSource getDataSourceToUse(javax.sql.DataSource originalDataSource)
This implementation returns the passed-in DataSource as-is.
originalDataSource - the DataSource as configured by the user
 on LocalSessionFactoryBeanAbstractSessionFactoryBean.setDataSource(javax.sql.DataSource)public javax.sql.DataSource getDataSource()
public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
getConnection in interface org.hibernate.connection.ConnectionProviderjava.sql.SQLExceptionDataSource.getConnection()public void closeConnection(java.sql.Connection con)
                     throws java.sql.SQLException
DataSourceUtils.doCloseConnection(java.sql.Connection, javax.sql.DataSource),
 checking against a SmartDataSource.closeConnection in interface org.hibernate.connection.ConnectionProviderjava.sql.SQLExceptionpublic void close()
close in interface org.hibernate.connection.ConnectionProviderpublic boolean supportsAggressiveRelease()
false: We cannot guarantee
 to receive the same Connection within a transaction, not even when
 dealing with a JNDI DataSource.supportsAggressiveRelease in interface org.hibernate.connection.ConnectionProvider