Top Description Fields Constructors Methods
org.hibernate.transaction

public Class WebSphereTransactionManagerLookup

extends Object
implements TransactionManagerLookup
Class Inheritance
All Implemented Interfaces
org.hibernate.transaction.TransactionManagerLookup
Imports
java.util.Properties, javax.transaction.TransactionManager, .Transaction, org.slf4j.Logger, .LoggerFactory, org.hibernate.HibernateException

TransactionManagerLookup strategy for WebSphere (versions 4, 5.0 and 5.1)
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private static final Logger
private final Class<T>
private final int

Constructor Summary

AccessConstructor and Description
public
WebSphereTransactionManagerLookup()

Constructs a new WebSphereTransactionManagerLookup.

Method Summary

Modifier and TypeMethod and Description
public Object
getTransactionIdentifier(Transaction
The transaction to be identified.
transaction
)

Implements org.hibernate.transaction.TransactionManagerLookup.getTransactionIdentifier.

Determine an identifier for the given transaction appropriate for use in caching/lookup usages.
public TransactionManager
public String
getUserTransactionName()

Implements org.hibernate.transaction.TransactionManagerLookup.getUserTransactionName.

Return the JNDI namespace of the JTA javax.transaction.UserTransaction for this platform or null; optional operation.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

logback to summary
private static final Logger log
tmfClassback to summary
private final Class<T> tmfClass
wsVersionback to summary
private final int wsVersion

Constructor Detail

WebSphereTransactionManagerLookupback to summary
public WebSphereTransactionManagerLookup()

Constructs a new WebSphereTransactionManagerLookup.

Method Detail

getTransactionIdentifierback to summary
public Object getTransactionIdentifier(Transaction transaction)

Implements org.hibernate.transaction.TransactionManagerLookup.getTransactionIdentifier.

Doc from org.hibernate.transaction.TransactionManagerLookup.getTransactionIdentifier.

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

Parameters
transaction:Transaction

The transaction to be identified.

Returns:Object

An appropropriate identifier

getTransactionManagerback to summary
public TransactionManager getTransactionManager(Properties props) throws HibernateException

Implements org.hibernate.transaction.TransactionManagerLookup.getTransactionManager.

Doc from org.hibernate.transaction.TransactionManagerLookup.getTransactionManager.

Obtain the JTA TransactionManager.

Parameters
props:Properties

The configuration properties.

Returns:TransactionManager

The JTA TransactionManager.

Exceptions
HibernateException:
Indicates problem locating TransactionManager.
getUserTransactionNameback to summary
public String getUserTransactionName()

Implements org.hibernate.transaction.TransactionManagerLookup.getUserTransactionName.

Doc from org.hibernate.transaction.TransactionManagerLookup.getUserTransactionName.

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

Returns:String

The JNDI namespace where we can locate the javax.transaction.UserTransaction for this platform.