Package org.apache.jackrabbit.data.core
Interface InternalXAResource
-
public interface InternalXAResource
Interface implemented by resources that provide XA functionality.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
afterOperation(TransactionContext tx)
Invoked after one of theprepare(org.apache.jackrabbit.data.core.TransactionContext)
,commit(org.apache.jackrabbit.data.core.TransactionContext)
orrollback(org.apache.jackrabbit.data.core.TransactionContext)
method has been called.void
associate(TransactionContext tx)
Associate this resource with a transaction.void
beforeOperation(TransactionContext tx)
Invoked before one of theprepare(org.apache.jackrabbit.data.core.TransactionContext)
,commit(org.apache.jackrabbit.data.core.TransactionContext)
orrollback(org.apache.jackrabbit.data.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
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, ifnull
disassociate
-
beforeOperation
void beforeOperation(TransactionContext tx)
Invoked before one of theprepare(org.apache.jackrabbit.data.core.TransactionContext)
,commit(org.apache.jackrabbit.data.core.TransactionContext)
orrollback(org.apache.jackrabbit.data.core.TransactionContext)
method is called.- Parameters:
tx
- transaction context
-
prepare
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
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
void rollback(TransactionContext tx) throws TransactionException
Rollback transaction. The transaction is identified by a transaction context.- Parameters:
tx
- transaction context.- Throws:
TransactionException
-
afterOperation
void afterOperation(TransactionContext tx)
Invoked after one of theprepare(org.apache.jackrabbit.data.core.TransactionContext)
,commit(org.apache.jackrabbit.data.core.TransactionContext)
orrollback(org.apache.jackrabbit.data.core.TransactionContext)
method has been called.- Parameters:
tx
- transaction context
-
-