Random generator = new Random();
try{
Context jndiContext = new InitialContext();
Object ref = jndiContext.lookup("StatefulLoanManagerHomeRemote");
StatefulLoanManagerHomeRemote home = (StatefulLoanManagerHomeRemote)
PortableRemoteObject.narrow(ref, StatefulLoanManagerHomeRemote.class);
loanmanager = home.create();
} catch(CreateException ce){
ce.printStackTrace();
} catch(RemoteException re){
re.printStackTrace();