com.arjuna.wst11.stub
Class ParticipantStub

java.lang.Object
  extended by com.arjuna.wst11.stub.ParticipantStub
All Implemented Interfaces:
Participant, PersistableParticipant
Direct Known Subclasses:
Durable2PCStub, Volatile2PCStub

public class ParticipantStub
extends Object
implements Participant, PersistableParticipant


Constructor Summary
ParticipantStub(String id, boolean durable, W3CEndpointReference twoPCParticipant)
           
 
Method Summary
 void commit()
          The participant should make permanent the work that it controls.
 void error()
          During recovery the participant can enquire as to the status of the transaction it was registered with.
 Vote prepare()
          Perform any work necessary to allow it to either commit or rollback the work performed by the Web service under the scope of the transaction.
 boolean restoreState(com.arjuna.ats.arjuna.state.InputObjectState ios)
          Restore the state of the particpant from the specified input object stream.
 void rollback()
          The participant should undo the work that it controls.
 boolean saveState(com.arjuna.ats.arjuna.state.OutputObjectState oos)
          Save the state of the particpant to the specified input object stream.
 void unknown()
          During recovery the participant can enquire as to the status of the transaction it was registered with.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParticipantStub

public ParticipantStub(String id,
                       boolean durable,
                       W3CEndpointReference twoPCParticipant)
                throws Exception
Throws:
Exception
Method Detail

prepare

public Vote prepare()
             throws WrongStateException,
                    SystemException
Description copied from interface: Participant
Perform any work necessary to allow it to either commit or rollback the work performed by the Web service under the scope of the transaction. The implementation is free to do whatever it needs to in order to fulfill the implicit contract between it and the coordinator.

Specified by:
prepare in interface Participant
Returns:
an indication of whether it can prepare or not.
Throws:
WrongStateException
SystemException
See Also:
Vote

commit

public void commit()
            throws WrongStateException,
                   SystemException
Description copied from interface: Participant
The participant should make permanent the work that it controls.

Specified by:
commit in interface Participant
Throws:
WrongStateException
SystemException

rollback

public void rollback()
              throws WrongStateException,
                     SystemException
Description copied from interface: Participant
The participant should undo the work that it controls. The participant will then return an indication of whether or not it succeeded.

Specified by:
rollback in interface Participant
Throws:
WrongStateException
SystemException

unknown

public void unknown()
             throws SystemException
Description copied from interface: Participant
During recovery the participant can enquire as to the status of the transaction it was registered with. If that transaction is no longer available (has rolled back) then this operation will be invoked by the coordination service.

Specified by:
unknown in interface Participant
Throws:
SystemException

error

public void error()
           throws SystemException
Description copied from interface: Participant
During recovery the participant can enquire as to the status of the transaction it was registered with. If an error occurs (e.g., the transaction service is unavailable) then this operation will be invoked.

Specified by:
error in interface Participant
Throws:
SystemException

saveState

public boolean saveState(com.arjuna.ats.arjuna.state.OutputObjectState oos)
Description copied from interface: PersistableParticipant
Save the state of the particpant to the specified input object stream.

Specified by:
saveState in interface PersistableParticipant
Parameters:
oos - The output output stream.
Returns:
true if persisted, false otherwise.

restoreState

public boolean restoreState(com.arjuna.ats.arjuna.state.InputObjectState ios)
Description copied from interface: PersistableParticipant
Restore the state of the particpant from the specified input object stream.

Specified by:
restoreState in interface PersistableParticipant
Parameters:
ios - The Input object stream.
Returns:
true if restored, false otherwise.


Copyright © 2012. All Rights Reserved.