FileDocCategorySizeDatePackage
CustomerClient.javaAPI DocExample900Fri Oct 03 17:38:22 BST 2003None

CustomerClient

public class CustomerClient extends Object

Fields Summary
Constructors Summary
Methods Summary
public voidgo()

      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();
          }
      
public static voidmain(java.lang.String[] args)

         new CustomerClient().go();