Package org.apache.jackrabbit.data.core
Interface InternalXAResource
public interface InternalXAResource
Interface implemented by resources that provide XA functionality.
-
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked 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.voidAssociate this resource with a transaction.voidInvoked 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.voidCommit transaction.voidPrepare transaction.voidRollback transaction.
-
Method Details
-
associate
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, ifnulldisassociate
-
beforeOperation
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
Prepare transaction. The transaction is identified by a transaction context.- Parameters:
tx- transaction context- Throws:
TransactionException- if an error occurs
-
commit
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
Rollback transaction. The transaction is identified by a transaction context.- Parameters:
tx- transaction context.- Throws:
TransactionException
-
afterOperation
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
-