diff options
-rw-r--r-- | TAO/ChangeLog-99c | 26 | ||||
-rw-r--r-- | TAO/docs/Options.html | 21 | ||||
-rw-r--r-- | TAO/docs/configurations.html | 5 | ||||
-rw-r--r-- | TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf | 4 | ||||
-rw-r--r-- | TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf | 4 | ||||
-rw-r--r-- | TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf.dynamic | 4 | ||||
-rw-r--r-- | TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf | 4 | ||||
-rw-r--r-- | TAO/tao/Client_Strategy_Factory.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Client_Strategy_Factory.h | 3 | ||||
-rw-r--r-- | TAO/tao/Resource_Factory.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/Server_Strategy_Factory.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Server_Strategy_Factory.h | 3 | ||||
-rw-r--r-- | TAO/tao/default_client.cpp | 37 | ||||
-rw-r--r-- | TAO/tao/default_client.h | 13 | ||||
-rw-r--r-- | TAO/tao/default_server.cpp | 38 | ||||
-rw-r--r-- | TAO/tao/default_server.h | 7 | ||||
-rw-r--r-- | TAO/tests/Collocation/svc.conf | 4 |
17 files changed, 115 insertions, 74 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index f7f9f9ab662..87fd7e40721 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,29 @@ +Wed Jul 14 13:19:36 1999 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/Client_Strategy_Factory.cpp: + * tao/Client_Strategy_Factory.h: + * tao/Resource_Factory.cpp: + * tao/Server_Strategy_Factory.cpp: + * tao/Server_Strategy_Factory.h: + * tao/default_client.cpp: + * tao/default_client.h: + * tao/default_server.cpp: + * tao/default_server.h: + Moved the connector_lock() creation from the server strategy + factory to the client strategy factory. Thanks to Phil Mesnier + <mesnier_p@ociweb.com> for reporting this problem. This fixes + [BUGID:17] + + * docs/Options.html: + * docs/configurations.html: + * performance-tests/Cubit/TAO/IDL_Cubit/svc.conf: + * performance-tests/Cubit/TAO/IDL_Cubit/svc.conf.dynamic: + * performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf: + * performance-tests/Cubit/TAO/MT_Cubit/svc.conf: + * tests/Collocation/svc.conf: + Updated the documentation and the svc.conf files that were using + that option. + Wed Jul 14 12:43:51 1999 David L. Levine <levine@cs.wustl.edu> * tao/TAO.cpp (init): replaced "RootPOA" with TAO_OBJID_ROOTPOA. diff --git a/TAO/docs/Options.html b/TAO/docs/Options.html index d4d77742a7c..365b31ab914 100644 --- a/TAO/docs/Options.html +++ b/TAO/docs/Options.html @@ -600,12 +600,8 @@ The default is <code>select_mt</code></TD> --> <TD><CODE>-ORBConnectorLock</CODE> <EM>lock type</EM></TD> <TD><a - name="-ORBConnectorLock"></a>Specify the type of lock to be used by - the connector. Possible values for <em>lock type</em> are - <code>thread</code>, which specifies that an inter-thread mutex is - used to guarantee exclusive acccess, and <code>null</code>, which - specifies that no locking be performed. The default is - <code>thread</code>.</TD> + name="-ORBConnectorLock"></a>This option has been moved to the + client strategy factory.</TD> </TR> </TABLE> @@ -681,6 +677,19 @@ The default is <code>select_mt</code></TD> </TD> </TR> + + <TR> + <TD><CODE>-ORBConnectorLock</CODE> <EM>lock type</EM></TD> + <TD><a + name="-ORBConnectorLock"></a>Specify the type of lock to be used by + the connector. Possible values for <em>lock type</em> are + <code>thread</code>, which specifies that an inter-thread mutex is + used to guarantee exclusive acccess, and <code>null</code>, which + specifies that no locking be performed. The default is + <code>thread</code>. + </TD> + </TR> + </TABLE> </P> </BLOCKQUOTE> diff --git a/TAO/docs/configurations.html b/TAO/docs/configurations.html index e1fa871e68f..a4466563beb 100644 --- a/TAO/docs/configurations.html +++ b/TAO/docs/configurations.html @@ -318,7 +318,10 @@ The following are common ORB configurations used by TAO applications.<P> select_st</tt>, <tt>-ORBInputCDRAllocator null</tt> <br><tt>TAO_Server_Strategy_Factory</tt>: <tt>-ORBconcurrency reactive</tt> (default), - <tt>-ORBPOALock null</tt>, <tt>-ORBConnectorLock null</tt></td> + <tt>-ORBPOALock null</tt></td> + <br><tt>TAO_Client_Strategy_Factory</tt>: + <tt>-ORBConnectorLock null</tt> + </td> </tr> </table> diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf index 61310d9118f..7164f6c18d6 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/collocation/svc.conf @@ -4,5 +4,5 @@ # static Resource_Factory "-ORBResources tss -ORBReactorType select_st" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler ST" -static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock null -ORBConnectorLock null" +static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler ST -ORBConnectorLock null" +static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock null" diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf index 62099e50851..73790a79bb3 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf @@ -4,5 +4,5 @@ # static Resource_Factory "-ORBResources global -ORBReactorType select_st -ORBInputCDRAllocator null" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" -static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBPOALock null -ORBConnectorLock null -ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW -ORBConnectorLock null" +static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBPOALock null -ORBAllowReactivationOfSystemids 0" diff --git a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf.dynamic b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf.dynamic index 0b49f7c36b1..63da9842c39 100644 --- a/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf.dynamic +++ b/TAO/performance-tests/Cubit/TAO/IDL_Cubit/svc.conf.dynamic @@ -4,5 +4,5 @@ # dynamic Resource_Factory Service_Object * TAO:_make_TAO_Default_Resource_Factory() "-ORBResources global -ORBReactorlock null -ORBInputCDRAllocator null" -dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() "-ORBProfileLock null -ORBClientConnectionHandler RW" -dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBConcurrency thread-per-connection -ORBPOALock null -ORBConnectorLock null -ORBAllowReactivationofSystemIds 0" +dynamic Client_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Client_Strategy_Factory() "-ORBProfileLock null -ORBClientConnectionHandler RW -ORBConnectorLock null" +dynamic Server_Strategy_Factory Service_Object * TAO:_make_TAO_Default_Server_Strategy_Factory() "-ORBConcurrency thread-per-connection -ORBPOALock null -ORBAllowReactivationofSystemIds 0" diff --git a/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf b/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf index e05046555c7..0fbba74a93a 100644 --- a/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf +++ b/TAO/performance-tests/Cubit/TAO/MT_Cubit/svc.conf @@ -4,5 +4,5 @@ # static Resource_Factory "-ORBResources tss -ORBInputCDRAllocator null" -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" -static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBPOALock null -ORBConnectorLock null -ORBAllowReactivationOfSystemids 0" +static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW -ORBConnectorLock null" +static Server_Strategy_Factory "-ORBConcurrency thread-per-connection -ORBPOALock null -ORBAllowReactivationOfSystemids 0" diff --git a/TAO/tao/Client_Strategy_Factory.cpp b/TAO/tao/Client_Strategy_Factory.cpp index 967582af54a..8d6411f972d 100644 --- a/TAO/tao/Client_Strategy_Factory.cpp +++ b/TAO/tao/Client_Strategy_Factory.cpp @@ -29,3 +29,9 @@ TAO_Client_Strategy_Factory::create_wait_strategy (TAO_Transport *) { return 0; } + +ACE_Lock * +TAO_Client_Strategy_Factory::create_cached_connector_lock (void) +{ + return 0; +} diff --git a/TAO/tao/Client_Strategy_Factory.h b/TAO/tao/Client_Strategy_Factory.h index 7d851a0f4d5..d4b0cbfdda5 100644 --- a/TAO/tao/Client_Strategy_Factory.h +++ b/TAO/tao/Client_Strategy_Factory.h @@ -54,6 +54,9 @@ public: virtual TAO_Wait_Strategy *create_wait_strategy (TAO_Transport *transport); // Create the correct client <wait_for_reply> strategy. + + virtual ACE_Lock *create_cached_connector_lock (void); + // Create the lock to be used by the cached connector. }; #endif /* TAO_CLIENT_STRATEGY_FACTORY_H */ diff --git a/TAO/tao/Resource_Factory.cpp b/TAO/tao/Resource_Factory.cpp index e893945069e..61cfb10e8c0 100644 --- a/TAO/tao/Resource_Factory.cpp +++ b/TAO/tao/Resource_Factory.cpp @@ -3,7 +3,7 @@ #include "tao/Resource_Factory.h" #include "ace/Dynamic_Service.h" #include "tao/ORB_Core.h" -#include "tao/Server_Strategy_Factory.h" +#include "tao/Client_Strategy_Factory.h" ACE_RCSID(tao, Resource_Factory, "$Id$") @@ -11,7 +11,7 @@ ACE_RCSID(tao, Resource_Factory, "$Id$") TAO_Cached_Connector_Lock::TAO_Cached_Connector_Lock (TAO_ORB_Core *orb_core) { - this->lock_ = orb_core->server_factory ()->create_cached_connector_lock (); + this->lock_ = orb_core->client_factory ()->create_cached_connector_lock (); } TAO_Cached_Connector_Lock::~TAO_Cached_Connector_Lock (void) diff --git a/TAO/tao/Server_Strategy_Factory.cpp b/TAO/tao/Server_Strategy_Factory.cpp index 000391f45fd..4a523e27bff 100644 --- a/TAO/tao/Server_Strategy_Factory.cpp +++ b/TAO/tao/Server_Strategy_Factory.cpp @@ -49,12 +49,6 @@ TAO_Server_Strategy_Factory::create_event_loop_lock (void) return 0; } -ACE_Lock * -TAO_Server_Strategy_Factory::create_cached_connector_lock (void) -{ - return 0; -} - const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters & TAO_Server_Strategy_Factory::active_object_map_creation_parameters (void) const { diff --git a/TAO/tao/Server_Strategy_Factory.h b/TAO/tao/Server_Strategy_Factory.h index 4874975b89f..ec21a847d35 100644 --- a/TAO/tao/Server_Strategy_Factory.h +++ b/TAO/tao/Server_Strategy_Factory.h @@ -110,9 +110,6 @@ public: virtual ACE_Lock *create_event_loop_lock (void); // Creates and returns a lock for the event loop. - virtual ACE_Lock *create_cached_connector_lock (void); - // Create the lock to be used by the cached connector. - virtual const Active_Object_Map_Creation_Parameters &active_object_map_creation_parameters (void) const; // Return the active object map creation parameters. diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp index 3325ac7a5c2..d9e3afd421a 100644 --- a/TAO/tao/default_client.cpp +++ b/TAO/tao/default_client.cpp @@ -12,7 +12,8 @@ ACE_RCSID(tao, default_client, "$Id$") TAO_Default_Client_Strategy_Factory::TAO_Default_Client_Strategy_Factory (void) - : profile_lock_type_ (TAO_THREAD_LOCK) + : profile_lock_type_ (TAO_THREAD_LOCK), + cached_connector_lock_type_ (TAO_THREAD_LOCK) { // Use single thread client connection handler #if defined (TAO_USE_ST_CLIENT_CONNECTION_HANDLER) @@ -128,6 +129,23 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, char ** argv) this->transport_mux_strategy_ = TAO_EXCLUSIVE_TMS; } } + + else if (ACE_OS::strcasecmp (argv[curarg], + "-ORBConnectorLock") == 0) + { + curarg++; + if (curarg < argc) + { + char *name = argv[curarg]; + + if (ACE_OS::strcasecmp (name, + "thread") == 0) + this->cached_connector_lock_type_ = TAO_THREAD_LOCK; + else if (ACE_OS::strcasecmp (name, + "null") == 0) + this->cached_connector_lock_type_ = TAO_NULL_LOCK; + } + } } return 0; } @@ -194,6 +212,23 @@ TAO_Default_Client_Strategy_Factory::create_wait_strategy (TAO_Transport *transp return ws; } +ACE_Lock * +TAO_Default_Client_Strategy_Factory::create_cached_connector_lock (void) +{ + ACE_Lock *the_lock = 0; + + if (this->cached_connector_lock_type_ == TAO_NULL_LOCK) + ACE_NEW_RETURN (the_lock, + ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX>, + 0); + else + ACE_NEW_RETURN (the_lock, + ACE_Lock_Adapter<ACE_SYNCH_MUTEX>, + 0); + + return the_lock; +} + // **************************************************************** ACE_STATIC_SVC_DEFINE (TAO_Default_Client_Strategy_Factory, diff --git a/TAO/tao/default_client.h b/TAO/tao/default_client.h index f7c1ce0e19a..17955110798 100644 --- a/TAO/tao/default_client.h +++ b/TAO/tao/default_client.h @@ -47,16 +47,12 @@ public: int parse_args (int argc, char* argv[]); // Parse svc.conf arguments + // = Check Client_Strategy_Factory.h for the documentation of the + // following methods. ACE_Lock* create_profile_lock (void); - // create the lock for the forwarding Profile used by - // the TAO_GIOP_Invocation::location_forward and the - // TAO_GIOP_Invocation::start - TAO_Transport_Mux_Strategy *create_transport_mux_strategy (TAO_ORB_Core *orb_core); - // Create the correct client request muxing strategy. - TAO_Wait_Strategy *create_wait_strategy (TAO_Transport *transport); - // Create the correct client wait-for-reply strategy. + virtual ACE_Lock *create_cached_connector_lock (void); private: enum Lock_Type @@ -86,6 +82,9 @@ private: Wait_Strategy wait_strategy_; // The wait-for-reply strategy. + + Lock_Type cached_connector_lock_type_; + // Type of lock used by the cached connector. }; #if defined (__ACE_INLINE__) diff --git a/TAO/tao/default_server.cpp b/TAO/tao/default_server.cpp index c68d6811f85..227199232af 100644 --- a/TAO/tao/default_server.cpp +++ b/TAO/tao/default_server.cpp @@ -13,8 +13,7 @@ TAO_Default_Server_Strategy_Factory::TAO_Default_Server_Strategy_Factory (void) : activate_server_connections_ (0), thread_flags_ (THR_BOUND), poa_lock_type_ (TAO_THREAD_LOCK), - event_loop_lock_type_ (TAO_NULL_LOCK), - cached_connector_lock_type_ (TAO_THREAD_LOCK) + event_loop_lock_type_ (TAO_NULL_LOCK) { } @@ -71,23 +70,6 @@ TAO_Default_Server_Strategy_Factory::create_event_loop_lock (void) return the_lock; } -ACE_Lock * -TAO_Default_Server_Strategy_Factory::create_cached_connector_lock (void) -{ - ACE_Lock *the_lock = 0; - - if (this->cached_connector_lock_type_ == TAO_NULL_LOCK) - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX>, - 0); - else - ACE_NEW_RETURN (the_lock, - ACE_Lock_Adapter<ACE_SYNCH_MUTEX>, - 0); - - return the_lock; -} - // Evil macros b/c I'm lazy! #define TAO_BEGINCHECK if (0) #define TAO_CHECKANDSET(sym) \ @@ -354,22 +336,16 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, char *argv[]) this->event_loop_lock_type_ = TAO_NULL_LOCK; } } + else if (ACE_OS::strcasecmp (argv[curarg], "-ORBConnectorLock") == 0) { - curarg++; - if (curarg < argc) - { - char *name = argv[curarg]; - - if (ACE_OS::strcasecmp (name, - "thread") == 0) - this->cached_connector_lock_type_ = TAO_THREAD_LOCK; - else if (ACE_OS::strcasecmp (name, - "null") == 0) - this->cached_connector_lock_type_ = TAO_NULL_LOCK; - } + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) WARNING: the " + "-ORBConnectorLock option is in the client " + "strategy factory now\n")); } + else if (ACE_OS::strcasecmp (argv[curarg], "-ORBThreadFlags") == 0) { diff --git a/TAO/tao/default_server.h b/TAO/tao/default_server.h index 9b57575a65f..e0448c30e96 100644 --- a/TAO/tao/default_server.h +++ b/TAO/tao/default_server.h @@ -57,10 +57,6 @@ public: // controlling the event loop (termination). Otherwise a // Recursive_Thread_Mutex or Thread_Mutex may be required. - virtual ACE_Lock *create_cached_connector_lock (void); - // Created the cached connector lock based on the command line - // options. - int parse_args (int argc, char *argv[]); // Parse the arguments, check the documentation in // $TAO_ROOT/docs/Options.html for details @@ -86,9 +82,6 @@ protected: Lock_Type event_loop_lock_type_; // The type of lock to be returned by <create_event_loop_lock()>. - - Lock_Type cached_connector_lock_type_; - // Type of lock used by the cached connector. }; #if defined (__ACE_INLINE__) diff --git a/TAO/tests/Collocation/svc.conf b/TAO/tests/Collocation/svc.conf index 7d1182fa43b..c278301c9bf 100644 --- a/TAO/tests/Collocation/svc.conf +++ b/TAO/tests/Collocation/svc.conf @@ -8,7 +8,7 @@ static Resource_Factory "-ORBResources global -ORBReactorType select_st -ORBInpu # Make sure we use RW client handler so if something goes wrong, the program will bloc, # i.e., won't work. -static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW" +static Client_Strategy_Factory "-ORBProfileLock null -ORBClientConnectionHandler RW -ORBConnectorLock null" # Not absolutely necessary for this test, but we add it for fun. -static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock null -ORBConnectorLock null" +static Server_Strategy_Factory "-ORBConcurrency reactive -ORBPOALock null" |