@Deprecated public class LocalTransactionManagerLookup extends java.lang.Object implements TransactionManagerLookup
TransactionManagerLookup
interface
that returns a Spring-managed JTA TransactionManager
, 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.
LocalSessionFactoryBean.setJtaTransactionManager(javax.transaction.TransactionManager)
,
JtaTransactionManager.setTransactionManager(javax.transaction.TransactionManager)
Constructor and Description |
---|
LocalTransactionManagerLookup()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getTransactionIdentifier(Transaction transaction)
Deprecated.
|
TransactionManager |
getTransactionManager(java.util.Properties props)
Deprecated.
|
java.lang.String |
getUserTransactionName()
Deprecated.
|
public TransactionManager getTransactionManager(java.util.Properties props)
getTransactionManager
in interface TransactionManagerLookup
public java.lang.String getUserTransactionName()
getUserTransactionName
in interface TransactionManagerLookup
public java.lang.Object getTransactionIdentifier(Transaction transaction)
getTransactionIdentifier
in interface TransactionManagerLookup