List of usage examples for org.springframework.jdbc.datasource TransactionAwareDataSourceProxy TransactionAwareDataSourceProxy
public TransactionAwareDataSourceProxy(DataSource targetDataSource)
From source file:org.unitils.database.core.DataSourceWrapper.java
public DataSource getDataSource(boolean wrapDataSourceInTransactionalProxy) { if (!wrapDataSourceInTransactionalProxy || wrappedDataSource instanceof TransactionAwareDataSourceProxy) { // no wrapping requested or needed return wrappedDataSource; }//w w w . j a v a 2s. c o m if (transactionAwareDataSourceProxy == null) { transactionAwareDataSourceProxy = new TransactionAwareDataSourceProxy(wrappedDataSource); } return transactionAwareDataSourceProxy; }
From source file:org.unitils.database.transaction.impl.DefaultUnitilsTransactionManager.java
/** * Returns the given datasource, wrapped in a spring * <code>TransactionAwareDataSourceProxy</code> *//* ww w . j av a 2 s. co m*/ public DataSource getTransactionalDataSource(DataSource dataSource) { return new TransactionAwareDataSourceProxy(dataSource); }