boolean approved = false;
try {
if (src.getBalance() >= amt) {
approved = true;
}
}
catch (RemoteException re) {
// If some remote exception occurred, then the transfer is still
// compromised, so return false
approved = false;
}
return approved;
ListIterator amtCurs = amts.listIterator();
ListIterator srcCurs = srcs.listIterator();
// Iterate through the accounts and the amounts to be
// transferred from each (assumes amounts are given as Float
// objects)
while (amtCurs.hasNext() && srcCurs.hasNext()) {
Float amt = (Float)amtCurs.next();
Account src = (Account)srcCurs.next();
// Make the transaction
this.transfer(amt.floatValue(), src);
}