diff options
5 files changed, 27 insertions, 60 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index ff026572c48..71bc3bd06ca 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,18 @@ +Mon Dec 6 23:08:12 2004 J.T. Conklin <jtc@acorntoolworks.com> + + * orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp: + * orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.h: + + Changed to use NamingContext instead of NamingContextExt. + + * orbsvcs/Notify_Service/Notify_Service.cpp: + * orbsvcs/Notify_Service/Notify_Service.h: + + Removed TAO_NOTIFY_USE_NAMING_CONTEXT conditionals to use the + NamingContext instead of the NamingContextExt interface. Since + use of the latter doesn't buy us anything (and costs a little), + we use the "least common subset" to maximize interoperablity. + Tue Dec 7 08:31:17 2004 Chad Elliott <elliott_c@ociweb.com> * tao/BiDir_GIOP/BiDirGIOP.cpp: diff --git a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp index 391218056a0..299eadd3187 100644 --- a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp +++ b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.cpp @@ -101,13 +101,12 @@ Notify_Logging_Service::init (int argc, char *argv[] // Register the Factory ACE_ASSERT (!CORBA::is_nil (this->naming_.in ())); - CosNaming::Name_var name = - this->naming_->to_name (this->notify_factory_name_.c_str () - ACE_ENV_ARG_PARAMETER); + CosNaming::Name name (1); + name.length (1); + name[0].id = CORBA::string_dup (this->notify_factory_name_.c_str ()); ACE_CHECK_RETURN (-1); - - this->naming_->rebind (name.in (), + this->naming_->rebind (name, obj.in () ACE_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (-1); @@ -132,7 +131,7 @@ Notify_Logging_Service::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW (CORBA::UNKNOWN ()); this->naming_ = - CosNaming::NamingContextExt::_narrow (naming_obj.in () + CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); ACE_CHECK; } @@ -173,12 +172,12 @@ Notify_Logging_Service::shutdown (ACE_ENV_SINGLE_ARG_DECL) ACE_ENV_ARG_PARAMETER); ACE_CHECK; - CosNaming::Name_var name = - this->naming_->to_name (this->notify_factory_name_.c_str () - ACE_ENV_ARG_PARAMETER); + CosNaming::Name name (1); + name.length (1); + name[0].id = CORBA::string_dup (this->notify_factory_name_.c_str ()); ACE_CHECK; - this->naming_->unbind (name.in () + this->naming_->unbind (name ACE_ENV_ARG_PARAMETER); ACE_CHECK; diff --git a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.h b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.h index 0ad7d2b30f6..079e2de0e52 100644 --- a/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.h +++ b/TAO/orbsvcs/Logging_Service/Notify_Logging_Service/Notify_Logging_Service.h @@ -84,7 +84,7 @@ protected: PortableServer::POA_var poa_; // Reference to the root poa. - CosNaming::NamingContextExt_var naming_; + CosNaming::NamingContext_var naming_; // A naming context. }; diff --git a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp index bb3b16df981..a7e7770a6f4 100644 --- a/TAO/orbsvcs/Notify_Service/Notify_Service.cpp +++ b/TAO/orbsvcs/Notify_Service/Notify_Service.cpp @@ -174,30 +174,16 @@ TAO_Notify_Service_Driver::init (int argc, ACE_TCHAR *argv[] ACE_ASSERT (!CORBA::is_nil (this->naming_.in ())); -#if defined (TAO_NOTIFY_USE_NAMING_CONTEXT) CosNaming::Name name (1); name.length (1); name[0].id = CORBA::string_dup (this->notify_factory_name_.c_str ()); -#else - CosNaming::Name_var name = - this->naming_->to_name (this->notify_factory_name_.c_str () - ACE_ENV_ARG_PARAMETER); -#endif /* TAO_NOTIFY_USE_NAMING_CONTEXT */ - ACE_CHECK_RETURN (-1); -#if defined (TAO_NOTIFY_USE_NAMING_CONTEXT) this->naming_->rebind (name, this->notify_factory_.in () ACE_ENV_ARG_PARAMETER); -#else - this->naming_->rebind (name.in (), - this->notify_factory_.in () - ACE_ENV_ARG_PARAMETER); -#endif /* TAO_NOTIFY_USE_NAMING_CONTEXT */ - ACE_CHECK_RETURN (-1); ACE_DEBUG ((LM_DEBUG, @@ -217,25 +203,14 @@ TAO_Notify_Service_Driver::init (int argc, ACE_TCHAR *argv[] initial_admin, id ACE_ENV_ARG_PARAMETER); -#if defined (TAO_NOTIFY_USE_NAMING_CONTEXT) + name[0].id = CORBA::string_dup (this->notify_channel_name_.c_str ()); -#else - name = this->naming_->to_name ( - this->notify_channel_name_.c_str () - ACE_ENV_ARG_PARAMETER); -#endif /* TAO_NOTIFY_USE_NAMING_CONTEXT */ ACE_CHECK_RETURN (-1); -#if defined (TAO_NOTIFY_USE_NAMING_CONTEXT) this->naming_->rebind (name, ec.in () ACE_ENV_ARG_PARAMETER); -#else - this->naming_->rebind (name.in (), - ec.in () - ACE_ENV_ARG_PARAMETER); -#endif /* TAO_NOTIFY_USE_NAMING_CONTEXT */ ACE_CHECK_RETURN (-1); ACE_DEBUG ((LM_DEBUG, @@ -282,13 +257,8 @@ TAO_Notify_Service_Driver::resolve_naming_service (ACE_ENV_SINGLE_ARG_DECL) -1); this->naming_ = -#if defined (TAO_NOTIFY_USE_NAMING_CONTEXT) - CosNaming::NamingContext::_narrow (naming_obj.in (); + CosNaming::NamingContext::_narrow (naming_obj.in () ACE_ENV_ARG_PARAMETER); -#else - CosNaming::NamingContextExt::_narrow (naming_obj.in () - ACE_ENV_ARG_PARAMETER); -#endif /* TAO_NOTIFY_USE_NAMING_CONTEXT */ ACE_CHECK_RETURN (-1); return 0; @@ -320,26 +290,14 @@ TAO_Notify_Service_Driver::shutdown (ACE_ENV_SINGLE_ARG_DECL) if (this->use_name_svc_) { // Unbind from the naming service. -#if defined (TAO_NOTIFY_USE_NAMING_CONTEXT) CosNaming::Name name (1); name.length (1); name[0].id = CORBA::string_dup (this->notify_factory_name_.c_str ()); -#else - CosNaming::Name_var name = - this->naming_->to_name (this->notify_factory_name_.c_str () - ACE_ENV_ARG_PARAMETER); -#endif /* TAO_NOTIFY_USE_NAMING_CONTEXT */ - ACE_CHECK; -#if defined (TAO_NOTIFY_USE_NAMING_CONTEXT) this->naming_->unbind (name ACE_ENV_ARG_PARAMETER); -#else - this->naming_->unbind (name.in () - ACE_ENV_ARG_PARAMETER); -#endif /* TAO_NOTIFY_USE_NAMING_CONTEXT */ ACE_CHECK; } diff --git a/TAO/orbsvcs/Notify_Service/Notify_Service.h b/TAO/orbsvcs/Notify_Service/Notify_Service.h index e0de0ef0a8e..a134b09061e 100644 --- a/TAO/orbsvcs/Notify_Service/Notify_Service.h +++ b/TAO/orbsvcs/Notify_Service/Notify_Service.h @@ -130,12 +130,7 @@ protected: PortableServer::POA_var poa_; // Reference to the root poa. -#if defined (TAO_NOTIFY_USE_NAMING_CONTEXT) CosNaming::NamingContext_var naming_; -#else - CosNaming::NamingContextExt_var naming_; -#endif /* TAO_NOTIFY_USE_NAMING_CONTEXT */ - // A naming context. Worker worker_; |