org.springframework.orm.hibernate3
Class SpringTransactionFactory
java.lang.Object
org.springframework.orm.hibernate3.SpringTransactionFactory
public class SpringTransactionFactory
- extends java.lang.Object
Spring-aware implementation of the Hibernate TransactionFactory interface, aware of
Spring-synchronized transactions (in particular Spring-managed JTA transactions)
and asking for default release mode ON_CLOSE. Otherwise identical to Hibernate's
default org.hibernate.transaction.JDBCTransactionFactory
implementation.
- Since:
- 2.5.4
- Author:
- Juergen Hoeller
- See Also:
TransactionSynchronizationManager
,
org.hibernate.transaction.JDBCTransactionFactory
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringTransactionFactory
public SpringTransactionFactory()
getDefaultReleaseMode
public ConnectionReleaseMode getDefaultReleaseMode()
- Sets connection release mode "on_close" as default.
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.
createTransaction
public Transaction createTransaction(JDBCContext jdbcContext,
Context transactionContext)
configure
public void configure(java.util.Properties props)
isTransactionManagerRequired
public boolean isTransactionManagerRequired()
areCallbacksLocalToHibernateTransactions
public boolean areCallbacksLocalToHibernateTransactions()
isTransactionInProgress
public boolean isTransactionInProgress(JDBCContext jdbcContext,
Context transactionContext,
Transaction transaction)