diff options
author | Phil Mesnier <mesnier_p@ociweb.com> | 2006-05-05 18:55:51 +0000 |
---|---|---|
committer | Phil Mesnier <mesnier_p@ociweb.com> | 2006-05-05 18:55:51 +0000 |
commit | 119742c56e587a13f19bac0b837addd170548631 (patch) | |
tree | e2b08f9eef696a0aa70b09a5f79dbc57aed06848 /TAO/tao/TAO_Internal.cpp | |
parent | 843d611ad286c5dfb94540d1d2a4e2e7301ca266 (diff) | |
download | ATCD-119742c56e587a13f19bac0b837addd170548631.tar.gz |
ChangeLog tag: Fri May 5 18:48:45 UTC 2006 Phil Mesnier <mesnier_p@ociweb.com>
Diffstat (limited to 'TAO/tao/TAO_Internal.cpp')
-rw-r--r-- | TAO/tao/TAO_Internal.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/TAO/tao/TAO_Internal.cpp b/TAO/tao/TAO_Internal.cpp index e696e393121..753a0697424 100644 --- a/TAO/tao/TAO_Internal.cpp +++ b/TAO/tao/TAO_Internal.cpp @@ -17,6 +17,8 @@ #include "tao/Default_Protocols_Hooks.h" #include "tao/Default_Thread_Lane_Resources_Manager.h" #include "tao/Default_Collocation_Resolver.h" +#include "tao/Codeset_Manager_Factory_Base.h" +#include "tao/Codeset_Manager.h" #include "tao/debug.h" #include "tao/StringSeqC.h" @@ -125,6 +127,12 @@ namespace TAO_DEFAULT_SERVER_STRATEGY_FACTORY_ARGS; char const * client_strategy_factory_args = TAO_DEFAULT_CLIENT_STRATEGY_FACTORY_ARGS; + +#if (TAO_NEGOTIATE_CODESETS == 1) + bool negotiate_codesets = true; +#else + bool negotiate_codesets = false; +#endif /* TAO_NEGOTIATE_CODESETS */ } TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -320,6 +328,37 @@ namespace void register_global_services_i (ACE_Service_Gestalt * pcfg) { + // This has to be done before intializing the resource factory. Codesets is a special + // library since its configuration is optional and it may be linked statically. + if (negotiate_codesets) + { + TAO_Codeset_Manager_Factory_Base *factory = + ACE_Dynamic_Service<TAO_Codeset_Manager_Factory_Base>::instance ("TAO_Codeset"); + if (factory == 0 || factory->is_default()) + { +#if !defined (TAO_AS_STATIC_LIBS) + // only for dynamic libs, check to see if default factory and if so, + // remove it + ACE_Service_Config::process_directive + (ACE_REMOVE_SERVICE_DIRECTIVE("TAO_Codeset")); + ACE_Service_Config::process_directive + (ACE_DYNAMIC_SERVICE_DIRECTIVE("TAO_Codeset", + "TAO_Codeset", + "_make_TAO_Codeset_Manager_Factory", + "")); + factory = + ACE_Dynamic_Service<TAO_Codeset_Manager_Factory_Base>::instance ("TAO_Codeset"); +#endif + } + if (factory == 0) + { + if (TAO_debug_level > 0) + ACE_ERROR ((LM_ERROR, + ACE_TEXT("(%P|%t) ORB_Core: ") + ACE_TEXT("Unable to initialize Codeset Manager\n"))); + } + } + pcfg->process_directive (ace_svc_desc_TAO_Default_Resource_Factory); pcfg->process_directive (ace_svc_desc_TAO_Default_Client_Strategy_Factory); pcfg->process_directive (ace_svc_desc_TAO_Default_Server_Strategy_Factory); @@ -359,6 +398,7 @@ namespace // calling them if we're not invoking the svc.conf file? // @@ They are needed for platforms that have no file system, // like VxWorks. + if (resource_factory_args != 0) { pcfg->process_directive @@ -574,6 +614,14 @@ namespace arg_shifter.consume_arg (); } else if (0 != (current_arg = arg_shifter.get_the_parameter + (ACE_TEXT ("-ORBNegotiateCodesets")))) + { + negotiate_codesets = + (ACE_OS::atoi (current_arg)); + // don't consume, the ORB_Core::init will use it again. + + } + else if (0 != (current_arg = arg_shifter.get_the_parameter (ACE_TEXT ("-ORBDebugLevel")))) { TAO_debug_level = |