org.hibernate.transaction
Class JOnASTransactionManagerLookup

java.lang.Object
  extended by org.hibernate.transaction.JOnASTransactionManagerLookup
All Implemented Interfaces:
TransactionManagerLookup

public class JOnASTransactionManagerLookup
extends java.lang.Object
implements TransactionManagerLookup

TransactionManagerLookup strategy for JOnAS


Constructor Summary
JOnASTransactionManagerLookup()
           
 
Method Summary
 java.lang.Object getTransactionIdentifier(javax.transaction.Transaction transaction)
          Determine an identifier for the given transaction appropriate for use in caching/lookup usages.
 javax.transaction.TransactionManager getTransactionManager(java.util.Properties props)
          Obtain the JTA TransactionManager.
 java.lang.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

JOnASTransactionManagerLookup

public JOnASTransactionManagerLookup()
Method Detail

getTransactionManager

public javax.transaction.TransactionManager getTransactionManager(java.util.Properties props)
                                                           throws HibernateException
Description copied from interface: TransactionManagerLookup
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.
See Also:
TransactionManagerLookup.getTransactionManager(Properties)

getUserTransactionName

public java.lang.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 java.lang.Object getTransactionIdentifier(javax.transaction.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


Copyright © 2008 Hibernate.org. All Rights Reserved.