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

## org.hibernate.transaction
Class JNDITransactionManagerLookup

    java.lang.Object
      org.hibernate.transaction.JNDITransactionManagerLookup

All Implemented Interfaces:
  TransactionManagerLookup

Direct Known Subclasses:
  BESTransactionManagerLookup, JBossTransactionManagerLookup, JRun4TransactionManagerLookup, OC4JTransactionManagerLookup, OrionTransactionManagerLookup, ResinTransactionManagerLookup, SunONETransactionManagerLookup, WeblogicTransactionManagerLookup

    public abstract class JNDITransactionManagerLookup

extends Object
implements TransactionManagerLookup

Template implementation of `TransactionManagerLookup` where the underlying `TransactionManager` is available via JNDI lookup at the specified location - `getName()`.

Author:
  Gavin King

Constructor Summary
`JNDITransactionManagerLookup()`

Method Summary
`protected abstract String` | `getName()` Get the JNDI namespace under wich we can locate the `TransactionManager`.
`Object` | `getTransactionIdentifier(Transaction transaction)` Determine an identifier for the given transaction appropriate for use in caching/lookup usages.
`TransactionManager` | `getTransactionManager(Properties props)` Obtain the JTA `TransactionManager`.

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

Methods inherited from interface org.hibernate.transaction.TransactionManagerLookup
`getUserTransactionName`

Constructor Detail

### JNDITransactionManagerLookup

    public JNDITransactionManagerLookup()

Method Detail

### getName

    protected abstract String getName()

  Get the JNDI namespace under wich we can locate the `TransactionManager`.

  Returns:
    The `TransactionManager` JNDI namespace

### getTransactionManager

    public TransactionManager getTransactionManager(Properties props)
                                             throws HibernateException

  Obtain the JTA `TransactionManager`.

  Specified by:
    `getTransactionManager` in interface `TransactionManagerLookup`
  Parameters:
    `props` - The configuration properties.
  Returns:
    The JTA `TransactionManager`.
  Throws:
    `HibernateException` - Indicates problem locating `TransactionManager`.

### getTransactionIdentifier

    public Object getTransactionIdentifier(Transaction transaction)

  Determine an identifier for the given transaction appropriate for use in caching/lookup usages.

  Generally speaking the transaction itself will be returned here. This method was added specifically for use in WebSphere and other unfriendly JEE containers (although WebSphere is still the only known such brain-dead, sales-driven impl).

  Specified by:
    `getTransactionIdentifier` in interface `TransactionManagerLookup`
  Parameters:
    `transaction` - The transaction to be identified.
  Returns:
    An appropropriate identifier

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

Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.