summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-05 11:00:17 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-05 11:00:17 +0000
commitf62ad76d720ba89afb0d100dc66bcbcdeacc7c3a (patch)
tree523e417833eaeee2cd1411c5f708be60dab0fa8d /TAO/tao
parent1c3a2b8e61a6741dc4a449983872250c4900789c (diff)
downloadATCD-f62ad76d720ba89afb0d100dc66bcbcdeacc7c3a.tar.gz
Added support for using static services
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/ORB_Core.cpp27
-rw-r--r--TAO/tao/ORB_Core.h4
-rw-r--r--TAO/tao/TAO_Internal.cpp6
-rw-r--r--TAO/tao/default_client.cpp9
-rw-r--r--TAO/tao/default_client.h4
-rw-r--r--TAO/tao/default_server.cpp13
-rw-r--r--TAO/tao/default_server.h4
7 files changed, 55 insertions, 12 deletions
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 64113a2fb0a..a7a80735dbc 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -451,12 +451,12 @@ TAO_ORB_Core::init (int &argc, char *argv[])
}
}
#endif /* DEBUG */
-
+
// Set the endpoint
ACE_INET_Addr rendezvous;
if (this->set_endpoint (dotted_decimal_addresses,
- port,
- host,
+ port,
+ host,
rendezvous) == -1)
return -1;
@@ -915,7 +915,7 @@ TAO_ORB_Core::root_poa (TAO_POA *np)
this->resource_factory ()->set_root_poa (np);
TAO_POA *old_poa = this->root_poa_;
this->root_poa_ = np;
- this->root_poa_reference_ = PortableServer::POA::_nil ();
+ this->root_poa_reference_ = PortableServer::POA::_nil ();
return old_poa;
}
@@ -1007,7 +1007,7 @@ TAO_ORB_Core::create_and_set_root_poa (const char *adapter_name,
if (delete_policies)
delete root_poa_policies;
-
+
if (env.exception () == 0)
// set the poa in the orbcore instance
this->root_poa (poa);
@@ -1492,9 +1492,9 @@ TAO_Resource_Factory::create_input_cdr_data_block (size_t size)
{
case TAO_GLOBAL:
{
- ACE_Allocator* buffer_alloc =
+ ACE_Allocator* buffer_alloc =
this->input_cdr_buffer_allocator ();
- ACE_Allocator* dblock_alloc =
+ ACE_Allocator* dblock_alloc =
this->input_cdr_dblock_allocator ();
typedef
@@ -1518,9 +1518,9 @@ TAO_Resource_Factory::create_input_cdr_data_block (size_t size)
case TAO_TSS:
{
- ACE_Allocator* buffer_alloc =
+ ACE_Allocator* buffer_alloc =
this->input_cdr_buffer_allocator ();
- ACE_Allocator* dblock_alloc =
+ ACE_Allocator* dblock_alloc =
this->input_cdr_dblock_allocator ();
ACE_Data_Block *nb;
@@ -1729,4 +1729,13 @@ template class ACE_Select_Reactor_T< ACE_Select_Reactor_Token_T<ACE_Noop_Token>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+#if defined (TAO_USES_STATIC_SERVICE)
+ACE_STATIC_SVC_DEFINE (TAO_Resource_Factory,
+ ASYS_TEXT ("TAO_Resource_Factory"),
+ ACE_SVC_OBJ_T,
+ &ACE_SVC_NAME (TAO_Resource_Factory),
+ ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
+ 0)
+#endif /* TAO_USES_STATIC_SERVICE */
+
ACE_FACTORY_DEFINE (TAO, TAO_Resource_Factory)
diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h
index cd1cb45fb90..3ab8cae945b 100644
--- a/TAO/tao/ORB_Core.h
+++ b/TAO/tao/ORB_Core.h
@@ -666,6 +666,10 @@ protected:
# include "tao/ORB_Core.i"
#endif /* __ACE_INLINE__ */
+#if defined (TAO_USES_STATIC_SERVICE)
+ACE_STATIC_SVC_DECLARE (TAO_Resource_Factory)
+#endif /* TAO_USE_STATIC_SERVICE */
+
ACE_FACTORY_DECLARE (TAO, TAO_Resource_Factory)
extern TAO_Export TAO_ORB_Core *TAO_ORB_Core_instance (void);
diff --git a/TAO/tao/TAO_Internal.cpp b/TAO/tao/TAO_Internal.cpp
index 80900c7bbc4..55f0898b640 100644
--- a/TAO/tao/TAO_Internal.cpp
+++ b/TAO/tao/TAO_Internal.cpp
@@ -17,7 +17,7 @@ TAO_Internal::open_services (int& argc, char** argv)
#if defined (TAO_PLATFORM_SVC_CONF_FILE_NOTSUP)
ACE_UNUSED_ARG (argc);
ACE_UNUSED_ARG (argv);
-
+
char *rfactory_args[] = TAO_DEFAULT_RESOURCE_FACTORY_ARGS;
char *client_args[] = TAO_DEFAULT_CLIENT_STRATEGY_FACTORY_ARGS;
char *server_args[] = TAO_DEFAULT_SERVER_STRATEGY_FACTORY_ARGS;
@@ -29,7 +29,11 @@ TAO_Internal::open_services (int& argc, char** argv)
ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, guard, *ACE_Static_Object_Lock::instance (), -1));
if (TAO_Internal::service_open_count_++ == 0)
+#if defined (TAO_USES_STATIC_SERVICE)
+ return ACE_Service_Config::open (argc, argv, 0);
+#else
return ACE_Service_Config::open (argc, argv);
+#endif /* TAO_USES_STATIC_SERVICE */
else
return 0;
#endif /* TAO_PLATFORM_SVC_CONF_FILE_NOTSUP */
diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp
index ed160ca4002..a99a2fddfa3 100644
--- a/TAO/tao/default_client.cpp
+++ b/TAO/tao/default_client.cpp
@@ -109,4 +109,13 @@ TAO_Default_Client_Strategy_Factory::create_client_creation_strategy (void)
return client_creation_strategy;
}
+#if defined (TAO_USES_STATIC_SERVICE)
+ACE_STATIC_SVC_DEFINE (TAO_Default_Client_Strategy_Factory,
+ ASYS_TEXT ("TAO_Default_Client_Strategy_Factory"),
+ ACE_SVC_OBJ_T,
+ &ACE_SVC_NAME (TAO_Default_Client_Strategy_Factory),
+ ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
+ 0)
+#endif /* TAO_USES_STATIC_SERVICE */
+
ACE_FACTORY_DEFINE (TAO, TAO_Default_Client_Strategy_Factory)
diff --git a/TAO/tao/default_client.h b/TAO/tao/default_client.h
index 11cc81bc67d..45767a6796d 100644
--- a/TAO/tao/default_client.h
+++ b/TAO/tao/default_client.h
@@ -73,6 +73,10 @@ private:
# include "tao/default_client.i"
#endif /* __ACE_INLINE__ */
+#if defined (TAO_USES_STATIC_SERVICE)
+ACE_STATIC_SVC_DECLARE (TAO_Default_Client_Strategy_Factory)
+#endif /* TAO_USE_STATIC_SERVICE */
+
ACE_FACTORY_DECLARE (TAO, TAO_Default_Client_Strategy_Factory)
#endif /* TAO_DEFAULT_CLIENT_H */
diff --git a/TAO/tao/default_server.cpp b/TAO/tao/default_server.cpp
index f627cdcf998..79858623e6f 100644
--- a/TAO/tao/default_server.cpp
+++ b/TAO/tao/default_server.cpp
@@ -221,7 +221,7 @@ TAO_Default_Server_Strategy_Factory::create_active_object_map_i (TAO_Demux_Strat
if (user_id_policy)
objtable = TAO_ORB_Core_instance()->oa_params()->userdef_lookup_strategy_for_user_id_policy ();
else
- objtable = TAO_ORB_Core_instance()->oa_params()->userdef_lookup_strategy_for_system_id_policy ();
+ objtable = TAO_ORB_Core_instance()->oa_params()->userdef_lookup_strategy_for_system_id_policy ();
break;
case TAO_ACTIVE_DEMUX:
ACE_NEW_RETURN (objtable,
@@ -262,7 +262,7 @@ TAO_Default_Server_Strategy_Factory::create_reverse_active_object_map (int uniqu
{
ACE_NEW_RETURN (objtable,
TAO_Reverse_Active_Object_Map_For_Multiple_Id_Policy (),
- 0);
+ 0);
}
return objtable;
@@ -502,4 +502,13 @@ template class ACE_Thread_Strategy<TAO_Server_Connection_Handler>;
#pragma instantiate ACE_Thread_Strategy<TAO_Server_Connection_Handler>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+#if defined (TAO_USES_STATIC_SERVICE)
+ACE_STATIC_SVC_DEFINE (TAO_Default_Server_Strategy_Factory,
+ ASYS_TEXT ("TAO_Default_Server_Strategy_Factory"),
+ ACE_SVC_OBJ_T,
+ &ACE_SVC_NAME (TAO_Default_Server_Strategy_Factory),
+ ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
+ 0)
+#endif /* TAO_USES_STATIC_SERVICE */
+
ACE_FACTORY_DEFINE (TAO, TAO_Default_Server_Strategy_Factory)
diff --git a/TAO/tao/default_server.h b/TAO/tao/default_server.h
index fd6d6616017..f7bf2837aa7 100644
--- a/TAO/tao/default_server.h
+++ b/TAO/tao/default_server.h
@@ -199,6 +199,10 @@ protected:
# include "tao/default_server.i"
#endif /* __ACE_INLINE__ */
+#if defined (TAO_USES_STATIC_SERVICE)
+ACE_STATIC_SVC_DECLARE (TAO_Default_Server_Strategy_Factory)
+#endif /* TAO_USE_STATIC_SERVICE */
+
ACE_FACTORY_DECLARE (TAO, TAO_Default_Server_Strategy_Factory)
#endif /* TAO_DEFAULT_SERVER_FACTORY_H */