org.objectweb.jotm
Interface Resource

All Superinterfaces:
Remote
All Known Implementing Classes:
ControlImpl, SubCoordinator

public interface Resource
extends Remote

This interface must be implemented by objects that will be registered to the JTM Coordinator. They may be remote.


Field Summary
static int VOTE_COMMIT
           
static int VOTE_READONLY
           
static int VOTE_ROLLBACK
           
 
Method Summary
 void commit_one_phase()
          commit 1 phase.
 void commit()
          phase 2 of the 2PC.
 void forget()
          forget heuristics about this transaction.
 int prepare()
          phase 1 of the 2PC.
 void rollback()
          rollback transaction
 

Field Detail

VOTE_COMMIT

public static final int VOTE_COMMIT
See Also:
Constant Field Values

VOTE_ROLLBACK

public static final int VOTE_ROLLBACK
See Also:
Constant Field Values

VOTE_READONLY

public static final int VOTE_READONLY
See Also:
Constant Field Values
Method Detail

prepare

public int prepare()
            throws RemoteException
phase 1 of the 2PC.

Returns:
int vote commit, rollback, or readonly.
RemoteException

rollback

public void rollback()
              throws RemoteException
rollback transaction

RemoteException

commit

public void commit()
            throws RemoteException
phase 2 of the 2PC.

RemoteException

commit_one_phase

public void commit_one_phase()
                      throws RemoteException
commit 1 phase.

RemoteException

forget

public void forget()
            throws RemoteException
forget heuristics about this transaction.

RemoteException