FileDocCategorySizeDatePackage
Client.javaAPI DocExample1141Mon Nov 01 06:50:40 GMT 1999com.titan.customer

Client

public class Client extends Object

Fields Summary
Constructors Summary
Methods Summary
public static javax.naming.ContextgetInitialContext()

        Properties p = new Properties();
        // ... specify the JNDI properties specific to the vendor
        return new javax.naming.InitialContext(p);
    
public static voidmain(java.lang.String[] args)


        try{
            Context jndiContext = getInitialContext();
            CustomerHome home = (CustomerHome)jndiContext.lookup("CustomerHome");
            Customer c = home.create(1, "Monson-Haefel","Richard","Wayne");
            System.out.println(c.getLastName());
            System.out.println(c.getFirstName());



        }catch(java.rmi.RemoteException re){re.printStackTrace();}
         catch(javax.naming.NamingException ne){ne.printStackTrace();}

         catch(javax.ejb.CreateException ce){ce.printStackTrace();}