org.springframework.orm.hibernate
Class LocalDataSourceConnectionProvider

java.lang.Object
  extended byorg.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)

Constructor Summary
LocalDataSourceConnectionProvider()
           
 
Method Summary
 void close()
           
 void closeConnection(java.sql.Connection conn)
           
 void configure(java.util.Properties props)
           
 java.sql.Connection getConnection()
           
 javax.sql.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(java.util.Properties props)
               throws net.sf.hibernate.HibernateException
Specified by:
configure in 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:
getConnection in interface net.sf.hibernate.connection.ConnectionProvider
Throws:
java.sql.SQLException

closeConnection

public void closeConnection(java.sql.Connection conn)
                     throws java.sql.SQLException
Specified by:
closeConnection in interface net.sf.hibernate.connection.ConnectionProvider
Throws:
java.sql.SQLException

close

public void close()
Specified by:
close in interface net.sf.hibernate.connection.ConnectionProvider


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