Class LocalTransactionManagerLookup
- java.lang.Object
- org.springframework.orm.hibernate3.LocalTransactionManagerLookup
- All Implemented Interfaces:
TransactionManagerLookup
@Deprecated public class LocalTransactionManagerLookup extends Object implements TransactionManagerLookup
Deprecated.as of Spring 4.3, in favor of Hibernate 4.x/5.xImplementation of Hibernate'sTransactionManagerLookup
interface that returns a Spring-managed JTATransactionManager
, determined by LocalSessionFactoryBean's "jtaTransactionManager" property.The main advantage of this TransactionManagerLookup is that it avoids double configuration of JTA specifics. A single TransactionManager bean can be used for both JtaTransactionManager and LocalSessionFactoryBean, with no JTA setup in Hibernate configuration.
Alternatively, use Hibernate's own TransactionManagerLookup implementations: Spring's JtaTransactionManager only requires a TransactionManager for suspending and resuming transactions, so you might not need to apply such special Spring configuration at all.
- Since:
- 1.2
- Author:
- Juergen Hoeller
- See Also:
LocalSessionFactoryBean.setJtaTransactionManager(javax.transaction.TransactionManager)
,JtaTransactionManager.setTransactionManager(javax.transaction.TransactionManager)
Constructor Summary
Constructors Constructor Description LocalTransactionManagerLookup()
Deprecated.
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Object
getTransactionIdentifier(Transaction transaction)
Deprecated.TransactionManager
getTransactionManager(Properties props)
Deprecated.String
getUserTransactionName()
Deprecated.
Constructor Detail
LocalTransactionManagerLookup
public LocalTransactionManagerLookup()
Deprecated.
Method Detail
getTransactionManager
public TransactionManager getTransactionManager(Properties props)
Deprecated.- Specified by:
getTransactionManager
in interfaceTransactionManagerLookup
getUserTransactionName
public String getUserTransactionName()
Deprecated.- Specified by:
getUserTransactionName
in interfaceTransactionManagerLookup
getTransactionIdentifier
public Object getTransactionIdentifier(Transaction transaction)
Deprecated.- Specified by:
getTransactionIdentifier
in interfaceTransactionManagerLookup