org.apache.ojb.odmg
Class JTATxManager

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

public class JTATxManager
extends java.lang.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(org.apache.ojb.broker.util.configuration.Configuration config)
          configure an object using the Configuration pConfig
 void deregisterTx(java.lang.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.
 javax.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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTATxManager

public JTATxManager()
Method Detail

deregisterTx

public void deregisterTx(java.lang.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 javax.transaction.Transaction getJTATransaction()
                                                throws javax.transaction.SystemException
Throws:
javax.transaction.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(org.apache.ojb.broker.util.configuration.Configuration config)
Description copied from interface: org.apache.ojb.broker.util.configuration.Configurable
configure an object using the Configuration pConfig

Specified by:
configure in interface org.apache.ojb.broker.util.configuration.Configurable
Parameters:
config - the Configuration object used to configure current instance


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30