Mercurial > hg > blitz_condensed
view src/org/dancres/blitz/remote/TxnGatewayImpl.java @ 33:0b9265358617
Added tag 2.1.1 for changeset a77f0a9ed93c
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Sat, 12 Jun 2010 10:52:10 +0100 |
parents | 3dc0c5604566 |
children |
line wrap: on
line source
package org.dancres.blitz.remote; import java.rmi.RemoteException; import net.jini.core.transaction.UnknownTransactionException; import net.jini.core.transaction.CannotJoinException; import net.jini.core.transaction.server.TransactionManager; import net.jini.core.transaction.server.TransactionParticipant; import net.jini.core.transaction.server.CrashCountException; import org.dancres.blitz.txn.TxnGateway; import org.dancres.blitz.txn.TxnId; /** "Glue" between the non-remote internals of Blitz and the outside (remote) world. */ class TxnGatewayImpl implements TxnGateway { private long theCrashCount = System.currentTimeMillis(); private TransactionParticipant theParticipantStub; TxnGatewayImpl(TransactionParticipant aStub) { theParticipantStub = aStub; } public void join(TxnId anId) throws UnknownTransactionException, CannotJoinException, CrashCountException, RemoteException { anId.getManager().join(anId.getId(), theParticipantStub, theCrashCount); } public int getState(TxnId anId) throws UnknownTransactionException, RemoteException { return anId.getManager().getState(anId.getId()); } }