FileDocCategorySizeDatePackage
Client_122a.javaAPI DocExample1347Wed May 29 18:18:58 BST 2002com.titan.clients

Client_122a

public class Client_122a extends Object
Creates Customer, Cabin, Ship, and Cruise objects for use in this exercise and the following exercises

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

      return new InitialContext ();
   
public static voidmain(java.lang.String[] args)

      
      Context jndiContext = getInitialContext ();
      Object obj = jndiContext.lookup ("TravelAgentHomeRemote");
      TravelAgentHomeRemote tahome = (TravelAgentHomeRemote)
      javax.rmi.PortableRemoteObject.narrow (obj, TravelAgentHomeRemote.class);
      
      TravelAgentRemote tagent = tahome.create (null);
      
      System.out.println ("Calling TravelAgentBean to create sample data..");      
      Collection results = tagent.buildSampleData ();
      
      tagent.remove ();
      
      Iterator iterator = results.iterator ();
      while (iterator.hasNext ())
      {
         String ss = (String)(iterator.next ());
         System.out.println (ss);
      }