FileDocCategorySizeDatePackage
CustomerHomeImpl.javaAPI DocExample1141Thu Aug 24 20:59:46 BST 2000com.imaginary.bank

CustomerHomeImpl

public class CustomerHomeImpl extends com.imaginary.lwp.BaseHome implements CustomerHome

Fields Summary
Constructors Summary
public CustomerHomeImpl()

        super();
    
Methods Summary
public CustomerFacadecreate(com.imaginary.lwp.Identifier id, java.lang.String fn, java.lang.String ln, java.lang.String ssn)

        Transaction trans = Transaction.getCurrent(id);
        CustomerEntity cust = new CustomerEntity();
        boolean success = false;

        trans.begin();
        try {
            cust.create(id, fn, ln, ssn);
            success = true;
            return new CustomerFacade(cust);
        }
        finally {
            if( success ) {
                System.out.println("Ending transaction...");
                try { trans.end(); }
                catch( TransactionException e ) { }
            }
            else {
                trans.rollback();
            }
        }