7.9 Naming Services

<..class IDLnaming..>
 import org.omg.CORBA.*;
 import org.omg.CosNaming.*;
 import org.omg.PortableServer.*;
 
 class IDLNaming{
     ORB orb;
     NamingContextExt nameService;
 
   <.initiate client and server naming servises.>
 
   void rebind( String name, IDLservant servant)
                                           throws Exception {
     <.refServant = ....>
     NameComponent [] path = nameService.to_name( name );
     nameService.rebind(path, refServant);
   }
 
   org.omg.CORBA.Object lookup( String name) throws Exception {
      return nameService.resolve_str(name);
   }
 
   IDLinterface narrow ( org.omg.CORBA.Object obj )
                                              throws Exception {
     return  IDLinterfaceHelper.narrow( obj );
   }
 }
-_-_-