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 WebSphereExtendedJTATransactionLookup

    java.lang.Object
      org.hibernate.transaction.WebSphereExtendedJTATransactionLookup

All Implemented Interfaces:
  TransactionManagerLookup

    public class WebSphereExtendedJTATransactionLookup

extends Object
implements TransactionManagerLookup

TransactionManagerLookup implementation intended for use with WebSphere Application Server (WAS).

WAS, unlike every other app server on the planet, does not allow direct access to the JTS TransactionManager. Instead, for common transaction- related tasks users must utilize a proprietary API known as ExtendedJTATransaction.

Even more unfortunate, the exact TransactionManagerLookup to use inside of WAS is highly dependent upon (1) WAS version as well as (2) the WAS container in which Hibernate will be utilized.

WebSphereExtendedJTATransactionLookup is reported to work on WAS version 6 in any of the standard J2EE/JEE component containers.

Author:
  Gavin King,

  Nested Class Summary
  `static class` | `WebSphereExtendedJTATransactionLookup.TransactionManagerAdapter`

  Constructor Summary
  `WebSphereExtendedJTATransactionLookup()`

  Method Summary
  `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`.
  `String` | `getUserTransactionName()` Return the JNDI namespace of the JTA `UserTransaction` for this platform or `null`; optional operation.

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

  Constructor Detail

  ### WebSphereExtendedJTATransactionLookup

      public WebSphereExtendedJTATransactionLookup()

  Method Detail

  ### getTransactionManager

      public TransactionManager getTransactionManager(Properties props)

    Obtain the JTA `TransactionManager`.

    Specified by:
      `getTransactionManager` in interface `TransactionManagerLookup`
    Parameters:
      `props` - The configuration properties.
    Returns:
      The JTA `TransactionManager`.

  ### getUserTransactionName

      public String getUserTransactionName()

    Return the JNDI namespace of the JTA `UserTransaction` for this platform or `null`; optional operation.

    Specified by:
      `getUserTransactionName` in interface `TransactionManagerLookup`
    Returns:
      The JNDI namespace where we can locate the `UserTransaction` for this platform.

  ### 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.