[omniORB] How to check the NameService for existing services

Martin Trappel 0xCDCDCDCD at gmx.at
Tue Aug 5 14:38:11 BST 2008


R. P. Janaka wrote:
> Hi all,
> 
> Do I have a way to check the NameService for already existing services 
> before registering a new service.
> 
> Because I am having a problem when I am going to register a new service 
> with the NameService.
> 

I have one Server where the inital registration with the NamingService 
works as outlined in this pseudocode:

*) CosNaming::NamingContext -> bind(name, server_object)
*) catch(CosNaming::NamingContext::AlreadyBound Exception) =>
*)   test_object = CosNaming::NamingContext -> resolve(name)
*)   try {
*)     bool does_not_exist = test_object->_non_existant();
*)   } catch(CORBA::Exception&) {
*)     bool does_not_exist = true;
*)   }
*)   if(does_not_exist) =>
*)     CosNaming::NamingContext -> rebind(name, server_object)


br,
Martin



More information about the omniORB-list mailing list