org.compass.spring.transaction
Class SpringSyncTransaction

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

public class SpringSyncTransaction
extends AbstractTransaction


Nested Class Summary
static class SpringSyncTransaction.SpringTransactionSynchronization
           
 
Nested classes/interfaces inherited from interface org.compass.core.CompassTransaction
CompassTransaction.TransactionIsolation
 
Field Summary
 
Fields inherited from class org.compass.core.transaction.AbstractTransaction
transactionFactory
 
Constructor Summary
SpringSyncTransaction(TransactionFactory transactionFactory)
           
 
Method Summary
 void begin(org.springframework.transaction.PlatformTransactionManager transactionManager, InternalCompassSession session, CompassTransaction.TransactionIsolation transactionIsolation, boolean commitBeforeCompletion)
           
protected  void doCommit()
           
protected  void doRollback()
           
 CompassSession getSession()
          Returns the current Compass transaction associated with this transaction.
 void join(InternalCompassSession session)
          Called by factory when already in a running compass transaction
 boolean wasCommitted()
          Check if this transaction was successfully committed.
 boolean wasRolledBack()
          Was this transaction rolled back or set to rollback only?
 
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

SpringSyncTransaction

public SpringSyncTransaction(TransactionFactory transactionFactory)
Method Detail

begin

public void begin(org.springframework.transaction.PlatformTransactionManager transactionManager,
                  InternalCompassSession session,
                  CompassTransaction.TransactionIsolation transactionIsolation,
                  boolean commitBeforeCompletion)

join

public void join(InternalCompassSession session)
          throws CompassException
Called by factory when already in a running compass transaction

Throws:
CompassException

doCommit

protected void doCommit()
                 throws CompassException
Specified by:
doCommit in class AbstractTransaction
Throws:
CompassException

doRollback

protected void doRollback()
                   throws CompassException
Specified by:
doRollback in class AbstractTransaction
Throws:
CompassException

wasRolledBack

public boolean wasRolledBack()
                      throws CompassException
Description copied from interface: CompassTransaction
Was this transaction rolled back or set to rollback only?

Returns:
If the transaction was rolled backed
Throws:
CompassException

wasCommitted

public boolean wasCommitted()
                     throws CompassException
Description copied from interface: CompassTransaction
Check if this transaction was successfully committed. This method could return false even after successful invocation of commit().

Returns:
If the transaction was committed
Throws:
CompassException

getSession

public CompassSession getSession()
Description copied from interface: CompassTransaction
Returns the current Compass transaction associated with this transaction.



Copyright (c) 2004-2008 The Compass Project.