Package org.hibernate.transaction
Class JNDITransactionManagerLookup
java.lang.Object
org.hibernate.transaction.JNDITransactionManagerLookup
- All Implemented Interfaces:
TransactionManagerLookup
- Direct Known Subclasses:
BESTransactionManagerLookup,JBossTransactionManagerLookup,JRun4TransactionManagerLookup,OC4JTransactionManagerLookup,OrionTransactionManagerLookup,ResinTransactionManagerLookup,SunONETransactionManagerLookup,WeblogicTransactionManagerLookup
public abstract class JNDITransactionManagerLookup
extends Object
implements TransactionManagerLookup
Template implementation of
TransactionManagerLookup where the
underlying TransactionManager is available via JNDI lookup at the
specified location - getName().-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringgetName()Get the JNDI namespace under wich we can locate theTransactionManager.getTransactionIdentifier(Transaction transaction) Determine an identifier for the given transaction appropriate for use in caching/lookup usages.getTransactionManager(Properties props) Obtain the JTATransactionManager.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.transaction.TransactionManagerLookup
getUserTransactionName
-
Constructor Details
-
JNDITransactionManagerLookup
public JNDITransactionManagerLookup()
-
-
Method Details
-
getName
Get the JNDI namespace under wich we can locate theTransactionManager.- Returns:
- The
TransactionManagerJNDI namespace
-
getTransactionManager
Obtain the JTATransactionManager.- Specified by:
getTransactionManagerin interfaceTransactionManagerLookup- Parameters:
props- The configuration properties.- Returns:
- The JTA
TransactionManager. - Throws:
HibernateException- Indicates problem locatingTransactionManager.
-
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).- Specified by:
getTransactionIdentifierin interfaceTransactionManagerLookup- Parameters:
transaction- The transaction to be identified.- Returns:
- An appropropriate identifier
-