try {
Context ic = new InitialContext();
System.out.println("got a context");
Object o = ic.lookup("CustomerEntity");
System.out.println("got an object" + o);
CustomerHome home = (CustomerHome) PortableRemoteObject.narrow(o, CustomerHome.class);
System.out.println("did the narrow");
Customer customer1 = home.create("Bates", "Bert", "42 Foo St.", "420");
System.out.println("did the create");
System.out.println(customer1.getLastName());
} catch (Exception ex) {
ex.printStackTrace();
}