comparison src/org/dancres/blitz/txn/PrepCommand.java @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:3dc0c5604566
1 package org.dancres.blitz.txn;
2
3 import java.io.Serializable;
4
5 import org.prevayler.Command;
6 import org.prevayler.PrevalentSystem;
7
8 /**
9 Command to issue prepare against transaction held in TxnManagerState
10 */
11 class PrepCommand implements Command {
12 private TxnState theTxn;
13
14 PrepCommand(TxnState aTxn) {
15 theTxn = aTxn;
16 }
17
18 public Serializable execute(PrevalentSystem aSystem) throws Exception {
19 TxnManagerState mySystem = (TxnManagerState) aSystem;
20
21 Integer myResult = new Integer(mySystem.prepare(theTxn));
22
23 return myResult;
24 }
25
26 public String toString() {
27 return " PR : " + theTxn.getId();
28 }
29 }