org.objectweb.jotm

Interface Resource

All Superinterfaces:
Remote
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()
phase 2 of the 2PC.
void
commit_one_phase()
commit 1 phase.
void
forget()
forget heuristics about this transaction.
int
prepare()
phase 1 of the 2PC.
void
rollback()
rollback transaction

Field Details

VOTE_COMMIT

public static final int VOTE_COMMIT

Field Value:
0


VOTE_READONLY

public static final int VOTE_READONLY

Field Value:
2


VOTE_ROLLBACK

public static final int VOTE_ROLLBACK

Field Value:
1

Method Details

commit

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


commit_one_phase

public void commit_one_phase()
            throws RemoteException
commit 1 phase.


forget

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


prepare

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

Returns:
int vote commit, rollback, or readonly.


rollback

public void rollback()
            throws RemoteException
rollback transaction