FileDocCategorySizeDatePackage
DistNaming.javaAPI DocExample930Mon Mar 02 22:28:22 GMT 1998jen.CORBA

DistNaming

public class DistNaming extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] argv)

    ORB orb = ORB.init(argv, null);
    org.omg.CORBA.Object ref = orb.resolve_initial_references("NamingContext");
    NamingContext localNC = NamingContextHelper.narrow(ref);
    Properties props = new Properties();
    props.put("org.omg.CORBA.ORBInitialHost", "tarazed.hbs.edu");
    props.put("org.omg.CORBA.ORBInitialPort", "31000");
    ORB orb2 = ORB.init((String[])null, props);
    ref = orb2.resolve_initial_references("NamingContext");
    NamingContext remoteNC = NamingContextHelper.narrow(ref);
    NamingComponent root = new NamingComponent("RemoteContexts", "");
    NamingComponent sub = new NamingComponent("Naming1", "");
    NameComponent path[] = {root, sub};
    localNC.rebind(path, remoteNC);
    while ( true ) {
      wait();
    }