package bank; import org.omg.CORBA.*; import org.omg.PortableServer.*; public class AccountServerActivatorImpl extends org.omg.PortableServer.ServantActivatorPOA { public Servant incarnate(byte[] oid, POA adapter) throws ForwardRequest { // first check the DB to make sure account exists. // then create an accountimpl and return. System.out.println("(AccountServerActivatorImpl) Returning an Account Object for account number " + new String(oid)); try { DBUtils.getBalance(new String(oid)); } catch(Exception e) { System.out.println("(AccountServerActivatorImpl) Oops... Invalid account number " + new String(oid)); throw new org.omg.CORBA.OBJECT_NOT_EXIST(); } return new AccountImpl(new String(oid)); } public void etherealize(byte[] oid, POA adapter, Servant serv, boolean cleanup_in_progress, boolean remaining_activations) { } }