diff options
author | bala <balanatarajan@users.noreply.github.com> | 2003-08-28 22:08:39 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2003-08-28 22:08:39 +0000 |
commit | 104a20c06359bc24f95c87affc6add5aaf3888af (patch) | |
tree | dbd5106fd31f8165108debbdbc9e2977a652c112 | |
parent | d923d80cc369ebaba512dedc8337c3c467a6e025 (diff) | |
download | ATCD-104a20c06359bc24f95c87affc6add5aaf3888af.tar.gz |
ChangeLogTag:Thu Aug 28 16:50:48 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog_ref | 28 | ||||
-rw-r--r-- | TAO/tao/Abstract_Servant_Base.h | 23 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Operation_Table.cpp | 274 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Operation_Table.h | 121 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.h | 15 | ||||
-rw-r--r-- | TAO/tao/TODO | 2 |
7 files changed, 362 insertions, 113 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref index 1f978c304ed..0f81d4cc38b 100644 --- a/TAO/ChangeLog_ref +++ b/TAO/ChangeLog_ref @@ -1,3 +1,31 @@ +Thu Aug 28 16:50:48 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> + + * tao/Abstract_Servant_Base.h (_find): Added a new _find () method + that returns the static function pointer of functions that does + an upcall on a collocated object. Further, moved the _find () + methods to be public so that they can be used in the generated + code. + + * tao/PortableServer/Operation_Details.h: + * tao/PortableServer/Operation_Details.cpp: + Made the following changes + + (1) Added a new version of find () that is useful to get the + function pointer for collocated calls. This has been + implemented for all the lookup strategies in the POA. + + (2) Added a struct that encapulates all the skeleton pointers, + since they all the skeleton pointers are generated in the + skeleton code. + + (3) Changed the implementation of the dynamic hash and active + demux. We now cache all the pointers that are provided by the + generated code in the map instead of just one pointer. + + * tao/PortableServer/Servant_Base.h: + * tao/PortableServer/Servant_Base.cpp: Provided an implementation + of _find (). + Thu Aug 28 13:27:04 2003 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/be/be_visitor_interface/interface_cs.cpp: diff --git a/TAO/tao/Abstract_Servant_Base.h b/TAO/tao/Abstract_Servant_Base.h index fe1b6c50f9e..b9691f1ee50 100644 --- a/TAO/tao/Abstract_Servant_Base.h +++ b/TAO/tao/Abstract_Servant_Base.h @@ -109,6 +109,20 @@ public: /// This is an auxiliary method for _this() and _narrow(). virtual TAO_Stub *_create_stub (ACE_ENV_SINGLE_ARG_DECL) = 0; + /// Find an operation in the operation table and return a + /// TAO_Skeleton which can be used to make upcalls + virtual int _find (const char *opname, + TAO_Skeleton &skelfunc, + const unsigned int length = 0) = 0; + + /// Find an operation in the operation table and return a + /// TAO_Collocated_Skeleton which can be used to make upcalls onto + /// collocated servants. + virtual int _find (const char *opname, + TAO_Collocated_Skeleton &skelfunc, + TAO::Collocation_Strategy s, + const unsigned int length = 0) = 0; + protected: /// Default constructor, only derived classes can be created. @@ -136,15 +150,10 @@ protected: void *derived_this ACE_ENV_ARG_DECL) = 0; - /// Find an operation in the operation table. - virtual int _find (const char *opname, - TAO_Skeleton &skelfunc, - const unsigned int length = 0) = 0; - /// Register a CORBA IDL operation name. - virtual int _bind (const char *opname, + /*virtual int _bind (const char *opname, const TAO_Skeleton skel_ptr) = 0; - + */ /// Get this interface's repository id (TAO specific). virtual const char *_interface_repository_id (void) const = 0; diff --git a/TAO/tao/PortableServer/Operation_Table.cpp b/TAO/tao/PortableServer/Operation_Table.cpp index a47920a1c7c..b918a57402f 100644 --- a/TAO/tao/PortableServer/Operation_Table.cpp +++ b/TAO/tao/PortableServer/Operation_Table.cpp @@ -4,7 +4,9 @@ #include "tao/Timeprobe.h" #include "tao/ORB.h" -ACE_RCSID(tao, Operation_Table, "$Id$") +ACE_RCSID(PortableServer, + Operation_Table, + "$Id$") #if defined (ACE_ENABLE_TIMEPROBES) @@ -65,13 +67,19 @@ TAO_Dynamic_Hash_OpTable::TAO_Dynamic_Hash_OpTable (const TAO_operation_db_entry { // Iterate thru each entry in the database and bind the operation // name to its corresponding skeleton. - for (CORBA::ULong i = 0; i < dbsize; i++) - // @@ (ASG): what happens if bind fails ??? - if (this->bind (db[i].opname_, db[i].skel_ptr_) == -1) - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("(%P|%t) %p\n"), - ACE_TEXT ("bind failed"))); + { + TAO::Operation_Skeletons s; + s.skel_ptr_ = db[i].skel_ptr_; + s.thruPOA_skel_ptr_ = db[i].thruPOA_skel_ptr_; + s.direct_skel_ptr_ = db[i].direct_skel_ptr_; + + // @@ (ASG): what happens if bind fails ??? + if (this->bind (db[i].opname_, s) == -1) + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("bind failed"))); + } } TAO_Dynamic_Hash_OpTable::~TAO_Dynamic_Hash_OpTable (void) @@ -89,31 +97,69 @@ TAO_Dynamic_Hash_OpTable::~TAO_Dynamic_Hash_OpTable (void) // memory. CORBA::string_free ((char *) entry->ext_id_); entry->ext_id_ = 0; - - // We do not own this. So we just set it to 0. - entry->int_id_ = 0; } } int TAO_Dynamic_Hash_OpTable::bind (const char *opname, - const TAO_Skeleton skel_ptr) + const TAO::Operation_Skeletons skel_ptr) { - return this->hash_.bind (CORBA::string_dup (opname), skel_ptr); + return this->hash_.bind (CORBA::string_dup (opname), + skel_ptr); } int TAO_Dynamic_Hash_OpTable::find (const char *opname, TAO_Skeleton& skel_ptr, - const unsigned int length) + const unsigned int ) +{ + ACE_FUNCTION_TIMEPROBE (TAO_DYNAMIC_HASH_OPTABLE_FIND_START); + TAO::Operation_Skeletons s; + + int retval = + this->hash_.find ((const char *)opname, + s); + + if (retval != -1) + { + skel_ptr = s.skel_ptr_; + } + + return retval; +} + +int +TAO_Dynamic_Hash_OpTable::find (const char *opname, + TAO_Collocated_Skeleton& skel_ptr, + TAO::Collocation_Strategy s, + const unsigned int ) { - ACE_UNUSED_ARG (length); ACE_FUNCTION_TIMEPROBE (TAO_DYNAMIC_HASH_OPTABLE_FIND_START); - return this->hash_.find ((const char *)opname, skel_ptr); + TAO::Operation_Skeletons skel; + + int retval = + this->hash_.find ((const char *)opname, skel); + + if (retval != -1) + { + switch (s) + { + case TAO::TAO_CS_THRU_POA_STRATEGY: + skel_ptr = skel.thruPOA_skel_ptr_; + break; + case TAO::TAO_CS_DIRECT_STRATEGY: + skel_ptr = skel.direct_skel_ptr_; + break; + default: + return -1; + } + } + + return retval; } -// Linear search strategy +/***************************************************************/ TAO_Linear_Search_OpTable::TAO_Linear_Search_OpTable (void) { @@ -124,20 +170,17 @@ TAO_Linear_Search_OpTable::~TAO_Linear_Search_OpTable (void) } int -TAO_Linear_Search_OpTable::bind (const char *opname, - const TAO_Skeleton skel_ptr) +TAO_Linear_Search_OpTable::bind (const char *, + const TAO::Operation_Skeletons ) { - ACE_UNUSED_ARG (opname); - ACE_UNUSED_ARG (skel_ptr); return 0; } int TAO_Linear_Search_OpTable::find (const char *opname, TAO_Skeleton& skelfunc, - const unsigned int length) + const unsigned int ) { - ACE_UNUSED_ARG (length); ACE_FUNCTION_TIMEPROBE (TAO_LINEAR_SEARCH_OPTABLE_FIND_START); const TAO_operation_db_entry *entry = lookup (opname); @@ -152,7 +195,37 @@ TAO_Linear_Search_OpTable::find (const char *opname, return 0; } -// Active Demux search strategy + +int +TAO_Linear_Search_OpTable::find (const char *opname, + TAO_Collocated_Skeleton &skelfunc, + TAO::Collocation_Strategy st, + const unsigned int ) +{ + ACE_FUNCTION_TIMEPROBE (TAO_LINEAR_SEARCH_OPTABLE_FIND_START); + + const TAO_operation_db_entry *entry = lookup (opname); + if (entry == 0) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("TAO_Linear_Search_Table:find failed\n")), + -1); + + switch (st) + { + case TAO::TAO_CS_THRU_POA_STRATEGY: + skelfunc = entry->thruPOA_skel_ptr_; + break; + case TAO::TAO_CS_DIRECT_STRATEGY: + skelfunc = entry->direct_skel_ptr_; + break; + default: + return -1; + } + + return 0; +} + +/*********************************************************************/ TAO_Active_Demux_OpTable::TAO_Active_Demux_OpTable (const TAO_operation_db_entry *db, CORBA::ULong dbsize) @@ -167,8 +240,15 @@ TAO_Active_Demux_OpTable::TAO_Active_Demux_OpTable (const // database and bind the operation name to its corresponding // skeleton. for (CORBA::ULong i=0; i < dbsize; i++) - // @@ (ASG): what happens if bind fails ??? - (void) this->bind (db[i].opname_, db[i].skel_ptr_); + { + TAO::Operation_Skeletons s; + s.skel_ptr_ = db[i].skel_ptr_; + s.thruPOA_skel_ptr_ = db[i].thruPOA_skel_ptr_; + s.direct_skel_ptr_ = db[i].direct_skel_ptr_; + + // @@ (ASG): what happens if bind fails ??? + (void) this->bind (db[i].opname_, s); + } } TAO_Active_Demux_OpTable::~TAO_Active_Demux_OpTable (void) @@ -178,18 +258,18 @@ TAO_Active_Demux_OpTable::~TAO_Active_Demux_OpTable (void) int TAO_Active_Demux_OpTable::bind (const char *opname, - const TAO_Skeleton skel_ptr) + const TAO::Operation_Skeletons skel_ptr) { CORBA::ULong i = ACE_OS::atoi (opname); if (i < this->tablesize_) { - if (this->tbl_[i].skel_ptr_ != 0) + if (this->tbl_[i].op_skel_ptr_.skel_ptr_ != 0) // overwriting previous one return 1; else { - this->tbl_[i].skel_ptr_ = skel_ptr; + this->tbl_[i].op_skel_ptr_ = skel_ptr; return 0; } } @@ -199,29 +279,53 @@ TAO_Active_Demux_OpTable::bind (const char *opname, int TAO_Active_Demux_OpTable::find (const char *opname, TAO_Skeleton& skel_ptr, - const unsigned int length) + const unsigned int ) { - ACE_UNUSED_ARG (length); - ACE_FUNCTION_TIMEPROBE (TAO_ACTIVE_DEMUX_OPTABLE_FIND_START); CORBA::ULong i = ACE_OS::atoi (opname); ACE_ASSERT (i < this->tablesize_); - skel_ptr = this->tbl_[i].skel_ptr_; + skel_ptr = this->tbl_[i].op_skel_ptr_.skel_ptr_; return 0; //success } + +int +TAO_Active_Demux_OpTable::find (const char *opname, + TAO_Collocated_Skeleton& skel_ptr, + TAO::Collocation_Strategy st, + const unsigned int ) +{ + ACE_FUNCTION_TIMEPROBE (TAO_ACTIVE_DEMUX_OPTABLE_FIND_START); + + CORBA::ULong i = ACE_OS::atoi (opname); + + ACE_ASSERT (i < this->tablesize_); + + switch (st) + { + case TAO::TAO_CS_THRU_POA_STRATEGY: + skel_ptr = this->tbl_[i].op_skel_ptr_.thruPOA_skel_ptr_; + break; + case TAO::TAO_CS_DIRECT_STRATEGY: + skel_ptr = this->tbl_[i].op_skel_ptr_.direct_skel_ptr_; + break; + default: + return -1; + } + + return 0; //success +} TAO_Active_Demux_OpTable_Entry::TAO_Active_Demux_OpTable_Entry (void) { - this->skel_ptr_ = 0; } TAO_Active_Demux_OpTable_Entry::~TAO_Active_Demux_OpTable_Entry (void) { - this->skel_ptr_ = 0; // cannot delete this as we do not own it } +/**************************************************/ // Do nothing constructor. TAO_Perfect_Hash_OpTable::TAO_Perfect_Hash_OpTable (void) { @@ -232,10 +336,6 @@ TAO_Perfect_Hash_OpTable::~TAO_Perfect_Hash_OpTable (void) { } -// Uses <{opname}> to look up the skeleton function and pass it back -// in <{skelfunc}>. Returns non-negative integer on success, or -1 on -// failure. - int TAO_Perfect_Hash_OpTable::find (const char *opname, TAO_Skeleton &skelfunc, @@ -262,28 +362,56 @@ TAO_Perfect_Hash_OpTable::find (const char *opname, } int -TAO_Perfect_Hash_OpTable::bind (const char *opname, - const TAO_Skeleton skel_ptr) +TAO_Perfect_Hash_OpTable::find (const char *opname, + TAO_Collocated_Skeleton &skelfunc, + TAO::Collocation_Strategy st, + const unsigned int length) { - ACE_UNUSED_ARG (opname); - ACE_UNUSED_ARG (skel_ptr); + ACE_FUNCTION_TIMEPROBE (TAO_PERFECT_HASH_OPTABLE_FIND_START); + + const TAO_operation_db_entry *entry = lookup (opname, + length); + if (entry == 0) + { + skelfunc = 0; // insure that somebody can't call a wrong function! + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("TAO_Perfect_Hash_OpTable:find for ") + ACE_TEXT ("operation '%s' (length=%d) failed\n"), + opname ? opname : "<null string>", length), + -1); + } + + switch (st) + { + case TAO::TAO_CS_THRU_POA_STRATEGY: + skelfunc = entry->thruPOA_skel_ptr_; + break; + case TAO::TAO_CS_DIRECT_STRATEGY: + skelfunc = entry->direct_skel_ptr_; + break; + default: + return -1; + } + return 0; } -// Do nothing constructor. +int +TAO_Perfect_Hash_OpTable::bind (const char *, + const TAO::Operation_Skeletons) +{ + return 0; +} + +/*****************************************************************/ TAO_Binary_Search_OpTable::TAO_Binary_Search_OpTable (void) { } -// Do nothing destrctor. TAO_Binary_Search_OpTable::~TAO_Binary_Search_OpTable (void) { } -// Uses <{opname}> to look up the skeleton function and pass it back -// in <{skelfunc}>. Returns non-negative integer on success, or -1 on -// failure. - int TAO_Binary_Search_OpTable::find (const char *opname, TAO_Skeleton &skelfunc, @@ -303,16 +431,45 @@ TAO_Binary_Search_OpTable::find (const char *opname, return 0; } + +int +TAO_Binary_Search_OpTable::find (const char *opname, + TAO_Collocated_Skeleton &skelfunc, + TAO::Collocation_Strategy st, + const unsigned int /* length */) +{ + ACE_FUNCTION_TIMEPROBE (TAO_BINARY_SEARCH_OPTABLE_FIND_START); + + const TAO_operation_db_entry *entry = lookup (opname); + + if (entry == 0) + ACE_ERROR_RETURN ((LM_ERROR, + ACE_TEXT ("TAO_Binary_Search_Table:find failed\n")), + -1); + + switch (st) + { + case TAO::TAO_CS_THRU_POA_STRATEGY: + skelfunc = entry->thruPOA_skel_ptr_; + break; + case TAO::TAO_CS_DIRECT_STRATEGY: + skelfunc = entry->direct_skel_ptr_; + break; + default: + return -1; + } + + return 0; +} + int -TAO_Binary_Search_OpTable::bind (const char *opname, - const TAO_Skeleton skel_ptr) +TAO_Binary_Search_OpTable::bind (const char *, + const TAO::Operation_Skeletons ) { - ACE_UNUSED_ARG (opname); - ACE_UNUSED_ARG (skel_ptr); return 0; } -// constructor +/******************************************************************/ TAO_Operation_Table_Parameters::TAO_Operation_Table_Parameters (void) : strategy_ (0), type_ (TAO_Operation_Table_Parameters::TAO_DYNAMIC_HASH) // default @@ -344,7 +501,8 @@ TAO_Operation_Table_Parameters::concrete_strategy (TAO_Operation_Table *ot) } // return the concrete strategy -TAO_Operation_Table* TAO_Operation_Table_Parameters::concrete_strategy (void) +TAO_Operation_Table* +TAO_Operation_Table_Parameters::concrete_strategy (void) { return this->strategy_; } @@ -366,6 +524,14 @@ TAO_Operation_Table_Factory::opname_lookup_strategy (void) return p->concrete_strategy (); } +/**************************************************************/ +TAO::Operation_Skeletons::Operation_Skeletons (void) + : skel_ptr_ (0) + , thruPOA_skel_ptr_ (0) + , direct_skel_ptr_ (0) +{ +} + #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Hash_Map_Iterator_Base_Ex<const char *, TAO_Skeleton, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>; template class ACE_Hash_Map_Iterator_Ex<const char *, TAO_Skeleton, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex>; diff --git a/TAO/tao/PortableServer/Operation_Table.h b/TAO/tao/PortableServer/Operation_Table.h index 07a25ef1049..fa388dda543 100644 --- a/TAO/tao/PortableServer/Operation_Table.h +++ b/TAO/tao/PortableServer/Operation_Table.h @@ -45,10 +45,36 @@ public: TAO_Skeleton skel_ptr_; /// Collocated skeleton pointers. - TAO_Collocated_Skeleton thruPOA_skel_ptr; - TAO_Collocated_Skeleton direct_skel_ptr; + TAO_Collocated_Skeleton thruPOA_skel_ptr_; + TAO_Collocated_Skeleton direct_skel_ptr_; }; + +namespace TAO +{ + /** + * @class Operation_Skeleton_Ptr + * + * @brief A logical aggregation of all the operation skeleton pointers + * in use. + * + * This is not used by the IDL compiler. This is used internally + * within different strategies. + */ + struct Operation_Skeletons + { + Operation_Skeletons (void); + + /// Remote skeleton pointer + TAO_Skeleton skel_ptr_; + + /// Collocated skeleton pointers. + TAO_Collocated_Skeleton thruPOA_skel_ptr_; + TAO_Collocated_Skeleton direct_skel_ptr_; + }; +} + + /** * @class TAO_Operation_Table * @@ -67,10 +93,20 @@ public: TAO_Skeleton &skelfunc, const unsigned int length = 0) = 0; + /** + * Uses <{opname}> to look up the collocated skeleton function and + * pass it back in <{cskelfunc}>. Returns non-negative integer on + * success, or -1 on failure. + */ + virtual int find (const char *opname, + TAO_Collocated_Skeleton &skelfunc, + TAO::Collocation_Strategy s, + const unsigned int length = 0) = 0; + /// Associate the skeleton <{skel_ptr}> with an operation named /// <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. virtual int bind (const char *opname, - const TAO_Skeleton skel_ptr) = 0; + const TAO::Operation_Skeletons skel_ptr) = 0; virtual ~TAO_Operation_Table (void); }; @@ -166,23 +202,21 @@ public: /// Destructor ~TAO_Dynamic_Hash_OpTable (void); - /// Associate the skeleton <{skel_ptr}> with an operation named - /// <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. + /// See the documentation in the base class for details. virtual int bind (const char *opname, - const TAO_Skeleton skel_ptr); + const TAO::Operation_Skeletons skel_ptr); - /** - * Uses <{opname}> to look up the skeleton function and pass it back - * in <{skelfunc}>. Returns non-negative integer on success, or -1 - * on failure. - */ virtual int find (const char *opname, TAO_Skeleton &skelfunc, const unsigned int length = 0); + virtual int find (const char *opname, + TAO_Collocated_Skeleton &skelfunc, + TAO::Collocation_Strategy s, + const unsigned int length = 0); private: typedef ACE_Hash_Map_Manager_Ex<const char *, - TAO_Skeleton, + TAO::Operation_Skeletons, ACE_Hash<const char *>, ACE_Equal_To<const char *>, ACE_Null_Mutex> @@ -209,19 +243,18 @@ public: /// Destructor. ~TAO_Linear_Search_OpTable (void); - /** - * Uses <{opname}> to look up the skeleton function and pass it back - * in <{skelfunc}>. Returns non-negative integer on success, or -1 - * on failure. - */ + /// See the documentation in the base class for details. virtual int find (const char *opname, TAO_Skeleton &skel_ptr, const unsigned int length = 0); - /// Associate the skeleton <{skel_ptr}> with an operation named - /// <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. + virtual int find (const char *opname, + TAO_Collocated_Skeleton &skelfunc, + TAO::Collocation_Strategy s, + const unsigned int length = 0); + virtual int bind (const char *opname, - const TAO_Skeleton skelptr); + const TAO::Operation_Skeletons skelptr); private: // = Method that should defined by the subclasses. GPERF program @@ -245,7 +278,7 @@ public: ~TAO_Active_Demux_OpTable_Entry (void); /// Skeleton pointer corresponding to the index. - TAO_Skeleton skel_ptr_; + TAO::Operation_Skeletons op_skel_ptr_; }; /** @@ -266,19 +299,18 @@ public: /// Destructor. ~TAO_Active_Demux_OpTable (void); - /** - * Uses <{opname}> to look up the skeleton function and pass it back - * in <{skelfunc}>. Returns non-negative integer on success, or -1 - * on failure. - */ + /// See the documentation in the base class fopr details. virtual int find (const char *opname, TAO_Skeleton &skel_ptr, const unsigned int length = 0); - /// Associate the skeleton <{skel_ptr}> with an operation named - /// <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. + virtual int find (const char *opname, + TAO_Collocated_Skeleton &skelfunc, + TAO::Collocation_Strategy s, + const unsigned int length = 0); + virtual int bind (const char *opname, - const TAO_Skeleton skelptr); + const TAO::Operation_Skeletons skelptr); private: /// The next available free slot @@ -313,19 +345,18 @@ public: /// Do nothing destrctor. virtual ~TAO_Perfect_Hash_OpTable (void); - /** - * Uses <{opname}> to look up the skeleton function and pass it back - * in <{skelfunc}>. Returns non-negative integer on success, or -1 - * on failure. - */ + /// See the documentation in the base class for details. virtual int find (const char *opname, TAO_Skeleton &skelfunc, const unsigned int length = 0); - /// Associate the skeleton <{skel_ptr}> with an operation named - /// <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. + virtual int find (const char *opname, + TAO_Collocated_Skeleton &skelfunc, + TAO::Collocation_Strategy s, + const unsigned int length = 0); + virtual int bind (const char *opname, - const TAO_Skeleton skel_ptr); + const TAO::Operation_Skeletons skel_ptr); private: // = Methods that should defined by the subclasses. GPERF program @@ -358,19 +389,18 @@ public: /// Do nothing destrctor. virtual ~TAO_Binary_Search_OpTable (void); - /** - * Uses <{opname}> to look up the skeleton function and pass it back - * in <{skelfunc}>. Returns non-negative integer on success, or -1 - * on failure. - */ + /// See the documentation in the base class for details. virtual int find (const char *opname, TAO_Skeleton &skelfunc, const unsigned int length = 0); - /// Associate the skeleton <{skel_ptr}> with an operation named - /// <{opname}>. Returns -1 on failure, 0 on success, 1 on duplicate. + virtual int find (const char *opname, + TAO_Collocated_Skeleton &skelfunc, + TAO::Collocation_Strategy s, + const unsigned int length = 0); + virtual int bind (const char *opname, - const TAO_Skeleton skel_ptr); + const TAO::Operation_Skeletons skel_ptr); private: // = Method that should defined by the subclasses. GPERF program @@ -390,5 +420,6 @@ typedef TAO_Singleton<TAO_Operation_Table_Factory, TAO_SYNCH_RECURSIVE_MUTEX> TAO_OP_TABLE_FACTORY; + #include /**/ "ace/post.h" #endif /* TAO_OPTABLE_H */ diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp index c1b02827c15..fa63cdab4cd 100644 --- a/TAO/tao/PortableServer/Servant_Base.cpp +++ b/TAO/tao/PortableServer/Servant_Base.cpp @@ -129,12 +129,22 @@ TAO_ServantBase::_find (const char *opname, } int +TAO_ServantBase::_find (const char *opname, + TAO_Collocated_Skeleton& skelfunc, + TAO::Collocation_Strategy st, + const unsigned int length) +{ + ACE_FUNCTION_TIMEPROBE (TAO_SERVANT_BASE_FIND_START); + return optable_->find (opname, skelfunc, st, length); +} + +/*int TAO_ServantBase::_bind (const char *opname, const TAO_Skeleton skel_ptr) { return optable_->bind (opname, skel_ptr); } - +*/ TAO_Stub * TAO_ServantBase::_create_stub (ACE_ENV_SINGLE_ARG_DECL) { diff --git a/TAO/tao/PortableServer/Servant_Base.h b/TAO/tao/PortableServer/Servant_Base.h index 36bb5563d3a..39a9db07117 100644 --- a/TAO/tao/PortableServer/Servant_Base.h +++ b/TAO/tao/PortableServer/Servant_Base.h @@ -17,6 +17,7 @@ #include "PortableServerC.h" #include "tao/Abstract_Servant_Base.h" #include "ace/Atomic_Op.h" +#include "tao/corbafwd.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -106,15 +107,21 @@ protected: void *derived_this ACE_ENV_ARG_DECL); - /// Find an operation in the operation table. + /// Please see documentation in tao/Abstract_Servant_Base.h for + /// details. virtual int _find (const char *opname, TAO_Skeleton &skelfunc, const unsigned int length = 0); + virtual int _find (const char *opname, + TAO_Collocated_Skeleton &skelfunc, + TAO::Collocation_Strategy st, + const unsigned int length = 0); + /// Register a CORBA IDL operation name. - virtual int _bind (const char *opname, + /*virtual int _bind (const char *opname, const TAO_Skeleton skel_ptr); - + */ /// Get this interface's repository id (TAO specific). virtual const char *_interface_repository_id (void) const = 0; @@ -169,7 +176,7 @@ public: */ virtual void _remove_ref (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS); - /** + /** * Returns the current reference count value. This method is * non-standard and is only here to simplify debugging. */ diff --git a/TAO/tao/TODO b/TAO/tao/TODO index 6afaff79a4f..5474053734b 100644 --- a/TAO/tao/TODO +++ b/TAO/tao/TODO @@ -17,8 +17,6 @@ . Test case for forwarded objects in collocated mode being remote -. Messaging is broken - . Remove tao_queryinterface . Recursive location forwards is broken still. |