// Register the JIImpl remote object with CORBA package TestIDL; import org.omg.CosNaming.*; import org.omg.CosNaming.NamingContextPackage.*; import org.omg.CORBA.*; public class JIStart { /** Main routine to start the object as a background process and * bind itself with the Name Server **/ public static void main(String args[]) throws Exception { System.out.println("Starting the ORB..."); // initialize the ORB ORB orb = ORB.init(args, null); // create and register the object JIImpl orblet = new JIImpl(); orb.connect(orblet); // define the object's name component NameComponent nc = new NameComponent("jdbcidl", ""); NameComponent path [] = {nc}; // get a reference to the Name Server NamingContext nctxt = NamingContextHelper.narrow( orb.resolve_initial_references("NameService")); // bind the object to the Name Service nctxt.rebind(path, orblet); System.err.println("JDBCIDL server object ready"); // wait for client invocations java.lang.Object sync = new java.lang.Object(); synchronized (sync) { sync.wait(); } } }