Top Description Constructors Methods
net.sf.ehcache.hibernate

public Class EhcacheJtaTransactionManagerLookup

extends DefaultTransactionManagerLookup
implements TransactionManagerLookup
Class Inheritance
All Implemented Interfaces
org.hibernate.transaction.TransactionManagerLookup
Imports
net.sf.ehcache.transaction.manager.DefaultTransactionManagerLookup, org.hibernate.HibernateException, org.hibernate.transaction.TransactionManagerLookup, javax.transaction.Transaction, .TransactionManager, java.util.Properties

Hibernate TransactionManagerLookup which also is a Ehcache transaction manager lookup.
Author
Ludovic Orban

Constructor Summary

AccessConstructor and Description
public
EhcacheJtaTransactionManagerLookup()

Construct a new transaction manager lookup.

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 net.sf.ehcache.transaction.manager.DefaultTransactionManagerLookup:
getTransactionManagerinitregistersetPropertiesunregister

Constructor Detail

EhcacheJtaTransactionManagerLookupback to summary
public EhcacheJtaTransactionManagerLookup()

Construct a new transaction manager lookup.

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 properties) throws HibernateException

Implements org.hibernate.transaction.TransactionManagerLookup.getTransactionManager.

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

Obtain the JTA TransactionManager.

Parameters
properties: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.