FileDocCategorySizeDatePackage
Client.javaAPI DocExample1210Mon Nov 01 06:49:40 GMT 1999com.titan.cruise

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();
            CruiseHome home = (CruiseHome)jndiContext.lookup("CruiseHome");
            Cruise c = home.create(1,"Eastern Journey",1);
            System.out.println(c.getName());
            System.out.println(c.getShipID());



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

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