org.objectweb.jotm
Class ControlImpl
PortableRemoteObject
org.objectweb.jotm.ControlImpl
- Control, Remote, Coordinator, RecoveryCoordinator, Resource, Terminator, TimerEventListener
public class ControlImpl
extends PortableRemoteObject
Implementation of the object that represents a transaction.
This remote object has been created by a TransactionFactory.
It extends The RemoteControl Remote Interface
TransactionFactory
commit
public void commit()
throws RemoteException
Sub-coordinator received commit from its superior.
It must more or less do the same things that the phase 2 of the 2PC.
- commit in interface Resource
commit
public void commit(boolean report_heuristics)
throws RemoteException
Commits this transaction
- commit in interface Terminator
report_heuristics
- want to report heuristics if any
commit_one_phase
public void commit_one_phase()
throws RemoteException
Sub-coordinator received commit_one_phase from its superior.
It is more or less a Terminator.commit().
- commit_one_phase in interface Resource
forget
public void forget()
throws RemoteException
forget transaction
- forget in interface Resource
get_coordinator
public Coordinator get_coordinator()
throws RemoteException
Gets the Coordinator object for this transaction
- get_coordinator in interface Control
- Coordinator for this transaction
get_status
public int get_status()
throws RemoteException
Gets the current status of this transaction
- get_status in interface Coordinator
- current transaction status
get_terminator
public Terminator get_terminator()
throws RemoteException
Gets the Terminator object for this transaction
- get_terminator in interface Control
- Terminator for this transaction
get_transaction_name
public String get_transaction_name()
throws RemoteException
Gets a String that represents the transaction name.
Only the Format Id and the Global Id are used to build it :
The Branch Qualifier is not used.
- get_transaction_name in interface Coordinator
- Transaction Name
is_same_transaction
public boolean is_same_transaction(Coordinator tc)
throws RemoteException
Tests if the given coordinator represents this transaction
- is_same_transaction in interface Coordinator
tc
- Coordinator to be compared to this transaction
- true if it is the same transaction
prepare
public int prepare()
throws RemoteException
Sub-coordinator has received prepare from its superior.
It must more or less do the same things that the phase 1 of the 2PC.
- prepare in interface Resource
- Vote : commit, roollback or read-only.
register_synchronization
public void register_synchronization(RemoteSynchro sync)
throws RemoteException
Registers a Synchronization object for this transaction
- register_synchronization in interface Coordinator
sync
- RemoteSynchro to be registered
replay_completion
public int replay_completion(Resource res)
throws RemoteException
Asks the status of this transaction, after recovery of a Resource
- replay_completion in interface RecoveryCoordinator
res
- Resource recovering
rollback
public void rollback()
throws RemoteException
Rolls back this transaction branch. Can be a sub-coordinator or
a normal coordinator.
- rollback in interface Resource
- rollback in interface Terminator
rollback_only
public void rollback_only()
throws RemoteException
Asks to rollback the transaction
- rollback_only in interface Coordinator
timeoutExpired
public void timeoutExpired(Object arg)
The transaction timeout has expired
Do not synchronize this method to avoid deadlocks!
- timeoutExpired in interface TimerEventListener