org.compass.core.transaction
Class XATransaction

java.lang.Object
  extended by org.compass.core.transaction.AbstractTransaction
      extended by org.compass.core.transaction.AbstractJTATransaction
          extended by org.compass.core.transaction.XATransaction
All Implemented Interfaces:
CompassTransaction, InternalCompassTransaction

public class XATransaction
extends AbstractJTATransaction

Allows for Compass to particiapte in a two phase commit transaction using JTA.

Enlists an XAResource Compass implementation with a current JTA Transaction.

Transaction management is done by XATransactionFactory so there is no need to implement suspend and resume (works the same way JTASyncTransaction does).

Author:
kimchy

Field Summary
 
Fields inherited from class org.compass.core.transaction.AbstractTransaction
transactionFactory
 
Constructor Summary
XATransaction(UserTransaction ut, TransactionFactory transactionFactory)
           
 
Method Summary
protected  void doBindToTransaction(Transaction tx, InternalCompassSession session, boolean newTransaction)
           
 
Methods inherited from class org.compass.core.transaction.AbstractJTATransaction
begin, doCommit, doRollback, getSession, join, wasCommitted, wasRolledBack
 
Methods inherited from class org.compass.core.transaction.AbstractTransaction
commit, getSearchEngine, isBegun, rollback, setBegun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XATransaction

public XATransaction(UserTransaction ut,
                     TransactionFactory transactionFactory)
Method Detail

doBindToTransaction

protected void doBindToTransaction(Transaction tx,
                                   InternalCompassSession session,
                                   boolean newTransaction)
                            throws Exception
Specified by:
doBindToTransaction in class AbstractJTATransaction
Throws:
Exception


Copyright (c) 2004-2009 The Compass Project.