summaryrefslogtreecommitdiff
path: root/TAO/tao/default_server.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-09-01 21:37:01 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-09-01 21:37:01 +0000
commit73ac68b13d2c687dd9377b0ab6e1616ac7649043 (patch)
treec6c5066394f7da9f10261e054de539bdd3b20ade /TAO/tao/default_server.cpp
parent4c6fcfff12ec1664feb4fa9f62a11a4811aa3327 (diff)
downloadATCD-73ac68b13d2c687dd9377b0ab6e1616ac7649043.tar.gz
ChangeLogTag:Tue Sep 1 16:29:30 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/default_server.cpp')
-rw-r--r--TAO/tao/default_server.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/TAO/tao/default_server.cpp b/TAO/tao/default_server.cpp
index 6bb6b631535..1761d23f9bd 100644
--- a/TAO/tao/default_server.cpp
+++ b/TAO/tao/default_server.cpp
@@ -18,6 +18,7 @@ TAO_Default_Server_Strategy_Factory::TAO_Default_Server_Strategy_Factory (void)
event_loop_lock_type_ (TAO_NULL_LOCK),
collocation_table_lock_type_ (TAO_THREAD_LOCK),
cached_connector_lock_type_ (TAO_THREAD_LOCK),
+ creation_strategy_ (0),
concurrency_strategy_ (0)
{
}
@@ -27,6 +28,15 @@ TAO_Default_Server_Strategy_Factory::~TAO_Default_Server_Strategy_Factory (void)
// Perform appropriate cleanup.
}
+TAO_Default_Server_Strategy_Factory::CREATION_STRATEGY *
+TAO_Default_Server_Strategy_Factory::creation_strategy (void)
+{
+ if (this->creation_strategy_ == 0)
+ return &this->default_creation_strategy_;
+ else
+ return this->creation_strategy_;
+}
+
TAO_Default_Server_Strategy_Factory::CONCURRENCY_STRATEGY *
TAO_Default_Server_Strategy_Factory::concurrency_strategy (void)
{
@@ -368,6 +378,31 @@ TAO_Default_Server_Strategy_Factory::parse_args (int argc, char *argv[])
return 0;
}
+TAO_Default_Server_Creation_Strategy::
+TAO_Default_Server_Creation_Strategy (ACE_Thread_Manager *t)
+ : TAO_Server_Strategy_Factory::CREATION_STRATEGY (t)
+{
+}
+
+int
+TAO_Default_Server_Creation_Strategy::
+make_svc_handler (TAO_Server_Connection_Handler *&sh)
+{
+ if (sh == 0)
+ {
+ // Maybe this show be cached in the constructor, but it is
+ // possible that this method is invoked in several threads
+ // during the lifetime of this object, and the ORB_Core is a
+ // TSS singleton.
+ TAO_ORB_Core *orb_core = TAO_ORB_Core_instance ();
+ ACE_NEW_RETURN (sh,
+ TAO_Server_Connection_Handler (orb_core),
+ -1);
+ }
+ return 0;
+}
+
+
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class TAO_Reactive_Strategy<TAO_Server_Connection_Handler>;
template class ACE_Reactive_Strategy<TAO_Server_Connection_Handler>;