org.objectweb.jotm
Interface Resource

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
ControlImpl, SubCoordinator

public interface Resource
extends java.rmi.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

static final int VOTE_COMMIT
See Also:
Constant Field Values

VOTE_ROLLBACK

static final int VOTE_ROLLBACK
See Also:
Constant Field Values

VOTE_READONLY

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

prepare

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

Returns:
int vote commit, rollback, or readonly.
Throws:
java.rmi.RemoteException

rollback

void rollback()
              throws java.rmi.RemoteException
rollback transaction

Throws:
java.rmi.RemoteException

commit

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

Throws:
java.rmi.RemoteException

commit_one_phase

void commit_one_phase()
                      throws java.rmi.RemoteException
commit 1 phase.

Throws:
java.rmi.RemoteException

forget

void forget()
            throws java.rmi.RemoteException
forget heuristics about this transaction.

Throws:
java.rmi.RemoteException