|
Novell exteNd Messaging Platform 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Resource interface defines the operations invoked by the transaction service on each resource that is a participant in a transaction.
Method Summary | |
void |
commit_one_phase()
If possible, the resource should commit all changes made as part of the transaction. |
void |
commit()
This operation is invoked to complete the two-phase commit. |
void |
forget()
This operation is performed only if the resource raised a heuristic outcome exception to rollback, commit, commit_one_phase, or prepare. |
Vote |
prepare()
This operation is invoked to begin the two-phase commit protocol on the resource. |
void |
rollback()
This operation is can be invoked to complete the two-phase commit. |
Method Detail |
public Vote prepare() throws HeuristicMixed, HeuristicHazard
If no persistent data associated with the resource has been modified by the transaction, the resource can return VoteReadOnly. After receiving this response, the Transaction Service is not required to perform any additional operations on this resource. Furthermore, the resource can forget all knowledge of the transaction.
If the resource is able to write (or has already written) all the data needed to commit the transaction to stable storage, as well as an indication that it has prepared the transaction, it can return VoteCommit. After receiving this response, the Transaction Service is required to eventually perform either the commit or the rollback operation on this object.
The resource can return VoteRollback under any circumstances, including not having any knowledge about the transaction (which might happen after a crash). If this response is returned, the transaction must be rolled back.
HeuristicMixed
HeuristicHazard
public void rollback() throws HeuristicCommit, HeuristicMixed, HeuristicHazard
HeuristicCommit
HeuristicMixed
HeuristicHazard
public void commit() throws NotPrepared, HeuristicRollback, HeuristicMixed, HeuristicHazard
The NotPrepared exception is raised if the commit operation is performed without first performing the prepare operation.
NotPrepared
HeuristicRollback
HeuristicMixed
HeuristicHazard
public void commit_one_phase() throws HeuristicHazard
HeuristicHazard
public void forget()
|
Novell exteNd Messaging Platform 5.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |