Client_125public class Client_125 extends Object Creates Customer, Cabin, Ship, and Cruise objects for use in this exercise and the following exercises |
Methods Summary |
---|
public static javax.naming.Context | getInitialContext()
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 void | main(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);
}
|
|