sk.baka.tools.javaee
Class UniversalTransactionManagerLookup

java.lang.Object
  extended by sk.baka.tools.javaee.UniversalTransactionManagerLookup
All Implemented Interfaces:
org.hibernate.transaction.TransactionManagerLookup

public class UniversalTransactionManagerLookup
extends Object
implements org.hibernate.transaction.TransactionManagerLookup

Delegates all invocations to given auto-detected transaction manager.

Author:
Martin Vysny

Constructor Summary
UniversalTransactionManagerLookup()
          A default, zero-arg constructor which auto-detects the server.
UniversalTransactionManagerLookup(JeeServer server)
          Creates lookup for given server type.
 
Method Summary
 Object getTransactionIdentifier(Transaction transaction)
           
 TransactionManager getTransactionManager(Properties props)
           
 String getUserTransactionName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniversalTransactionManagerLookup

public UniversalTransactionManagerLookup()
A default, zero-arg constructor which auto-detects the server.


UniversalTransactionManagerLookup

public UniversalTransactionManagerLookup(JeeServer server)
Creates lookup for given server type.

Parameters:
server - the server, must not be null.
Method Detail

getTransactionManager

public final TransactionManager getTransactionManager(Properties props)
Specified by:
getTransactionManager in interface org.hibernate.transaction.TransactionManagerLookup

getUserTransactionName

public final String getUserTransactionName()
Specified by:
getUserTransactionName in interface org.hibernate.transaction.TransactionManagerLookup

getTransactionIdentifier

public final Object getTransactionIdentifier(Transaction transaction)
Specified by:
getTransactionIdentifier in interface org.hibernate.transaction.TransactionManagerLookup


Copyright © 2009-2010. All Rights Reserved.