org.apache.jackrabbit.core
Interface InternalXAResource

All Known Implementing Classes:
XAItemStateManager, XALockManager, XAVersionManager

public interface InternalXAResource

Interface implemented by resources that provide XA functionality.


Method Summary
 void afterOperation(TransactionContext tx)
          Invoked after one of the prepare(org.apache.jackrabbit.core.TransactionContext), commit(org.apache.jackrabbit.core.TransactionContext) or rollback(org.apache.jackrabbit.core.TransactionContext) method has been called.
 void associate(TransactionContext tx)
          Associate this resource with a transaction.
 void beforeOperation(TransactionContext tx)
          Invoked before one of the prepare(org.apache.jackrabbit.core.TransactionContext), commit(org.apache.jackrabbit.core.TransactionContext) or rollback(org.apache.jackrabbit.core.TransactionContext) method is called.
 void commit(TransactionContext tx)
          Commit transaction.
 void prepare(TransactionContext tx)
          Prepare transaction.
 void rollback(TransactionContext tx)
          Rollback transaction.
 

Method Detail

associate

public void associate(TransactionContext tx)
Associate this resource with a transaction. All further operations on the object should be interpreted as part of this transaction and changes recorded in some attribute of the transaction context.

Parameters:
tx - transaction context, if null disassociate

beforeOperation

public void beforeOperation(TransactionContext tx)
Invoked before one of the prepare(org.apache.jackrabbit.core.TransactionContext), commit(org.apache.jackrabbit.core.TransactionContext) or rollback(org.apache.jackrabbit.core.TransactionContext) method is called.

Parameters:
tx - transaction context

prepare

public void prepare(TransactionContext tx)
             throws TransactionException
Prepare transaction. The transaction is identified by a transaction context.

Parameters:
tx - transaction context
Throws:
TransactionException - if an error occurs

commit

public void commit(TransactionContext tx)
            throws TransactionException
Commit transaction. The transaction is identified by a transaction context. If the method throws, other resources get their changes rolled back.

Parameters:
tx - transaction context
Throws:
TransactionException - if an error occurs

rollback

public void rollback(TransactionContext tx)
              throws TransactionException
Rollback transaction. The transaction is identified by a transaction context.

Parameters:
tx - transaction context.
Throws:
TransactionException

afterOperation

public void afterOperation(TransactionContext tx)
Invoked after one of the prepare(org.apache.jackrabbit.core.TransactionContext), commit(org.apache.jackrabbit.core.TransactionContext) or rollback(org.apache.jackrabbit.core.TransactionContext) method has been called.

Parameters:
tx - transaction context


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.