How do I use JacORB with TAOs Naming Service?
JacORB applications can use TAO’s Naming Service. Applications implemented with Java JDK 1.2 or later require a workaround to avoid using Sun’s org.omg.CosNaming stubs, which are buggy. We’ll use the -Xbootclasspath/p runtime option to eliminate that problem, as described below. The steps for using TAO’s Naming Service from JacORB clients are as follows: • Start TAO’s Naming Service, specifying a well-known listening endpoint $TAO_ROOT/orbsvcs/Naming_Service/Naming_Service \ -ORBListenEndpoints iiop://myhost:2809 • Write your JacORB Naming Service clients as you normally would, using orb.resolve_initial_references(“NameService”) to find the Naming Service. import org.omg.CORBA.ORB; import org.omg.CosNaming.*; import org.omg.CosNaming.NamingContextPackage.*; public class NSTest { public static void main(String args[]) { try{ ORB orb = ORB.init(args, null); org.omg.CORBA.Object o = orb.resolve_initial_references( “NameService” ); NamingContext rootNC = NamingContextHelper.narrow( o ); //