org.apache.ojb.odmg
Class JTATxManager

java.lang.Object
  extended by org.apache.ojb.odmg.JTATxManager
All Implemented Interfaces:
Configurable, OJBTxManager

public class JTATxManager
extends Object
implements OJBTxManager

Author:
Matthew Baird In an app server environment, where we have a transaction manager, we use the transactionmanager and it's associated JTA transaction to associate with the ODMG transaction. So the key is retrieved by calling getTransaction on the transactionManager

Constructor Summary
JTATxManager()
           
 
Method Summary
 void abortExternalTx(TransactionImpl odmgTrans)
          Abort an active extern transaction associated with the given PB.
 void configure(Configuration config)
          configure an object using the Configuration pConfig
 void deregisterTx(Object transaction)
          Remove the ODMG transaction from the transaction buffer ODMG transactions are associated with JTA transactions via a map
 TransactionImpl getCurrentTransaction()
          Returns the current transaction based on the JTA Transaction.
 Transaction getJTATransaction()
           
 TransactionImpl getTransaction()
          Returns the current transaction based on the JTA Transaction or null if no transaction was found.
 void registerTx(TransactionImpl odmgTrans)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTATxManager

public JTATxManager()
Method Detail

deregisterTx

public void deregisterTx(Object transaction)
Remove the ODMG transaction from the transaction buffer ODMG transactions are associated with JTA transactions via a map

Specified by:
deregisterTx in interface OJBTxManager

registerTx

public void registerTx(TransactionImpl odmgTrans)
Specified by:
registerTx in interface OJBTxManager

getJTATransaction

public Transaction getJTATransaction()
                              throws SystemException
Throws:
SystemException

getCurrentTransaction

public TransactionImpl getCurrentTransaction()
Returns the current transaction based on the JTA Transaction.

Specified by:
getCurrentTransaction in interface OJBTxManager
Throws:
TransactionNotInProgressException - if no transaction was found.

getTransaction

public TransactionImpl getTransaction()
Returns the current transaction based on the JTA Transaction or null if no transaction was found.

Specified by:
getTransaction in interface OJBTxManager

abortExternalTx

public void abortExternalTx(TransactionImpl odmgTrans)
Abort an active extern transaction associated with the given PB.

Specified by:
abortExternalTx in interface OJBTxManager

configure

public void configure(Configuration config)
Description copied from interface: Configurable
configure an object using the Configuration pConfig

Specified by:
configure in interface Configurable
Parameters:
config - the Configuration object used to configure current instance


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.