diff options
Diffstat (limited to 'TAO/orbsvcs/bin/Naming_Service')
-rw-r--r-- | TAO/orbsvcs/bin/Naming_Service/CosNaming_i.cpp | 618 | ||||
-rw-r--r-- | TAO/orbsvcs/bin/Naming_Service/CosNaming_i.h | 173 | ||||
-rw-r--r-- | TAO/orbsvcs/bin/Naming_Service/Makefile | 551 | ||||
-rw-r--r-- | TAO/orbsvcs/bin/Naming_Service/NS_CosNaming.cpp | 107 | ||||
-rw-r--r-- | TAO/orbsvcs/bin/Naming_Service/NS_CosNaming.h | 108 | ||||
-rw-r--r-- | TAO/orbsvcs/bin/Naming_Service/svc.conf | 49 | ||||
-rw-r--r-- | TAO/orbsvcs/bin/Naming_Service/svr.cpp | 171 | ||||
-rw-r--r-- | TAO/orbsvcs/bin/Naming_Service/svr.h | 72 |
8 files changed, 0 insertions, 1849 deletions
diff --git a/TAO/orbsvcs/bin/Naming_Service/CosNaming_i.cpp b/TAO/orbsvcs/bin/Naming_Service/CosNaming_i.cpp deleted file mode 100644 index ec07e685a33..00000000000 --- a/TAO/orbsvcs/bin/Naming_Service/CosNaming_i.cpp +++ /dev/null @@ -1,618 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// cos -// -// = FILENAME -// CosNaming_i.cpp -// -// = AUTHOR -// Marina Spivak <marina@cs.wustl.edu> & -// Sergio Flores-Gaitan <sergio@cs.wustl.edu> -// -// ============================================================================ - -#include "CosNaming_i.h" - -NS_NamingContext::NS_NamingContext (void) - :POA_CosNaming::NamingContext ("naming_context") -{ - if (context_.open (NS_MAP_SIZE) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "NS_NamingContext")); - // deal with fault -} - -NS_NamingContext::~NS_NamingContext (void) -{ -} - -CosNaming::NamingContext_ptr -NS_NamingContext::get_context (const CosNaming::Name &name) -{ - // create compound name to be resolved - // (<name> - last component) - CORBA::Environment IT_env; - CORBA::ULong len = name.length (); - CosNaming::Name comp_name (name); - comp_name.length (len - 1); - - // resolve - CORBA::Object_ptr cont_ref; - - cont_ref = resolve (comp_name, IT_env); - - // Deal with exceptions in resolve: basicly, add the last component - // of the name to <rest_of_name> and rethrow. - if (IT_env.exception () != 0) - { - IT_env.print_exception ("NS_NamingContext::get_context"); - return 0; - } - - // Reference to a context from <resolve> cannot be nil because - // cannot <bind> to a nil object. - - // Try narrowing object reference to a context type. - CosNaming::NamingContext_ptr c; - c = CosNaming::NamingContext::_narrow (cont_ref, IT_env); - if (IT_env.exception () != 0) - { - IT_env.print_exception ("NS_NamingContext::get_context - _narrow"); - return 0; - } - - CosNaming::Name rest; - rest.length (2); - rest[0] = name[len - 2]; - rest[1] = name[len - 1]; - - if (CORBA::is_nil (c)) - { - CosNaming::Name rest; - rest.length (2); - rest[0] = name[len - 2]; - rest[1] = name[len - 1]; - } - return c; -} - -void -NS_NamingContext::bind (const CosNaming::Name& n, - CORBA::Object_ptr obj, - CORBA::Environment &IT_env) -{ - IT_env.clear (); - - // get the length of the name - CORBA::ULong len = n.length (); - - // Check for invalid name. - if (len == 0) - { - IT_env.clear (); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::InvalidName); - return; - } - /* @@ */// throw CosNaming::NamingContext::InvalidName (); - - // If we received compound name, resolve it to get the context in - // which the binding should take place, then perform the binding on - // target context. - if (len > 1) - { - CosNaming::NamingContext_var cont = get_context (n); - CosNaming::Name simple_name; - simple_name.length (1); - simple_name[0] = n[len - 1]; - cont->bind (simple_name, obj, IT_env); - } - - // If we received a simple name, we need to bind it in this context. - else - { - NS_IntId entry (obj); - NS_ExtId name (n[0].id, n[0].kind); - - // Try binding the name. - if (context_.bind (name, entry) == -1) - { - IT_env.clear (); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::AlreadyBound); - return; - } - /**/// throw CosNaming::NamingContext::AlreadyBound (); - // May need to add case dealing with -1. (Maybe throw cannot - // proceed). - } -} - -void -NS_NamingContext::rebind (const CosNaming::Name& n, - CORBA::Object_ptr obj, - CORBA::Environment &IT_env) -{ - // get the length of the name - CORBA::ULong len = n.length (); - - // check for invalid name. - if (len == 0) - { - IT_env.clear (); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::InvalidName); - return; - } - /* @@ */// throw CosNaming::NamingContext::InvalidName (); - - // If we received compound name, resolve it to get the context in - // which the rebinding should take place, then perform the rebinding - // on target context. - if (len > 1) - { - CosNaming::NamingContext_var cont = get_context (n); - CosNaming::Name simple_name; - simple_name.length (1); - simple_name[0] = n[len - 1]; - cont->rebind (simple_name, obj, IT_env); - } - // If we received a simple name, we need to rebind it in this context. - else - { - NS_IntId entry (obj); - NS_ExtId name (n[0].id, n[0].kind); - NS_IntId oldentry; - NS_ExtId oldname; - - // Try rebinding the name. - if (context_.rebind (name, entry, oldname, oldentry) == -1) - ; - // Deal with consequences. - } -} - -void -NS_NamingContext::bind_context (const CosNaming::Name &n, - CosNaming::NamingContext_ptr nc, - CORBA::Environment &IT_env) -{ - // Get the length of the name. - CORBA::ULong len = n.length (); - - // Check for invalid name. - if (len == 0) - { - IT_env.clear (); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::InvalidName); - return; - } - /* @@ */// throw CosNaming::NamingContext::InvalidName (); - - // If we received compound name, resolve it to get the context in - // which the binding should take place, then perform the binding on - // target context. - if (len > 1) - { - CosNaming::NamingContext_var cont = get_context (n); - CosNaming::Name simple_name; - simple_name.length (1); - simple_name[0] = n[len - 1]; - cont->bind_context (simple_name, nc, IT_env); - } - - // If we received a simple name, we need to bind it in this context. - else - { - CosNaming::NameComponent comp = n[0]; - NS_IntId entry (nc, CosNaming::ncontext); - NS_ExtId name (n[0].id, n[0].kind); - - // Try binding the name. - if (context_.bind (name, entry) == 1) - { - IT_env.clear (); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::AlreadyBound); - return; - } - /* @@ */// throw CosNaming::NamingContext::AlreadyBound (); - // May need to add case dealing with -1. - } -} - -void -NS_NamingContext::rebind_context (const CosNaming::Name &n, - CosNaming::NamingContext_ptr nc, - CORBA::Environment &IT_env) -{ - // Get the length of the name. - CORBA::ULong len = n.length (); - - // Check for invalid name. - if (len == 0) - { - IT_env.clear (); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::InvalidName); - return; - } - /* @@ */// throw CosNaming::NamingContext::InvalidName (); - - // If we received compound name, resolve it to get the context in - // which the rebinding should take place, then perform the rebinding - // on target context. - if (len > 1) - { - CosNaming::NamingContext_var cont = get_context (n); - CosNaming::Name simple_name; - simple_name.length (1); - simple_name[0] = n[len - 1]; - cont->rebind_context (simple_name, nc, IT_env); - } - - // if we received a simple name, we need to rebind it in this context. - else - { - CosNaming::NameComponent comp = n[0]; - NS_IntId entry (nc, CosNaming::ncontext); - NS_ExtId name (n[0].id, n[0].kind); - NS_IntId oldentry; - NS_ExtId oldname; - - // try rebinding the name. - if (context_.rebind (name, entry, oldname, oldentry) < 0); - // deal with consequences - } -} - -CORBA::Object_ptr -NS_NamingContext::resolve (const CosNaming::Name& n, - CORBA::Environment &IT_env) -{ - // get the length of the name - CORBA::ULong len = n.length (); - - // check for invalid name. - if (len == 0) - { - IT_env.clear (); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::InvalidName); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - return 0; - } - /* @@ *//// throw CosNaming::NamingContext::InvalidName (); - - // resolve the first component of the name - NS_ExtId name (n[0].id, n[0].kind); - NS_IntId entry; - if (context_.find (name, entry) == -1) - { - IT_env.clear (); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::NotFound (CosNaming::NamingContext::not_object, n)); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - return 0; - } - /* @@ */// throw CosNaming::NamingContext::NotFound (CosNaming::NamingContext::not_object, n); - - CORBA::Object_ptr item = entry.ref_; - - // if the name we have to resolve is a compound name - // we need to recursively resolve it. - if (len > 1) - { - CosNaming::NamingContext_var cont; - if (entry.type_ == CosNaming::ncontext) - { - cont = CosNaming::NamingContext::_narrow (item, IT_env); - if (IT_env.exception () != 0) - { - IT_env.print_exception ("NS_NamingContext::resolve"); - return 0; - } - } - else - { - IT_env.clear (); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::NotFound (CosNaming::NamingContext::not_context, n)); - return 0; - } - /* @@ */// throw CosNaming::NamingContext::NotFound (CosNaming::NamingContext::not_context, n); - - CosNaming::Name rest_of_name; - rest_of_name.length (len - 1); - for (CORBA::ULong i = 1; i < len; i++) - rest_of_name[i-1] = n[i]; - - return (cont->resolve (rest_of_name, IT_env)); - } - - // if the name we had to resolve was simple, we just need - // to return the result. - return (item->_duplicate (item)); -} - -void -NS_NamingContext::unbind (const CosNaming::Name& n, - CORBA::Environment &IT_env) -{ - // if (do_operation (n, CORBA::_nil (), NS_NamingContext::unbind) == 0) - - // get the length of the name - CORBA::ULong len = n.length (); - - // check for invalid name. - if (len == 0) - { - IT_env.clear (); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::InvalidName); - return; - } - /* @@ *//// throw CosNaming::NamingContext::InvalidName (); - - // If we received compound name, resolve it to get the context in - // which the unbinding should take place, then perform the unbinding - // on target context. - if (len > 1) - { - CosNaming::NamingContext_var cont = get_context (n); - CosNaming::Name simple_name; - simple_name.length (1); - simple_name[0] = n[len - 1]; - cont->unbind (simple_name, IT_env); - } - else - // If we received a simple name, we need to unbind it in this - // context. - { - NS_ExtId name (n[0].id, n[0].kind); - // try unbinding the name. - if (context_.unbind (name) == -1) - { - IT_env.clear (); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::NotFound (CosNaming::NamingContext::not_object, n)); - return; - } - /* @@ */// throw CosNaming::NamingContext::NotFound (CosNaming::NamingContext::not_object, n); - } -} - -CosNaming::NamingContext_ptr -NS_NamingContext::new_context (CORBA::Environment &IT_env) -{ - // Macro to avoid "warning: unused parameter" type warning. - ACE_UNUSED_ARG (IT_env); - - NS_NamingContext *c = new NS_NamingContext; - // CosNaming::NamingContext_ptr cont - //= new TIE_CosNaming_NamingContext (NS_NamingContext) (c); - - // c->initialize (cont); - - return c->_duplicate (c); -} - -CosNaming::NamingContext_ptr -NS_NamingContext::bind_new_context (const CosNaming::Name& n, - CORBA::Environment &IT_env) -{ - NS_NamingContext *c = new NS_NamingContext; - // CosNaming::NamingContext_ptr cont = - // new TIE_CosNaming_NamingContext (NS_NamingContext) (c); - - // c->initialize (cont); - - bind_context (n, c, IT_env); - CORBA::release (c); - CORBA::release (c); - CORBA::release (c); - CORBA::release (c); - - return c->_duplicate (c); -} - -void -NS_NamingContext::destroy (CORBA::Environment &IT_env) -{ - // Macro to avoid "warning: unused parameter" type warning. - ACE_UNUSED_ARG (IT_env); - - if (context_.current_size () != 0) - { - IT_env.clear (); - IT_env.exception (new CORBA::UNKNOWN (CORBA::COMPLETED_NO)); - // IT_env.exception (new ACE_NESTED_CLASS (CosNaming,NamingContext)::NotEmpty); - return; - } - /* @@ */// throw CosNaming::NamingContext::NotEmpty (); - - // destroy context - CORBA::release (tie_ref_); -} - -void -NS_NamingContext::list (CORBA::ULong how_many, - CosNaming::BindingList_out bl, - CosNaming::BindingIterator_out bi, - CORBA::Environment &IT_env) -{ - // Macro to avoid "warning: unused parameter" type warning. - ACE_UNUSED_ARG (IT_env); - - // Dynamically allocate hash map iterator. - NS_NamingContext::HASH_MAP::ITERATOR *hash_iter = - new NS_NamingContext::HASH_MAP::ITERATOR (context_); - - // Number of bindings that will go into the BindingList. - CORBA::ULong n; - - if (context_.current_size () > how_many) - // number of bindings in the context is > <how_many> - // so need to return a BindingIterator. - { - NS_BindingIterator *bind_iter = new NS_BindingIterator (hash_iter); - - ACE_UNUSED_ARG (bind_iter); - - // bind_iter->initialize (bi); - bi->_duplicate (bi); - - n = how_many; - } - else - { - // Number of bindings in the context is <= <how_many>, - // so do not need to return a BindingIterator. - bi = CosNaming::BindingIterator::_nil (); - n = context_.current_size (); - } - - // use hash iterator to populate a BindingList with - // bindings. - CosNaming::BindingList bindings; - bindings.length (n); - NS_NamingContext::HASH_MAP::ENTRY *hash_entry; - - for (CORBA::ULong i = 0; i < n; i++) - { - hash_iter->next (hash_entry); - hash_iter->advance (); - - bindings[i].binding_type = hash_entry->int_id_.type_; - - bindings[i].binding_name.length (1); - bindings[i].binding_name[0].id = - CORBA::string_dup (hash_entry->ext_id_.id_.fast_rep ()); - bindings[i].binding_name[0].kind = - CORBA::string_dup (hash_entry->ext_id_.kind_.fast_rep ()); - } - // Marina, please add check for memory failure. - bl = new CosNaming::BindingList (bindings); - - // If did not allocate BindingIterator, deallocate hash map - // iterator. - if (context_.current_size () <= how_many) - delete hash_iter; -} - -NS_BindingIterator::NS_BindingIterator (NS_NamingContext::HASH_MAP::ITERATOR *hash_iter) -{ - hash_iter_ = hash_iter; -} - -NS_BindingIterator::~NS_BindingIterator (void) -{ - delete hash_iter_; -} - -CORBA::Boolean -NS_BindingIterator::next_one (CosNaming::Binding_out b, - CORBA::Environment &IT_env) -{ - // Macro to avoid "warning: unused parameter" type warning. - ACE_UNUSED_ARG (IT_env); - - if (hash_iter_->done ()) { - b = new CosNaming::Binding; - return 0; - } - else - { - b = new CosNaming::Binding; - - NS_NamingContext::HASH_MAP::ENTRY *hash_entry; - hash_iter_->next (hash_entry); - hash_iter_->advance (); - - b->binding_type = hash_entry->int_id_.type_; - - b->binding_name.length (1); - b->binding_name[0].id = - CORBA::string_dup (hash_entry->ext_id_.id_.fast_rep ()); - b->binding_name[0].kind = - CORBA::string_dup (hash_entry->ext_id_.kind_.fast_rep ()); - - return 1; - } -} - -CORBA::Boolean -NS_BindingIterator::next_n (CORBA::ULong how_many, - CosNaming::BindingList_out bl, - CORBA::Environment &IT_env) -{ - // Macro to avoid "warning: unused parameter" type warning. - ACE_UNUSED_ARG (IT_env); - - if (hash_iter_->done ()) { - bl = new CosNaming::BindingList; - return 0; - } - else - { - // Statically allocate a BindingList. - CosNaming::BindingList bindings; - - // Initially assume that iterator has the requested number of - // bindings. - bindings.length (how_many); - - // Iterate and populate the BindingList. - NS_NamingContext::HASH_MAP::ENTRY *hash_entry; - for (CORBA::ULong i = 0; i < how_many; i++) - { - hash_iter_->next (hash_entry); - - bindings[i].binding_type = hash_entry->int_id_.type_; - - bindings[i].binding_name.length (1); - bindings[i].binding_name[0].id = - CORBA::string_dup (hash_entry->ext_id_.id_.fast_rep ()); - bindings[i].binding_name[0].kind = - CORBA::string_dup (hash_entry->ext_id_.kind_.fast_rep ()); - - if (hash_iter_->advance () == 0) - { - // If no more bindings left, reset length to the actual - // number of bindings populated and get out of the loop. - bindings.length (i + 1); - break; - } - } - - bl = new CosNaming::BindingList (bindings); - // Marina, please check for failed memory allocation. - return 1; - } -} - -void -NS_BindingIterator::destroy (CORBA::Environment &IT_env) -{ - // Macro to avoid "warning: unused parameter" type warning. - ACE_UNUSED_ARG (IT_env); - - // CORBA::release (tie_ref_); -} - -#if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) -// These templates will specialized in libACE.* if the platforms does -// not define ACE_MT_SAFE. - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Hash_Map_Manager<NS_ExtId, NS_IntId, ACE_Null_Mutex>; -template class ACE_Hash_Map_Entry<NS_ExtId, NS_IntId>; -template class ACE_Hash_Map_Iterator<NS_ExtId, NS_IntId, ACE_Null_Mutex>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Hash_Map_Manager<NS_ExtId, NS_IntId, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Entry<NS_ExtId, NS_IntId> -#pragma instantiate ACE_Hash_Map_Iterator<NS_ExtId, NS_IntId, ACE_Null_Mutex> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ -#endif /* ACE_MT_SAFE */ - diff --git a/TAO/orbsvcs/bin/Naming_Service/CosNaming_i.h b/TAO/orbsvcs/bin/Naming_Service/CosNaming_i.h deleted file mode 100644 index 6ef104a7a23..00000000000 --- a/TAO/orbsvcs/bin/Naming_Service/CosNaming_i.h +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- C++ -*- */ - -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// cos -// -// = FILENAME -// CosNaming_i.h -// -// = AUTHOR -// Sergio Flores-Gaitan <sergio@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (COSNAMING_I_H) -#define COSNAMING_I_H - -#include "CosNamingS.h" -#include "NS_CosNaming.h" - -class NS_NamingContext : public POA_CosNaming::NamingContext - // = TITLE - // This class implements the NamingContext interface that is part of the - // CosNaming idl module. - // - // = DESCRIPTION - // Extensive comments can be found in the idl file. -{ - public: - - enum - { - NS_MAP_SIZE = 23 - // The size of hash map for a NS_NamingContext object. - }; - - typedef ACE_Hash_Map_Manager<NS_ExtId, NS_IntId, ACE_Null_Mutex> HASH_MAP; - - NS_NamingContext (void); - // default constructor. - - ~NS_NamingContext (void); - // destructor. - - virtual void bind (const CosNaming::Name &n, - CORBA::Object_ptr obj, - CORBA::Environment &IT_env); - - virtual void rebind (const CosNaming::Name &n, - CORBA::Object_ptr obj, - CORBA::Environment &IT_env); - - virtual void bind_context (const CosNaming::Name &n, - CosNaming::NamingContext_ptr nc, - CORBA::Environment &IT_env); - - virtual void rebind_context (const CosNaming::Name &n, - CosNaming::NamingContext_ptr nc, - CORBA::Environment &IT_env); - - virtual CORBA::Object_ptr resolve (const CosNaming::Name &n, - CORBA::Environment &IT_env); - - virtual void unbind (const CosNaming::Name &n, - CORBA::Environment &IT_env); - - virtual CosNaming::NamingContext_ptr new_context (CORBA::Environment &IT_env); - - virtual CosNaming::NamingContext_ptr bind_new_context (const CosNaming::Name &n, - CORBA::Environment &IT_env); - - virtual void destroy (CORBA::Environment &IT_env); - - virtual void list (CORBA::ULong how_many, - CosNaming::BindingList_out bl, - CosNaming::BindingIterator_out bi, - CORBA::Environment &IT_env); - - protected: - // = These are the helper methods used by other methods. - - CosNaming::NamingContext_ptr get_context (const CosNaming::Name &name); - // This is used by methods that need to resolve a compound name to - // get the reference to the target context before performing the - // actual operation (e.g. bind, unbind, etc.) Takes a full name - // (including the last component that doesn't need to be resolved) - // Returns a pointer to the target context. - - private: - - HASH_MAP context_; - // This implementation of NamingContext uses ACE thread-safe Hash - // Map for storage and manipulation of name-object bindings. - - CosNaming::NamingContext_ptr tie_ref_; - // Stores CORBA object reference to the TIE object this object - // implements. This is needed to implement the <destroy> method. -}; - -class NS_BindingIterator : public POA_CosNaming::BindingIterator - // = TITLE - // This class implements the BindingIterator interface - // that is part of the CosNaming idl module. - // - // = DESCRIPTION - // NS_BindingIterator constructor expects a pointer to a - // DYNAMICALLY allocated hash map iterator. Destructor - // deallocates hash map iterator. -{ - public: - // = Intialization and termination methods. - NS_BindingIterator (NS_NamingContext::HASH_MAP::ITERATOR *hash_iter); - // constructor. - - ~NS_BindingIterator (void); - // destructor. - - // Marina, please add comments. - CORBA::Boolean next_one (CosNaming::Binding_out b, - CORBA::Environment &IT_env); - - CORBA::Boolean next_n (CORBA::ULong how_many, - CosNaming::BindingList_out bl, - CORBA::Environment &IT_env); - - void destroy (CORBA::Environment &IT_env); - - private: - NS_NamingContext::HASH_MAP::ITERATOR *hash_iter_; - // A pointer to the hash map iterator. -}; - - - - -// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -#if 0 -class CosNaming_i : public POA_CosNaming - // = TITLE - // Integrates the naming service with the - // generated skeleton. - // = DESCRIPTION - // Implementation of the naming service at the servant side. -{ - public: - CosNaming_i (void); - // constructor - - ~CosNaming_i (void); - // destructor - - static CosNaming::NamingContext_ptr _bind (const char *host, - CORBA::ULong port, - const char *key, - CORBA::Environment &env); - - NamingContext & naming_context (void) - { - return nc; - } - - private: - NS_NamingContext nc; - // not sure about this. -}; -#endif - - -#endif /* COSNAMING_I_H */ diff --git a/TAO/orbsvcs/bin/Naming_Service/Makefile b/TAO/orbsvcs/bin/Naming_Service/Makefile deleted file mode 100644 index c8b53530a75..00000000000 --- a/TAO/orbsvcs/bin/Naming_Service/Makefile +++ /dev/null @@ -1,551 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -SVR_SRCS=NS_CosNaming.cpp CosNaming_i.cpp svr.cpp - -LSRC = $(SVR_SRCS) - -SVR_OBJS = $(SVR_SRCS:.cpp=.o) - -BIN = svr -BUILD = $(BIN) -LDLIBS = -lorbsvcs -lTAO -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -# include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif -TSS_ORB_FLAG = #-DTAO_HAS_TSS_ORBCORE -DCFLAGS = -g -LDFLAGS += -L$(TAO_ROOT)/orbsvcs/lib -L$(TAO_ROOT)/tao -CPPFLAGS += -I$(TAO_ROOT)/orbsvcs/lib -I$(TAO_ROOT) -I$(TAO_ROOT)/tao/compat $(TSS_ORB_FLAG)#-H - -#$(IDL_SRC): CosNaming.idl logger.idl -# $(TAO_ROOT)/TAO_IDL/tao_idl CosNaming.idl -# $(TAO_ROOT)/TAO_IDL/tao_idl logger.idl -# - -svr: $(addprefix $(VDIR),$(SVR_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/NS_CosNaming.o .shobj/NS_CosNaming.: NS_CosNaming.cpp NS_CosNaming.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/stdcpp.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/Version.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(TAO_ROOT)/tao/corba.h \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(TAO_ROOT)/tao/orbconf.h \ - $(TAO_ROOT)/tao/orb.h \ - $(TAO_ROOT)/tao/corbacom.h \ - $(TAO_ROOT)/tao/object.h \ - $(TAO_ROOT)/tao/align.h \ - $(TAO_ROOT)/tao/sequence.h \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/any.h \ - $(TAO_ROOT)/tao/poa.h \ - $(TAO_ROOT)/tao/tao_internals.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/client_factory.h \ - $(TAO_ROOT)/tao/server_factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/except.h \ - $(TAO_ROOT)/tao/orbobj.h \ - $(TAO_ROOT)/tao/nvlist.h \ - $(TAO_ROOT)/tao/principa.h \ - $(TAO_ROOT)/tao/request.h \ - $(TAO_ROOT)/tao/svrrqst.h \ - $(TAO_ROOT)/tao/typecode.h \ - $(TAO_ROOT)/tao/marshal.h \ - $(TAO_ROOT)/tao/cdr.h \ - $(TAO_ROOT)/tao/stub.h \ - $(TAO_ROOT)/tao/connect.h \ - $(TAO_ROOT)/tao/orb_core.h \ - $(TAO_ROOT)/tao/objtable.h \ - $(TAO_ROOT)/tao/optable.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/iiopobj.h \ - $(TAO_ROOT)/tao/iioporb.h \ - $(TAO_ROOT)/tao/giop.h \ - $(TAO_ROOT)/tao/orb_core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(TAO_ROOT)/tao/corbacom.i \ - $(TAO_ROOT)/tao/sequence.i \ - $(TAO_ROOT)/tao/typecode.i \ - $(TAO_ROOT)/tao/any.i \ - $(TAO_ROOT)/tao/cdr.i \ - $(TAO_ROOT)/tao/stub.i \ - $(TAO_ROOT)/tao/object.i \ - $(TAO_ROOT)/tao/orbobj.i \ - $(TAO_ROOT)/tao/marshal.i \ - $(TAO_ROOT)/tao/poa.i \ - $(TAO_ROOT)/tao/giop.i \ - $(TAO_ROOT)/tao/iioporb.i \ - $(TAO_ROOT)/tao/iiopobj.i \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/server_factory.i \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/connect.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/orbsvcs/lib/CosNamingC.h \ - $(TAO_ROOT)/orbsvcs/lib/CosNamingC.i -.obj/CosNaming_i.o .shobj/CosNaming_i.: CosNaming_i.cpp CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/lib/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/lib/CosNamingC.h \ - $(TAO_ROOT)/tao/corba.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/stdcpp.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/Version.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(TAO_ROOT)/tao/orbconf.h \ - $(TAO_ROOT)/tao/orb.h \ - $(TAO_ROOT)/tao/corbacom.h \ - $(TAO_ROOT)/tao/object.h \ - $(TAO_ROOT)/tao/align.h \ - $(TAO_ROOT)/tao/sequence.h \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/any.h \ - $(TAO_ROOT)/tao/poa.h \ - $(TAO_ROOT)/tao/tao_internals.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/client_factory.h \ - $(TAO_ROOT)/tao/server_factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/except.h \ - $(TAO_ROOT)/tao/orbobj.h \ - $(TAO_ROOT)/tao/nvlist.h \ - $(TAO_ROOT)/tao/principa.h \ - $(TAO_ROOT)/tao/request.h \ - $(TAO_ROOT)/tao/svrrqst.h \ - $(TAO_ROOT)/tao/typecode.h \ - $(TAO_ROOT)/tao/marshal.h \ - $(TAO_ROOT)/tao/cdr.h \ - $(TAO_ROOT)/tao/stub.h \ - $(TAO_ROOT)/tao/connect.h \ - $(TAO_ROOT)/tao/orb_core.h \ - $(TAO_ROOT)/tao/objtable.h \ - $(TAO_ROOT)/tao/optable.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/iiopobj.h \ - $(TAO_ROOT)/tao/iioporb.h \ - $(TAO_ROOT)/tao/giop.h \ - $(TAO_ROOT)/tao/orb_core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(TAO_ROOT)/tao/corbacom.i \ - $(TAO_ROOT)/tao/sequence.i \ - $(TAO_ROOT)/tao/typecode.i \ - $(TAO_ROOT)/tao/any.i \ - $(TAO_ROOT)/tao/cdr.i \ - $(TAO_ROOT)/tao/stub.i \ - $(TAO_ROOT)/tao/object.i \ - $(TAO_ROOT)/tao/orbobj.i \ - $(TAO_ROOT)/tao/marshal.i \ - $(TAO_ROOT)/tao/poa.i \ - $(TAO_ROOT)/tao/giop.i \ - $(TAO_ROOT)/tao/iioporb.i \ - $(TAO_ROOT)/tao/iiopobj.i \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/server_factory.i \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/connect.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/orbsvcs/lib/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/lib/CosNamingS.i \ - NS_CosNaming.h -.obj/svr.o .shobj/svr.: svr.cpp CosNaming_i.h \ - $(TAO_ROOT)/orbsvcs/lib/CosNamingS.h \ - $(TAO_ROOT)/orbsvcs/lib/CosNamingC.h \ - $(TAO_ROOT)/tao/corba.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/stdcpp.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/Version.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/Get_Opt.h \ - $(ACE_ROOT)/ace/Get_Opt.i \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i \ - $(ACE_ROOT)/ace/Strategies.h \ - $(ACE_ROOT)/ace/Strategies_T.h \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Object_Manager.h \ - $(ACE_ROOT)/ace/Object_Manager.i \ - $(ACE_ROOT)/ace/Managed_Object.h \ - $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Synch_Options.h \ - $(ACE_ROOT)/ace/Connector.h \ - $(ACE_ROOT)/ace/Map_Manager.h \ - $(ACE_ROOT)/ace/Map_Manager.i \ - $(ACE_ROOT)/ace/Svc_Handler.h \ - $(ACE_ROOT)/ace/Task.h \ - $(ACE_ROOT)/ace/Thread_Manager.h \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i \ - $(ACE_ROOT)/ace/Task_T.h \ - $(ACE_ROOT)/ace/Message_Queue.h \ - $(ACE_ROOT)/ace/Message_Block.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - $(ACE_ROOT)/ace/Message_Block.i \ - $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ - $(ACE_ROOT)/ace/Message_Queue.i \ - $(ACE_ROOT)/ace/Task_T.i \ - $(ACE_ROOT)/ace/Dynamic.h \ - $(ACE_ROOT)/ace/Dynamic.i \ - $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Singleton.i \ - $(ACE_ROOT)/ace/Svc_Handler.i \ - $(ACE_ROOT)/ace/Connector.i \ - $(ACE_ROOT)/ace/Acceptor.h \ - $(ACE_ROOT)/ace/Acceptor.i \ - $(TAO_ROOT)/tao/orbconf.h \ - $(TAO_ROOT)/tao/orb.h \ - $(TAO_ROOT)/tao/corbacom.h \ - $(TAO_ROOT)/tao/object.h \ - $(TAO_ROOT)/tao/align.h \ - $(TAO_ROOT)/tao/sequence.h \ - $(TAO_ROOT)/tao/varout.h \ - $(TAO_ROOT)/tao/any.h \ - $(TAO_ROOT)/tao/poa.h \ - $(TAO_ROOT)/tao/tao_internals.h \ - $(TAO_ROOT)/tao/params.h \ - $(TAO_ROOT)/tao/client_factory.h \ - $(TAO_ROOT)/tao/server_factory.h \ - $(TAO_ROOT)/tao/default_client.h \ - $(TAO_ROOT)/tao/default_server.h \ - $(TAO_ROOT)/tao/except.h \ - $(TAO_ROOT)/tao/orbobj.h \ - $(TAO_ROOT)/tao/nvlist.h \ - $(TAO_ROOT)/tao/principa.h \ - $(TAO_ROOT)/tao/request.h \ - $(TAO_ROOT)/tao/svrrqst.h \ - $(TAO_ROOT)/tao/typecode.h \ - $(TAO_ROOT)/tao/marshal.h \ - $(TAO_ROOT)/tao/cdr.h \ - $(TAO_ROOT)/tao/stub.h \ - $(TAO_ROOT)/tao/connect.h \ - $(TAO_ROOT)/tao/orb_core.h \ - $(TAO_ROOT)/tao/objtable.h \ - $(TAO_ROOT)/tao/optable.h \ - $(TAO_ROOT)/tao/debug.h \ - $(TAO_ROOT)/tao/iiopobj.h \ - $(TAO_ROOT)/tao/iioporb.h \ - $(TAO_ROOT)/tao/giop.h \ - $(TAO_ROOT)/tao/orb_core.i \ - $(ACE_ROOT)/ace/Dynamic_Service.h \ - $(TAO_ROOT)/tao/corbacom.i \ - $(TAO_ROOT)/tao/sequence.i \ - $(TAO_ROOT)/tao/typecode.i \ - $(TAO_ROOT)/tao/any.i \ - $(TAO_ROOT)/tao/cdr.i \ - $(TAO_ROOT)/tao/stub.i \ - $(TAO_ROOT)/tao/object.i \ - $(TAO_ROOT)/tao/orbobj.i \ - $(TAO_ROOT)/tao/marshal.i \ - $(TAO_ROOT)/tao/poa.i \ - $(TAO_ROOT)/tao/giop.i \ - $(TAO_ROOT)/tao/iioporb.i \ - $(TAO_ROOT)/tao/iiopobj.i \ - $(TAO_ROOT)/tao/params.i \ - $(TAO_ROOT)/tao/server_factory.i \ - $(TAO_ROOT)/tao/default_client.i \ - $(TAO_ROOT)/tao/default_server.i \ - $(TAO_ROOT)/tao/connect.i \ - $(TAO_ROOT)/tao/singletons.h \ - $(TAO_ROOT)/orbsvcs/lib/CosNamingC.i \ - $(TAO_ROOT)/orbsvcs/lib/CosNamingS.i \ - NS_CosNaming.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/bin/Naming_Service/NS_CosNaming.cpp b/TAO/orbsvcs/bin/Naming_Service/NS_CosNaming.cpp deleted file mode 100644 index ee1843581db..00000000000 --- a/TAO/orbsvcs/bin/Naming_Service/NS_CosNaming.cpp +++ /dev/null @@ -1,107 +0,0 @@ -// ============================================================================ -// -// = LIBRARY -// cos -// -// = FILENAME -// NS_CosNaming.C -// -// = AUTHOR -// Marina Spivak <marina@cs.wustl.edu> -// -// ============================================================================ - -#include "NS_CosNaming.h" - -NS_IntId::NS_IntId (void) - : type_ (CosNaming::nobject) -{ - ref_ = CORBA::Object::_nil (); -} - -NS_IntId::NS_IntId (CORBA::Object_ptr obj, - CosNaming::BindingType type) - : type_ (type) -{ - ref_ = obj->_duplicate (obj); -} - -NS_IntId::NS_IntId (const NS_IntId &rhs) -{ - type_ = rhs.type_; - ref_ = rhs.ref_->_duplicate (rhs.ref_); -} - -NS_IntId::~NS_IntId (void) -{ - CORBA::release (ref_); -} - -void -NS_IntId::operator= (const NS_IntId &rhs) -{ - // check for self assignment. - if (&rhs == this) - return; - - type_ = rhs.type_; - - CORBA::release (ref_); - ref_ = rhs.ref_->_duplicate (rhs.ref_); -} - -NS_ExtId::NS_ExtId (void) - : kind_ (), - id_ () -{ -} - -NS_ExtId::NS_ExtId (const char *id, - const char *kind) - : kind_ (kind), - id_ (id) -{ -} - -NS_ExtId::NS_ExtId (const NS_ExtId &rhs) -{ - id_ = rhs.id_; - kind_ = rhs.kind_; -} - -NS_ExtId::~NS_ExtId (void) -{ -} - -void -NS_ExtId::operator= (const NS_ExtId &rhs) -{ - // Check for self assignment. - if (&rhs == this) - return; - - id_ = rhs.id_; - kind_ = rhs.kind_; -} - -int -NS_ExtId::operator== (const NS_ExtId &rhs) const -{ - return id_ == rhs.id_ && kind_ == rhs.kind_; -} - -int -NS_ExtId::operator!= (const NS_ExtId &rhs) const -{ - return id_ != rhs.id_ || kind_ != rhs.kind_; -} - -u_long -NS_ExtId::hash (void) const -{ - ACE_CString temp (id_); - temp += kind_; - - return temp.hash (); -} - diff --git a/TAO/orbsvcs/bin/Naming_Service/NS_CosNaming.h b/TAO/orbsvcs/bin/Naming_Service/NS_CosNaming.h deleted file mode 100644 index f897f23d2ca..00000000000 --- a/TAO/orbsvcs/bin/Naming_Service/NS_CosNaming.h +++ /dev/null @@ -1,108 +0,0 @@ -/* -*- C++ -*- */ - -// ============================================================================ -// -// = LIBRARY -// cos -// -// = FILENAME -// NS_CosNaming.h -// -// = AUTHOR -// Marina Spivak <marina@cs.wustl.edu> -// -// ============================================================================ - -#if !defined (NS_COSNAMING_H) -#define NS_COSNAMING_H - -#include "ace/Hash_Map_Manager.h" -#include "ace/Synch.h" -#include "ace/SString.h" - -#include "tao/corba.h" -#include "CosNamingC.h" - -class NS_IntId - // = TITLE - // Stores information a context keeps for each bound name - // (object reference and the type of binding). - // - // = DESCRIPTION - // - // - // - // -{ -public: - // = Initialization and termination methods. - NS_IntId (void); - // default constructor. - - NS_IntId (CORBA::Object_ptr obj, - CosNaming::BindingType type = CosNaming::nobject); - // constructor. - - NS_IntId (const NS_IntId & rhs); - // copy constructor - - ~NS_IntId (void); - // destructor - - void operator= (const NS_IntId & rhs); - // Assignment operator (does copy memory). - - CORBA::Object_ptr ref_; - // CORBA object reference of the bound object. - - CosNaming::BindingType type_; - // Indicator of whether the object is a NamingContext that should - // participate in name resolution when compound names are used. -}; - -class NS_ExtId - // = TITLE - // Stores the name to which an object is bound. - // - // = DESCRIPTION - // - // - // - // -{ -public: - // = Initialization and termination methods. - NS_ExtId (void); - // default constructor. - - NS_ExtId (const char *id, - const char *kind); - // constructor. - - NS_ExtId (const NS_ExtId & rhs); - // copy constructor - - ~NS_ExtId (void); - // destructor - - void operator= (const NS_ExtId & rhs); - // Assignment operator (does copy memory). - - int operator== (const NS_ExtId &rhs) const; - // Equality comparison operator (must match both id_ and kind_). - - int operator!= (const NS_ExtId &rhs) const; - // Inequality comparison operator. - - u_long hash (void) const; - // This class has to have a hash for use with ACE_Hash_Map_Manager. - - ACE_CString kind_; - // any information user wants to store (not used by Naming Service). - - ACE_CString id_; - // any information user wants to store (not used by Naming Service). -}; - - -#endif /* NS_COSNAMING_H */ diff --git a/TAO/orbsvcs/bin/Naming_Service/svc.conf b/TAO/orbsvcs/bin/Naming_Service/svc.conf deleted file mode 100644 index 43c6a486c92..00000000000 --- a/TAO/orbsvcs/bin/Naming_Service/svc.conf +++ /dev/null @@ -1,49 +0,0 @@ -# $Id$ -# -# This file contains a sample ACE_Service_Config configuration -# file specifying the strategy factories utilized by an application -# using TAO. There are currently only two possible factories: -# Client_Strategy_Factory and Server_Strategy_Factory. These names -# must be used as the second argument to their corresponding line, -# because that's what the ORB uses to find the desired factory. -# -# Note that there are two unordinary characteristics of the way *this* -# file is set up: -# - both client and server strategies are specified in the same -# file, which would only make sense for co-located clients & servers -# - both of the factories are actually sourced out of libTAO.so -# (TAO.DLL on Win32), and they would normally be in a separate -# dll from the TAO ORB Core. -# -# The options which can be passed to the Resource Factory are: -# -# -ORBresources <which> -# where <which> can be 'global' to specify globally-held resources, -# or 'tss' to specify thread-specific resources. -# -# The options which can be passed to the Client are: -# <none currently> -# -# The options which can be passed to the Server are: -# -# -ORBconcurrency <which> -# where <which> can be 'thread-per-connection' to specify -# use of the ACE_Threaded_Strategy concurrency strategy, -# or 'reactive' to specify use of the ACE_Reactive_Strategy -# concurrency strategy. -# -# -ORBthreadflags <flags> -# specifies the default thread flags to use, where <flags> is a -# logical OR'ing of the flags THR_DETACHED, THR_BOUND, THR_NEW_LWP, -# THR_SUSPENDED, or THR_DAEMON. Note that not every flag may be valid -# on every platform. -# -# -ORBdemuxstrategy <which> -# where <which> can be one of 'dynamic', 'linear', 'active', or 'user', -# and specifies the type of object lookup strategy used internally. -# -ORBtablesize <unsigned> -# specifies the size of the object table -# -dynamic Resource_Factory Service_Object * TAO:_make_TAO_Resource_Factory() "-ORBresources global" -dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBconcurrency reactive -ORBdemuxstrategy dynamic -ORBtablesize 128" diff --git a/TAO/orbsvcs/bin/Naming_Service/svr.cpp b/TAO/orbsvcs/bin/Naming_Service/svr.cpp deleted file mode 100644 index 2921db2be04..00000000000 --- a/TAO/orbsvcs/bin/Naming_Service/svr.cpp +++ /dev/null @@ -1,171 +0,0 @@ -// -// $Id$ -// -#include <iostream.h> -#include "CosNaming_i.h" -#include "svr.h" - -// This is a startup for the naming server. -// This is used for testing of the Naming Service. - -ACE_HANDLE -IOR_Multicast::get_handle (void) const -{ - return this->mcast_dgram_.get_handle (); -} - -IOR_Multicast::IOR_Multicast (char * ior, - u_short port, - const char *mcast_addr) - : mcast_addr_ (port, mcast_addr), - ior_ (ior), - response_ (response_addr_) -{ - // Use ACE_SOCK_Dgram_Mcast factory to subscribe to multicast group. - if (this->mcast_dgram_.subscribe (this->mcast_addr_) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "subscribe")); -} - -// destructor - -IOR_Multicast::~IOR_Multicast (void) -{ - this->mcast_dgram_.unsubscribe (); -} - -int -IOR_Multicast::handle_timeout (const ACE_Time_Value &, - const void *) -{ - return 0; -} - -int -IOR_Multicast::handle_input (ACE_HANDLE) -{ - ssize_t retcode = - this->mcast_dgram_.recv (this->buf_, - BUFSIZ, - this->remote_addr_); - - if (retcode == -1) - return -1; - - ACE_DEBUG ((LM_DEBUG, "Received multicast.\n")); - - // @@ validate data string received is from a valid client here - // @@ Probably not needed - - if (retcode != sizeof (CORBA::Short)) - { - ACE_ERROR_RETURN ((LM_ERROR, - "Reply to multicast not sent. Received %d bytes, expected %d.", - retcode, - sizeof(CORBA::Short)), -1); - } - - // convert port number received to network byte order. - CORBA::Short reply_port_number = ntohs (*(CORBA::Short *)this->buf_); - - // set port number to reply. - this->remote_addr_.set_port_number (reply_port_number); - - // send the object reference for the naming service - retcode = response_.send (this->ior_, - ACE_OS::strlen (this->ior_) + 1, - this->remote_addr_, - 0); - - ACE_DEBUG ((LM_DEBUG, - "ior_ '%s' sent through port %u.\nretcode=%d\n", - this->ior_, - this->remote_addr_.get_port_number (), - retcode)); - - if (retcode == -1) - return -1; - - return 0; -} - - -int -main (int argc, char ** argv) -{ - CORBA::Environment env; - char *orb_name = "internet"; - - CORBA::ORB_ptr orb_ptr = CORBA::ORB_init (argc, - argv, - orb_name, - env); - - if (env.exception () != 0) - { - env.print_exception ("ORB init"); - return 1; - } - - // Initialize the Object Adapter - CORBA::POA_ptr oa_ptr = orb_ptr->POA_init (argc, argv, "POA"); - - if (oa_ptr == 0) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) Unable to initialize the POA.\n"), - 1); - - // Create a naming context object. - NS_NamingContext *naming_context = new NS_NamingContext; - - // Stringify the objref we'll be implementing, and print it to - // stdout. Someone will take that string and give it to a - // client. Then release the object. - CORBA::String str; - str = orb_ptr->object_to_string (naming_context, env); - - if (env.exception () != 0) - { - env.print_exception ("object2string"); - return 1; - } - - ACE_DEBUG ((LM_DEBUG, "listening as object '%s'\n", str)); - -#if defined (ACE_HAS_IP_MULTICAST) - // get reactor instance from TAO - ACE_Reactor *reactor = TAO_ORB_Core_instance ()->reactor (); - - // First, see if the user has given us a multicast port number - // for the name service on the command-line; - u_short port = TAO_ORB_Core_instance ()->orb_params ()->name_service_port (); - if (port == 0) - { - const char *port_number = ACE_OS::getenv ("NameServicePort"); - - if (port_number != 0) - port = ACE_OS::atoi (port_number); - } - - if (port == 0) - port = TAO_DEFAULT_NAME_SERVER_REQUEST_PORT; - - // Instantiate a server which will receive requests for an ior - IOR_Multicast ior_multicast (str, - port, - ACE_DEFAULT_MULTICAST_ADDR); - - // register event handler for the ior multicast. - if (reactor->register_handler (&ior_multicast, - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "register_handler", 1)); - - ACE_DEBUG ((LM_DEBUG, "The multicast server setup is done.\n")); -#endif /* ACE_HAS_IP_MULTICAST */ - - // Handle requests for this object until we're killed, or one of the - // methods asks us to exit. - if (orb_ptr->run () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); - - return 0; -} diff --git a/TAO/orbsvcs/bin/Naming_Service/svr.h b/TAO/orbsvcs/bin/Naming_Service/svr.h deleted file mode 100644 index 988145b53c8..00000000000 --- a/TAO/orbsvcs/bin/Naming_Service/svr.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO/orbsvcs/bin/Naming_Service -// -// = FILENAME -// svr.h -// -// = DESCRIPTION -// Defines a class that listens to a multicast address for client requests -// for ior of the naming service. -// -// = AUTHORS -// Sergio Flores-Gaitan -// -// ============================================================================ - -#if !defined (SVR_H) -#define SVR_H - -#include "ace/INET_Addr.h" -#include "ace/SOCK_Dgram_Mcast.h" -#include "ace/Reactor.h" - -class IOR_Multicast : public ACE_Event_Handler -{ -public: - // constructor - IOR_Multicast (char * ior, - u_short port, - const char *mcast_addr); - - // destructor - ~IOR_Multicast (void); - - // call back when input is received on the handle. - virtual int handle_input (ACE_HANDLE fd); - - // callback when a timeout has occurred. - virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg); - - // returns the internal handle used to receive multicast - virtual ACE_HANDLE get_handle (void) const; - -private: - char buf_[BUFSIZ]; - // temporary buffer - - ACE_SOCK_Dgram_Mcast mcast_dgram_; - // multicast endpoint of communication - - ACE_INET_Addr remote_addr_; - // remote address that sent multicast - - ACE_INET_Addr mcast_addr_; - // multicast address - - char * ior_; - // object reference to send in response to the multicast - - ACE_INET_Addr response_addr_; - // address of response. - - ACE_SOCK_Dgram response_; - // socket for response to the multicast -}; - -#endif /* SVR_H */ |