Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.orm.hibernate3
Class LocalTransactionManagerLookup

    java.lang.Object
      org.springframework.orm.hibernate3.LocalTransactionManagerLookup

All Implemented Interfaces:
  org.hibernate.transaction.TransactionManagerLookup

    public class LocalTransactionManagerLookup

extends java.lang.Object
implements org.hibernate.transaction.TransactionManagerLookup

Implementation of Hibernate's `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.

Since:
  1.2
Author:
  Juergen Hoeller
See Also:
  `LocalSessionFactoryBean.setJtaTransactionManager(javax.transaction.TransactionManager)`, `JtaTransactionManager.setTransactionManager(javax.transaction.TransactionManager)`

Constructor Summary
`LocalTransactionManagerLookup()`

Method Summary
`java.lang.Object` | `getTransactionIdentifier(javax.transaction.Transaction transaction)`
`javax.transaction.TransactionManager` | `getTransactionManager(java.util.Properties props)`
`java.lang.String` | `getUserTransactionName()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LocalTransactionManagerLookup

    public LocalTransactionManagerLookup()

Method Detail

### getTransactionManager

    public javax.transaction.TransactionManager getTransactionManager(java.util.Properties props)

  Specified by:
    `getTransactionManager` in interface `org.hibernate.transaction.TransactionManagerLookup`

### getUserTransactionName

    public java.lang.String getUserTransactionName()

  Specified by:
    `getUserTransactionName` in interface `org.hibernate.transaction.TransactionManagerLookup`

### getTransactionIdentifier

    public java.lang.Object getTransactionIdentifier(javax.transaction.Transaction transaction)

  Specified by:
    `getTransactionIdentifier` in interface `org.hibernate.transaction.TransactionManagerLookup`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD