站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

TransactionAwareDataSourceConnectionProvider (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.orm.hibernate
Class TransactionAwareDataSourceConnectionProvider

java.lang.Object
  extended by org.springframework.orm.hibernate.LocalDataSourceConnectionProvider
      extended by org.springframework.orm.hibernate.TransactionAwareDataSourceConnectionProvider
All Implemented Interfaces:
net.sf.hibernate.connection.ConnectionProvider

public class TransactionAwareDataSourceConnectionProvider
extends LocalDataSourceConnectionProvider

Subclass of LocalDataSourceConnectionProvider that returns a transaction-aware proxy for the exposed DataSource. Used if LocalSessionFactoryBean's "useTransactionAwareDataSource" flag is on.

Since:
1.1.4
Author:
Juergen Hoeller
See Also:
LocalSessionFactoryBean.setUseTransactionAwareDataSource(boolean)

Constructor Summary
TransactionAwareDataSourceConnectionProvider()
           
 
Method Summary
protected  DataSource getDataSourceToUse(DataSource originalDataSource)
          Return a TransactionAwareDataSourceProxy for the given DataSource, provided that it isn't a TransactionAwareDataSourceProxy already.
 
Methods inherited from class org.springframework.orm.hibernate.LocalDataSourceConnectionProvider
close, closeConnection, configure, getConnection, getDataSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionAwareDataSourceConnectionProvider

public TransactionAwareDataSourceConnectionProvider()
Method Detail

getDataSourceToUse

protected DataSource getDataSourceToUse(DataSource originalDataSource)
Return a TransactionAwareDataSourceProxy for the given DataSource, provided that it isn't a TransactionAwareDataSourceProxy already.

Overrides:
getDataSourceToUse in class LocalDataSourceConnectionProvider
Parameters:
originalDataSource - the DataSource as configured by the user on LocalSessionFactoryBean
Returns:
the DataSource to actually retrieve Connections from (potentially wrapped)
See Also:
LocalSessionFactoryBean.setDataSource(javax.sql.DataSource)

The Spring Framework

Copyright © 2002-2007 The Spring Framework.