org.compass.core.transaction
Class JTASyncTransaction

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

public class JTASyncTransaction
extends AbstractJTATransaction

Implements a basic transaction strategy for JTA transactions. Instances check to see if there is an existing JTA transaction. If none exists, a new transaction is started. If one exists, all work is done in the existing context.

Author:
kimchy

Field Summary
 
Fields inherited from class org.compass.core.transaction.AbstractTransaction
transactionFactory
 
Constructor Summary
JTASyncTransaction(UserTransaction ut, boolean commitBeforeCompletion, 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

JTASyncTransaction

public JTASyncTransaction(UserTransaction ut,
                          boolean commitBeforeCompletion,
                          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.