org.springframework.orm.hibernate
Class LocalDataSourceConnectionProvider
java.lang.Object
   org.springframework.orm.hibernate.LocalDataSourceConnectionProvider
org.springframework.orm.hibernate.LocalDataSourceConnectionProvider
- All Implemented Interfaces: 
- net.sf.hibernate.connection.ConnectionProvider
- public class LocalDataSourceConnectionProvider- extends java.lang.Object- implements net.sf.hibernate.connection.ConnectionProvider
Hibernate connection provider for local DataSource instances
 in an application context. This provider will be used if
 LocalSessionFactoryBean's "dataSource" property is set.
- Since:
- 11.07.2003
- Author:
- Juergen Hoeller
- See Also:
- LocalSessionFactoryBean.setDataSource(javax.sql.DataSource)
| Field Summary | 
| protected static java.lang.ThreadLocal | configTimeDataSourceHolderThis will hold the DataSource to use for the currently configured
 Hibernate SessionFactory.
 | 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
configTimeDataSourceHolder
protected static java.lang.ThreadLocal configTimeDataSourceHolder
- This will hold the DataSource to use for the currently configured
 Hibernate SessionFactory. It will be set just before initialization
 of the respective SessionFactory, and reset immediately afterwards.
 
 
LocalDataSourceConnectionProvider
public LocalDataSourceConnectionProvider()
configure
public void configure(java.util.Properties props)
               throws net.sf.hibernate.HibernateException
- 
- Specified by:
- configurein interface- net.sf.hibernate.connection.ConnectionProvider
 
- 
- Throws:
- net.sf.hibernate.HibernateException
 
getDataSource
public javax.sql.DataSource getDataSource()
- Return the DataSource that this ConnectionProvider wraps.
 
- 
 
- 
 
getConnection
public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
- 
- Specified by:
- getConnectionin interface- net.sf.hibernate.connection.ConnectionProvider
 
- 
- Throws:
- java.sql.SQLException
 
closeConnection
public void closeConnection(java.sql.Connection conn)
                     throws java.sql.SQLException
- 
- Specified by:
- closeConnectionin interface- net.sf.hibernate.connection.ConnectionProvider
 
- 
- Throws:
- java.sql.SQLException
 
isStatementCache
public boolean isStatementCache()
- Only used in Hibernate 2.0's ConnectionProvider.
 
- 
 
- 
 
close
public void close()
- 
- Specified by:
- closein interface- net.sf.hibernate.connection.ConnectionProvider
 
- 
 
Copyright (C) 2003-2004 The Spring Framework Project.