Transaction Decorators

Here are a list of possible decorators to use to wrap a transaction.

 public interface Transaction{
public void execute();
 }

//Execute a list of transactions commands in one transaction public class TransactionList? implements Transaction{ private final List _list; public TransactionList?(List trans){ _list= trans; }

public void execute(){ Iterator iter = _list.iterator(); while(iter.hasNext()){ ((Transaction)iter.next()).execute(); } } }

--MikeRettig


EditText of this page (last edited March 15, 2002) or FindPage with title or text search