Top Description Methods
org.hibernate.transaction

public Interface TransactionManagerLookup

Known Direct Implementers
org.hibernate.transaction.WebSphereExtendedJTATransactionLookup, org.hibernate.transaction.WebSphereTransactionManagerLookup, org.hibernate.transaction.BTMTransactionManagerLookup, org.hibernate.transaction.JBossTSStandaloneTransactionManagerLookup, org.hibernate.transaction.JNDITransactionManagerLookup, org.hibernate.transaction.JOnASTransactionManagerLookup, org.hibernate.transaction.JOTMTransactionManagerLookup
Imports
java.util.Properties, javax.transaction.Transaction, .TransactionManager, org.hibernate.HibernateException

Contract for locating the JTA TransactionManager on given platform.

Note

this contract has expanded over time, and basically is a platform abstraction contract for JTA-related information.

Author
Gavin King

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

An appropropriate identifier
getTransactionIdentifier
(Transaction
The transaction to be identified.
transaction
)

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

public TransactionManager

Returns:

The JTA TransactionManager.
getTransactionManager
(Properties
The configuration properties.
props
)

Obtain the JTA TransactionManager.

public String

Returns:

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

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

Method Detail

getTransactionIdentifierback to summary
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).

Parameters
transaction:Transaction

The transaction to be identified.

Returns:Object

An appropropriate identifier

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

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

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.