|
spring-orm | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
org.springframework.orm.hibernate3.TransactionAwareDataSourceConnectionProvider
public class TransactionAwareDataSourceConnectionProvider
Subclass of LocalDataSourceConnectionProvider that returns a transaction-aware proxy for the exposed DataSource. Used if LocalSessionFactoryBean's "useTransactionAwareDataSource" flag is on.
AbstractSessionFactoryBean.setUseTransactionAwareDataSource(boolean)| Constructor Summary | |
|---|---|
TransactionAwareDataSourceConnectionProvider()
|
|
| Method Summary | |
|---|---|
protected javax.sql.DataSource |
getDataSourceToUse(javax.sql.DataSource originalDataSource)
Return a TransactionAwareDataSourceProxy for the given DataSource, provided that it isn't a TransactionAwareDataSourceProxy already. |
boolean |
supportsAggressiveRelease()
This implementation returns true: We can guarantee
to receive the same Connection within a transaction, as we are
exposing a TransactionAwareDataSourceProxy. |
| Methods inherited from class org.springframework.orm.hibernate3.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 |
|---|
public TransactionAwareDataSourceConnectionProvider()
| Method Detail |
|---|
protected javax.sql.DataSource getDataSourceToUse(javax.sql.DataSource originalDataSource)
getDataSourceToUse in class LocalDataSourceConnectionProvideroriginalDataSource - the DataSource as configured by the user
on LocalSessionFactoryBean
AbstractSessionFactoryBean.setDataSource(javax.sql.DataSource)public boolean supportsAggressiveRelease()
true: We can guarantee
to receive the same Connection within a transaction, as we are
exposing a TransactionAwareDataSourceProxy.
supportsAggressiveRelease in interface org.hibernate.connection.ConnectionProvidersupportsAggressiveRelease in class LocalDataSourceConnectionProvider
|
spring-orm | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||