当前页面:
在线文档首页 >
Spring Framework 1.2.9 API 文档英文版
LocalTransactionManagerLookup (Spring Framework) - Spring Framework 1.2.9 API 文档英文版
org.springframework.orm.hibernate3
Class LocalTransactionManagerLookup
java.lang.Object
org.springframework.orm.hibernate3.LocalTransactionManagerLookup
- All Implemented Interfaces:
- TransactionManagerLookup
public class LocalTransactionManagerLookup
- extends Object
- implements TransactionManagerLookup
Implementation of Hibernate's TransactionManagerLookup interface that
returns a Spring-managed JTA TransactionManager, determined by
LocalSessionFactoryBean's "transactionManager" 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)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalTransactionManagerLookup
public LocalTransactionManagerLookup()
getTransactionManager
public TransactionManager getTransactionManager(Properties props)
- Specified by:
getTransactionManager
in interface TransactionManagerLookup
getUserTransactionName
public String getUserTransactionName()
- Specified by:
getUserTransactionName
in interface TransactionManagerLookup
Copyright (c) 2002-2007 The Spring Framework Project.