summaryrefslogtreecommitdiff
path: root/TAO/tao
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-05 21:55:02 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-05 21:55:02 +0000
commitbfbe4582a657f48a801e6cf3798abf59d9765503 (patch)
tree331c82f22d46a870162c43c004496b16318179ff /TAO/tao
parentd99dd1dbcdac7a58a775426377b29c18713e89ec (diff)
downloadATCD-bfbe4582a657f48a801e6cf3798abf59d9765503.tar.gz
Removed one of the open_services methods. Generalized service initialization.
Diffstat (limited to 'TAO/tao')
-rw-r--r--TAO/tao/TAO_Internal.cpp70
1 files changed, 14 insertions, 56 deletions
diff --git a/TAO/tao/TAO_Internal.cpp b/TAO/tao/TAO_Internal.cpp
index 98dcfc130b5..7218ed87a9b 100644
--- a/TAO/tao/TAO_Internal.cpp
+++ b/TAO/tao/TAO_Internal.cpp
@@ -20,23 +20,23 @@ int TAO_Internal::service_open_count_ = 0;
int
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;
- return TAO_Internal::open_services
- (sizeof rfactory_args / sizeof rfactory_args[0], rfactory_args,
- sizeof client_args / sizeof client_args[0], client_args,
- sizeof server_args / sizeof server_args[0], server_args);
-#else
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, ACE_DEFAULT_LOGGER_KEY, 0);
+#if defined (TAO_USES_STATIC_SERVICE) || defined (TAO_PLATFORM_SVC_CONF_FILE_NOTSUP)
+ {
+ int retv = ACE_Service_Config::open (argc, argv,
+ ACE_DEFAULT_LOGGER_KEY, 0);
+#if defined (TAO_PLATFORM_SVC_CONF_FILE_NOTSUP)
+ ACE_Service_Config::process_directive
+ (TAO_DEFAULT_RESOURCE_FACTORY_ARGS);
+ ACE_Service_Config::process_directive
+ (TAO_DEFAULT_CLIENT_STRATEGY_FACTORY_ARGS);
+ ACE_Service_Config::process_directive
+ (TAO_DEFAULT_SERVER_STRATEGY_FACTORY_ARGS);
+#endif /* TAO_PLATFORM_SVC_CONF_FILE_NOTSUP */
+ return retv;
+ }
#else
return ACE_Service_Config::open (argc, argv);
#endif /* TAO_USES_STATIC_SERVICE */
@@ -45,48 +45,6 @@ TAO_Internal::open_services (int& argc, char** argv)
#endif /* TAO_PLATFORM_SVC_CONF_FILE_NOTSUP */
}
-int
-TAO_Internal::open_services (int rargc, char *resource_factory_args[],
- int cargc, char *client_factory_args[],
- int sargc, char *server_factory_args[])
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, guard, *ACE_Static_Object_Lock::instance (), -1));
-
- if (TAO_Internal::service_open_count_++ == 0)
- {
-#define FAKE_SVC_ENTRY(svcname, svctype, argc, argv) \
- do \
- { \
- ACE_Service_Object *obj = _make_##svctype (0); \
- obj->init (argc, argv); \
- ACE_Service_Repository::instance ()->insert \
- (new ACE_Service_Type (svcname,\
- new ACE_Service_Object_Type\
- (obj, svcname, \
- (ACE_Service_Type::DELETE_OBJ \
- | ACE_Service_Type::DELETE_THIS)), \
- 0, 1));\
- }\
- while (0) //;
-
- FAKE_SVC_ENTRY ("Resource_Factory",
- TAO_Resource_Factory,
- rargc,
- resource_factory_args);
-
- FAKE_SVC_ENTRY ("Client_Strategy_Factory",
- TAO_Default_Client_Strategy_Factory,
- cargc,
- client_factory_args);
-
- FAKE_SVC_ENTRY ("Server_Strategy_Factory",
- TAO_Default_Server_Strategy_Factory,
- sargc,
- server_factory_args);
- }
- return 0;
-}
-
TAO_Internal::TAO_Internal (void)
{
}