org.springframework.orm.hibernate
Class LocalDataSourceConnectionProvider

java.lang.Object
  extended byorg.springframework.orm.hibernate.LocalDataSourceConnectionProvider
All Implemented Interfaces:
ConnectionProvider

public class LocalDataSourceConnectionProvider
extends Object
implements 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)

Constructor Summary
LocalDataSourceConnectionProvider()
           
 
Method Summary
 void close()
           
 void closeConnection(Connection conn)
           
 void configure(Properties props)
           
 Connection getConnection()
           
 DataSource getDataSource()
          Return the DataSource that this ConnectionProvider wraps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalDataSourceConnectionProvider

public LocalDataSourceConnectionProvider()
Method Detail

configure

public void configure(Properties props)
               throws HibernateException
Specified by:
configure in interface ConnectionProvider
Throws:
HibernateException

getDataSource

public DataSource getDataSource()
Return the DataSource that this ConnectionProvider wraps.


getConnection

public Connection getConnection()
                         throws SQLException
Specified by:
getConnection in interface ConnectionProvider
Throws:
SQLException

closeConnection

public void closeConnection(Connection conn)
                     throws SQLException
Specified by:
closeConnection in interface ConnectionProvider
Throws:
SQLException

close

public void close()
Specified by:
close in interface ConnectionProvider


Copyright (C) 2003-2004 The Spring Framework Project.