FileDocCategorySizeDatePackage
Client_125.javaAPI DocExample1443Fri Sep 07 11:06:12 BST 2001com.titan.clients

Client_125

public class Client_125 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()

		Properties p = new Properties();
		p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");  
		p.put(Context.PROVIDER_URL, "t3://localhost:7001");
		return new InitialContext(p);
    
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);
		}