public class SpringTransactionFactory extends Object implements TransactionFactory
JDBCTransactionFactory
implementation.TransactionSynchronizationManager
,
JDBCTransactionFactory
TransactionFactory.Context
Constructor and Description |
---|
SpringTransactionFactory() |
Modifier and Type | Method and Description |
---|---|
boolean |
areCallbacksLocalToHibernateTransactions() |
void |
configure(Properties props) |
Transaction |
createTransaction(JDBCContext jdbcContext,
TransactionFactory.Context transactionContext) |
ConnectionReleaseMode |
getDefaultReleaseMode()
Sets connection release mode "on_close" as default.
|
boolean |
isTransactionInProgress(JDBCContext jdbcContext,
TransactionFactory.Context transactionContext,
Transaction transaction) |
boolean |
isTransactionManagerRequired() |
public ConnectionReleaseMode getDefaultReleaseMode()
This was the case for Hibernate 3.0; Hibernate 3.1 changed it to "auto" (i.e. "after_statement" or "after_transaction"). However, for Spring's resource management (in particular for HibernateTransactionManager), "on_close" is the better default.
getDefaultReleaseMode
in interface TransactionFactory
public Transaction createTransaction(JDBCContext jdbcContext, TransactionFactory.Context transactionContext)
createTransaction
in interface TransactionFactory
public void configure(Properties props)
configure
in interface TransactionFactory
public boolean isTransactionManagerRequired()
isTransactionManagerRequired
in interface TransactionFactory
public boolean areCallbacksLocalToHibernateTransactions()
areCallbacksLocalToHibernateTransactions
in interface TransactionFactory
public boolean isTransactionInProgress(JDBCContext jdbcContext, TransactionFactory.Context transactionContext, Transaction transaction)
isTransactionInProgress
in interface TransactionFactory