FileDocCategorySizeDatePackage
AccountHomeImpl.javaAPI DocExample1175Thu Aug 24 18:38:04 BST 2000com.imaginary.bank

AccountHomeImpl

public class AccountHomeImpl extends com.imaginary.lwp.BaseHome implements AccountHome

Fields Summary
Constructors Summary
public AccountHomeImpl()

        super();
    
Methods Summary
public AccountFacadecreate(com.imaginary.lwp.Identifier id, AccountType t, CustomerFacade cust)

        Transaction trans = Transaction.getCurrent(id);
        AccountEntity acct = new AccountEntity();
        boolean success = false;

        trans.begin();
        try {
            AccountFacade fac;
            
            acct.create(id, t, cust);
            fac = new AccountFacade(acct);
            cust.addAccount(id, fac);
            success = true;
            return fac;
        }
        finally {
            if( success ) {
                try { trans.end(); }
                catch( TransactionException e ) { }
            }
            else {
                trans.rollback();
            }
        }