summaryrefslogtreecommitdiff
path: root/TAO/tao/default_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/default_client.cpp')
-rw-r--r--TAO/tao/default_client.cpp60
1 files changed, 17 insertions, 43 deletions
diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp
index d9e3afd421a..141e28e7d82 100644
--- a/TAO/tao/default_client.cpp
+++ b/TAO/tao/default_client.cpp
@@ -12,8 +12,7 @@
ACE_RCSID(tao, default_client, "$Id$")
TAO_Default_Client_Strategy_Factory::TAO_Default_Client_Strategy_Factory (void)
- : profile_lock_type_ (TAO_THREAD_LOCK),
- cached_connector_lock_type_ (TAO_THREAD_LOCK)
+ : profile_lock_type_ (TAO_THREAD_LOCK)
{
// Use single thread client connection handler
#if defined (TAO_USE_ST_CLIENT_CONNECTION_HANDLER)
@@ -129,23 +128,6 @@ 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;
}
@@ -175,17 +157,17 @@ TAO_Default_Client_Strategy_Factory::create_profile_lock (void)
// Create the correct client transport muxing strategy.
TAO_Transport_Mux_Strategy *
-TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy (TAO_ORB_Core *orb_core)
+TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy (TAO_Transport *transport)
{
TAO_Transport_Mux_Strategy *tms = 0;
if (this->transport_mux_strategy_ == TAO_MUXED_TMS)
ACE_NEW_RETURN (tms,
- TAO_Muxed_TMS (orb_core),
+ TAO_Muxed_TMS (transport),
0);
else
ACE_NEW_RETURN (tms,
- TAO_Exclusive_TMS (orb_core),
+ TAO_Exclusive_TMS (transport),
0);
return tms;
@@ -205,30 +187,22 @@ TAO_Default_Client_Strategy_Factory::create_wait_strategy (TAO_Transport *transp
TAO_Wait_On_Reactor (transport),
0);
else
- ACE_NEW_RETURN (ws,
- TAO_Wait_On_Leader_Follower (transport),
- 0);
-
+ {
+ // = Leader follower model.
+
+ if (this->transport_mux_strategy_ == TAO_EXCLUSIVE_TMS)
+ ACE_NEW_RETURN (ws,
+ TAO_Exclusive_Wait_On_Leader_Follower (transport),
+ 0);
+ else
+ ACE_NEW_RETURN (ws,
+ TAO_Muxed_Wait_On_Leader_Follower (transport),
+ 0);
+ }
+
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,