diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-11-22 00:58:35 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-11-22 00:58:35 +0000 |
commit | 92468ff897faf6e38e880013cc2fb79c47c32bde (patch) | |
tree | f428fb1cfad87d613e11c36534e0b716553d0ea8 | |
parent | 4c25e1d5fa0a5ab66ca150cd650c6e545f6abe7e (diff) | |
download | ATCD-92468ff897faf6e38e880013cc2fb79c47c32bde.tar.gz |
ChangeLogTag:Tue Nov 21 16:26:03 2000 Ossama Othman <ossama@uci.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 48 | ||||
-rw-r--r-- | TAO/tao/ORB.cpp | 97 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 127 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.h | 13 | ||||
-rw-r--r-- | TAO/tao/ORB_Table.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/TAO_Internal.cpp | 125 | ||||
-rw-r--r-- | TAO/tao/TAO_Internal.h | 118 |
7 files changed, 299 insertions, 242 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 5e2129a4a37..4ad93382bee 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,51 @@ +Tue Nov 21 16:26:03 2000 Ossama Othman <ossama@uci.edu> + + * tao/ORB_Table.cpp (bind): + + Make sure the ORB table owns the ORB Core by increasing the + reference count on it. + + * tao/ORB_Core.h (svc_config_argc_, svc_config_argv_): + + Removed these attributes. They are no longer needed since the + Service Configurator is now initialized in the CORBA::ORB_init() + function. + + * tao/ORB_Core.cpp (init): + + Moved all Service Configurator related option parsing code to + TAO_Internal::open_services(), and moved the code that invokes + open_services() to CORBA::ORB_init(). This is necessary to make + sure that services are loaded prior to invoking the pre_init() + method in registered ORBInitializers. + + * tao/ORB.cpp (ORB_init): + + The ORB table increases the reference count on the ORB Core so + do not release it here. Allow the TAO_ORB_Core_Auto_Ptr to + decrease the reference on the ORB Core. + + Initialize the Service Configurator. This must occur before the + ORBInitializer::pre_init() method is invoked on each registered + ORB initializer. + + * tao/TAO_Internal.h (open_services, open_services_i): + + Added new "open_services()" method declaration, and renamed the + existing one to "open_services_i()" since it is invoked by the + former. + + * tao/TAO_Internal.cpp (open_services): + + Construct a Service Configurator argument vector from options + extracted from the argument vector passed in from + CORBA::ORB_init(). + + * orbsvcs/examples/Security/Send_File/Makefile (BIN): + + Conditionally build the binaries on the "ssl" make variable + instead of the deprecate "ace_components" script. + Tue Nov 21 18:07:01 2000 Jeff Parsons <parsons@cs.wustl.edu> * tao/DynamicAny/DynArray_i.cpp: diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 475c3a01f15..a40f6da647b 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -1,10 +1,10 @@ // $Id$ -#include "tao/ORB.h" -#include "tao/ORB_Table.h" -#include "tao/Connector_Registry.h" -#include "tao/IOR_Parser.h" -#include "tao/Parser_Registry.h" +#include "ORB.h" +#include "ORB_Table.h" +#include "Connector_Registry.h" +#include "IOR_Parser.h" +#include "Parser_Registry.h" #include "ace/Dynamic_Service.h" #include "ace/Service_Repository.h" @@ -15,35 +15,35 @@ #include "ace/Auto_Ptr.h" #include "ace/Arg_Shifter.h" -#include "tao/Object.h" -#include "tao/Typecode.h" -#include "tao/Stub.h" -#include "tao/ORB_Core.h" -#include "tao/Server_Strategy_Factory.h" -#include "tao/debug.h" -#include "tao/TAO_Internal.h" -#include "tao/NVList.h" -#include "tao/Dynamic_Adapter.h" -#include "tao/CDR.h" -#include "tao/MProfile.h" - -#include "tao/RT_ORB.h" -#include "tao/Priority_Mapping_Manager.h" -#include "tao/RT_Current.h" - -# include "tao/ORBInitInfo.h" -# include "tao/ORBInitializer_Registry.h" +#include "Object.h" +#include "Typecode.h" +#include "Stub.h" +#include "ORB_Core.h" +#include "Server_Strategy_Factory.h" +#include "debug.h" +#include "TAO_Internal.h" +#include "NVList.h" +#include "Dynamic_Adapter.h" +#include "CDR.h" +#include "MProfile.h" + +#include "RT_ORB.h" +#include "Priority_Mapping_Manager.h" +#include "RT_Current.h" + +# include "ORBInitInfo.h" +# include "ORBInitializer_Registry.h" #if TAO_HAS_RT_CORBA == 1 -# include "tao/RT_ORBInitializer.h" // @@ This should go away! +# include "RT_ORBInitializer.h" // @@ This should go away! #endif /* TAO_HAS_RT_CORBA == 1 */ #if TAO_HAS_CORBA_MESSAGING == 1 -# include "tao/Messaging_ORBInitializer.h" // @@ This should go away! +# include "Messaging_ORBInitializer.h" // @@ This should go away! #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ #if defined (TAO_HAS_VALUETYPE) -# include "tao/ValueFactory_Map.h" +# include "ValueFactory_Map.h" #endif /* TAO_HAS_VALUETYPE */ #include "Object_KeyC.h" @@ -64,7 +64,7 @@ using std::set_unexpected; #endif /* ACE_HAS_EXCEPTIONS */ #if !defined (__ACE_INLINE__) -# include "tao/ORB.i" +# include "ORB.i" #endif /* ! __ACE_INLINE__ */ @@ -924,7 +924,7 @@ CORBA_ORB::resolve_initial_references (const char *name, // ----------------------------------------------------------------- // Is not one of the well known services, try to find it in the - // InitRef table.... + // InitRef table.... result = this->orb_core ()->resolve_rir (name, ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::Object::_nil ()); @@ -1247,8 +1247,33 @@ CORBA::ORB_init (int &argc, CORBA::COMPLETED_NO)); ACE_CHECK_RETURN (CORBA::ORB::_nil ()); + // The ORB table increases the reference count on the ORB Core so do + // not release it here. Allow the TAO_ORB_Core_Auto_Ptr do decrease + // the reference on the ORB Core when it goes out of scope. TAO_ORB_Core_Auto_Ptr safe_oc (oc); + // Initialize the Service Configurator. This must occur before the + // ORBInitializer::pre_init() method is invoked on each registered + // ORB initializer. + int result = TAO_Internal::open_services (argc, argv); + + // Check for errors returned from <TAO_Internal::open_services>. + if (result != 0 && errno != ENOENT) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) %p\n"), + ACE_TEXT ("Unable to initialize the ") + ACE_TEXT ("Service Configurator"))); + ACE_THROW_RETURN (CORBA::INITIALIZE ( + CORBA_SystemException::_tao_minor_code ( + TAO_ORB_CORE_INIT_LOCATION_CODE, + 0), + CORBA::COMPLETED_NO), + CORBA::ORB::_nil ()); + } + + // Run the registered ORB initializers, and initialize the ORB_Core. + TAO_ORBInitInfo *orb_init_info_temp; ACE_NEW_THROW_EX (orb_init_info_temp, TAO_ORBInitInfo (safe_oc.get (), @@ -1261,20 +1286,20 @@ CORBA::ORB_init (int &argc, CORBA::COMPLETED_NO)); ACE_CHECK_RETURN (CORBA::ORB::_nil ()); - /// This ORBInitInfo instance is only valid for the duration of this - /// ORB's initialization. + // This ORBInitInfo instance is only valid for the duration of this + // ORB's initialization. PortableInterceptor::ORBInitInfo_var orb_init_info = orb_init_info_temp; - /// Call the ORBInitializer::pre_init() on each registered ORB - /// initializer. + // Call the ORBInitializer::pre_init() on each registered ORB + // initializer. TAO_ORBInitializer_Registry::instance ()->pre_init (orb_init_info.in (), - ACE_TRY_ENV); + ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::ORB::_nil ()); // Initialize the ORB Core instance. - int result = safe_oc->init (argc, argv, ACE_TRY_ENV); + result = safe_oc->init (argc, argv, ACE_TRY_ENV); ACE_CHECK_RETURN (CORBA::ORB::_nil ()); // Check for errors and return nil pseudo-reference on error. @@ -1308,10 +1333,6 @@ CORBA::ORB_init (int &argc, CORBA::COMPLETED_NO), CORBA::ORB::_nil ()); - // Release the ORB Core pointer from its Auto_Ptr since the ORB - // table now owns it. - oc = safe_oc.release (); - // Return a duplicate since the ORB_Core should release the last // reference to the ORB. return CORBA::ORB::_duplicate (oc->orb ()); diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 8dc4f159410..65a11d2a239 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -3,9 +3,6 @@ #include "ORB_Core.h" #include "ORB_Table.h" -#include "ace/Env_Value_T.h" -#include "ace/Arg_Shifter.h" -#include "ace/Auto_Ptr.h" #include "TAO_Internal.h" #include "default_client.h" @@ -146,8 +143,6 @@ TAO_ORB_Core::TAO_ORB_Core (const char *orbid) delayed_buffering_sync_strategy_ (0), #endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */ transport_sync_strategy_ (0), - svc_config_argc_ (0), - svc_config_argv_ (0), refcount_ (1), policy_factory_registry_ (), #if (TAO_HAS_INTERCEPTORS == 1) @@ -268,17 +263,6 @@ TAO_ORB_Core::~TAO_ORB_Core (void) #endif /* TAO_HAS_RT_CORBA == 1 */ delete this->transport_sync_strategy_; - - // This is deleted in init() so we should only get here if the - // ORB_Core is destroyed prematurely. - if (this->svc_config_argv_ != 0) - { - for (int i = 0; i < this->svc_config_argc_; i++) - CORBA::string_free (this->svc_config_argv_[i]); - - this->svc_config_argc_ = 0; - delete [] this->svc_config_argv_; - } } int @@ -296,26 +280,7 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) // // In some instances, we may actually build another vector of // arguments and stash it for use initializing other components such - // as the ACE_Service_Config or the RootPOA. - // - // Prepare a copy of the argument vector for the service configurator. - - ACE_NEW_THROW_EX (this->svc_config_argv_, - char *[argc + 1], - CORBA::NO_MEMORY ( - CORBA_SystemException::_tao_minor_code ( - TAO_ORB_CORE_INIT_LOCATION_CODE, - ENOMEM), - CORBA::COMPLETED_NO)); - ACE_CHECK_RETURN (-1); - - // Be certain to copy the program name so that service configurator - // has something to skip! - ACE_Arg_Shifter arg_shifter (argc, argv); - const char *argv0 = ""; - if (argc > 0 && argv != 0) - argv0 = argv[0]; - this->svc_config_argv_[this->svc_config_argc_++] = CORBA::string_dup (argv0); + // as the RootPOA. // @@ GIOPLite should be an alternative ORB Messaging protocols, fredk // int giop_lite = 0; @@ -345,10 +310,6 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) // Use TCP_NODELAY. size_t nodelay = 1; - // Should we skip the <ACE_Service_Config::open> method, e.g., if we - // already being configured by the ACE Service Configurator. - int skip_service_config_open = 0; - // Use dotted decimal addresses // @@ This option will be treated as a suggestion to each loaded // protocol to use a character representation for the numeric @@ -387,6 +348,8 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) } #endif /* TAO_DEBUG */ + ACE_Arg_Shifter arg_shifter (argc, argv); + while (arg_shifter.is_anything_left ()) { char *current_arg = 0; @@ -394,22 +357,7 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) //////////////////////////////////////////////////////////////// // begin with the 'parameterless' flags // //////////////////////////////////////////////////////////////// - if (arg_shifter.cur_arg_strncasecmp ("-ORBDaemon") == 0) - { - // Be a daemon - this->svc_config_argv_[this->svc_config_argc_++] = - CORBA::string_dup ("-b"); - - arg_shifter.consume_arg (); - } - else if (arg_shifter.cur_arg_strncasecmp - ("-ORBSkipServiceConfigOpen") == 0) - { - skip_service_config_open = 1; - - arg_shifter.consume_arg (); - } - else if (arg_shifter.cur_arg_strncasecmp ("-ORBGIOPlite") == 0) + if (arg_shifter.cur_arg_strncasecmp ("-ORBGIOPlite") == 0) { // @@ This will have to change since gioplite // will be considered as an alternate ORB @@ -429,39 +377,6 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) TAO_orbdebug = 1; arg_shifter.consume_arg (); } - - //////////////////////////////////////////////////////////////// - // continue with the 'parameter' flags // - //////////////////////////////////////////////////////////////// - else if ((current_arg = arg_shifter.get_the_parameter - ("-ORBSvcConfDirective"))) - { - // This is used to pass arguments to the Service - // Configurator using the "command line" to provide - // configuration information rather than using a svc.conf - // file. Pass the "-S" to the service configurator. - this->svc_config_argv_[this->svc_config_argc_++] = - CORBA::string_dup ("-S"); - - // Pass the next argument. - this->svc_config_argv_[this->svc_config_argc_++] = - CORBA::string_dup (current_arg); - - arg_shifter.consume_arg (); - } - - else if ((current_arg = - arg_shifter.get_the_parameter ("-ORBSvcConf"))) - { - // Specify the name of the svc.conf file to be used. - this->svc_config_argv_[this->svc_config_argc_++] = - CORBA::string_dup ("-f"); - - this->svc_config_argv_[this->svc_config_argc_++] = - CORBA::string_dup (current_arg); - - arg_shifter.consume_arg(); - } else if ((current_arg = arg_shifter.get_the_parameter ("-ORBDottedDecimalAddresses"))) { @@ -975,40 +890,6 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) (void) ACE_OS::signal (SIGPIPE, SIG_IGN); #endif /* SIGPIPE */ - // Initialize the Service Configurator -check for return values. - // Load the resource factory, connector registry, acceptor registry - // and protocols. Will need to call the open () method on - // the registries! - int result = TAO_Internal::open_services (this->svc_config_argc_, - this->svc_config_argv_, - 0, - skip_service_config_open); - - // Make sure to free up all the dynamically allocated memory. If we - // decide we don't need to allocate this stuff dynamically then we - // can remove this. - for (int i = 0; i < this->svc_config_argc_; i++) - CORBA::string_free (this->svc_config_argv_[i]); - - delete [] this->svc_config_argv_; - this->svc_config_argc_ = 0; - this->svc_config_argv_ = 0; - - // Check for errors returned from <TAO_Internal::open_services>. - if (result != 0 && errno != ENOENT) - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("(%P|%t) %p\n"), - ACE_TEXT ("ORB Core unable to initialize the ") - ACE_TEXT ("Service Configurator"))); - ACE_THROW_RETURN (CORBA::INITIALIZE ( - CORBA_SystemException::_tao_minor_code ( - TAO_ORB_CORE_INIT_LOCATION_CODE, - 0), - CORBA::COMPLETED_NO), - -1); - } - // Calling the open method here so that the svc.conf file is // opened and TAO_default_resource_factory::init () is called by the // time this method is called. diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h index 875e21f1974..845bc5bdf81 100644 --- a/TAO/tao/ORB_Core.h +++ b/TAO/tao/ORB_Core.h @@ -381,7 +381,7 @@ public: /// Sets the value of TAO_ORB_Core::resource_factory_ static void set_resource_factory (const char *resource_factory_name); - + /// See if we have a collocated address, if yes, return the POA /// associated with the address. int is_collocated (const TAO_MProfile& mprofile); @@ -471,7 +471,7 @@ public: * for Messaging this feature does not take effect * \param has_timeout returns 0 if there is no timeout policy set. * \param time_value returns the timeout value in effect for the object, - * hread and current ORB. + * thread and current ORB. */ void call_timeout_hook (TAO_Stub *stub, int &has_timeout, @@ -695,7 +695,7 @@ public: int remove_handle (ACE_HANDLE handle); - /** + /** * @name ORB Core Service Hooks * * These methods would represent the hooks in the ORB Core. These @@ -1123,13 +1123,6 @@ protected: /// This strategy will sync with the transport. TAO_Transport_Sync_Strategy *transport_sync_strategy_; - /// The number of arguments in the service configurator argument - /// vector. - int svc_config_argc_; - - /// The argument vector for the service configurator. - char **svc_config_argv_; - /// Number of outstanding references to this object. CORBA::ULong refcount_; diff --git a/TAO/tao/ORB_Table.cpp b/TAO/tao/ORB_Table.cpp index 64c81328e73..e8d2c3dc7da 100644 --- a/TAO/tao/ORB_Table.cpp +++ b/TAO/tao/ORB_Table.cpp @@ -2,11 +2,11 @@ // // $Id$ -#include "tao/ORB_Table.h" -#include "tao/ORB_Core.h" +#include "ORB_Table.h" +#include "ORB_Core.h" #if !defined (__ACE_INLINE__) -# include "tao/ORB_Table.inl" +# include "ORB_Table.inl" #endif /* ! __ACE_INLINE__ */ ACE_RCSID(tao, ORB_Table, "$Id$") @@ -29,7 +29,7 @@ TAO_ORB_Table::~TAO_ORB_Table (void) CORBA::string_free (ACE_const_cast (char *, (*i).ext_id_)); // Destroy the ORB_Core - (*i).int_id_->_decr_refcnt (); + (void) (*i).int_id_->_decr_refcnt (); } this->table_.close (); @@ -64,8 +64,9 @@ TAO_ORB_Table::bind (const char *orb_id, int result = this->table_.bind (id.in (), orb_core); if (result == 0) { - // The ORB table now owns the ORB Core. As such, the reference - // count on the ORB Core is *not* increased. + // Make sure the ORB table owns the ORB Core by increasing the + // reference count on it. + (void) orb_core->_incr_refcnt (); // Only set the "first_orb_" member if the given ORB Core was // successfully added to the ORB table. diff --git a/TAO/tao/TAO_Internal.cpp b/TAO/tao/TAO_Internal.cpp index 5212f6436a7..76dfd3a20b7 100644 --- a/TAO/tao/TAO_Internal.cpp +++ b/TAO/tao/TAO_Internal.cpp @@ -1,21 +1,24 @@ // $Id$ -#include "tao/TAO_Internal.h" #include "ace/Service_Config.h" #include "ace/Service_Repository.h" #include "ace/Object_Manager.h" -#include "tao/default_server.h" -#include "tao/default_client.h" -#include "tao/default_resource.h" +#include "ace/ARGV.h" +#include "ace/Arg_Shifter.h" -#include "tao/IIOP_Factory.h" +#include "TAO_Internal.h" +#include "default_server.h" +#include "default_client.h" +#include "default_resource.h" -#include "tao/CORBANAME_Parser.h" -#include "tao/CORBALOC_Parser.h" -#include "tao/FILE_Parser.h" -#include "tao/DLL_Parser.h" +#include "IIOP_Factory.h" -#include "tao/Object_Loader.h" +#include "CORBANAME_Parser.h" +#include "CORBALOC_Parser.h" +#include "FILE_Parser.h" +#include "DLL_Parser.h" + +#include "Object_Loader.h" ACE_RCSID(tao, TAO_Internal, "$Id$") @@ -30,6 +33,95 @@ const char *TAO_Internal::server_strategy_args_ = 0; const char *TAO_Internal::client_strategy_args_ = 0; #endif /* TAO_PLATFORM_SVC_CONF_FILE_NOTSUP */ + + +int +TAO_Internal::open_services (int &argc, char **argv) +{ + // Construct an argument vector specific to the Service + // Configurator. + ACE_ARGV svc_config_argv; + + // Be certain to copy the program name so that service configurator + // has something to skip! + const char *argv0 = ""; + if (argc > 0 && argv != 0) + argv0 = argv[0]; + + svc_config_argv.add (argv0); + + // Should we skip the <ACE_Service_Config::open> method, e.g., if we + // already being configured by the ACE Service Configurator. + int skip_service_config_open = 0; + + // Extract the Service Configurator ORB options from the argument + // vector. + ACE_Arg_Shifter arg_shifter (argc, argv); + + while (arg_shifter.is_anything_left ()) + { + char *current_arg = 0; + + // Start with the parameterless flags. + if (arg_shifter.cur_arg_strncasecmp + ("-ORBSkipServiceConfigOpen") == 0) + { + skip_service_config_open = 1; + + arg_shifter.consume_arg (); + } + + else if (arg_shifter.cur_arg_strncasecmp ("-ORBDaemon") == 0) + { + // Be a daemon + svc_config_argv.add ("-b"); + + arg_shifter.consume_arg (); + } + + + // Continue with flags that accept parameters. + else if ((current_arg = arg_shifter.get_the_parameter + ("-ORBSvcConfDirective"))) + { + // This is used to pass arguments to the Service + // Configurator using the "command line" to provide + // configuration information rather than using a svc.conf + // file. Pass the "-S" to the service configurator. + svc_config_argv.add ("-S"); + + svc_config_argv.add (current_arg); + + arg_shifter.consume_arg (); + } + + else if ((current_arg = + arg_shifter.get_the_parameter ("-ORBSvcConf"))) + { + // Specify the name of the svc.conf file to be used. + svc_config_argv.add ("-f"); + + svc_config_argv.add (current_arg); + + arg_shifter.consume_arg(); + } + + // Can't interpret this argument. Move on to the next + // argument. + else + // Any arguments that don't match are ignored so that the + // caller can still use them. + arg_shifter.ignore_arg (); + } + + int svc_config_argc = svc_config_argv.argc (); + return TAO_Internal::open_services_i (svc_config_argc, + svc_config_argv.argv (), + 0, // @@ What about this argument? + skip_service_config_open); +} + + void TAO_Internal::default_svc_conf_entries (const char *resource_factory_args, const char *server_strategy_args, @@ -42,12 +134,15 @@ TAO_Internal::default_svc_conf_entries (const char *resource_factory_args, } int -TAO_Internal::open_services (int &argc, - char **argv, - int ignore_default_svc_conf_file, - int skip_service_config_open) +TAO_Internal::open_services_i (int &argc, + char **argv, + int ignore_default_svc_conf_file, + int skip_service_config_open) { - ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, guard, *ACE_Static_Object_Lock::instance (), -1)); + ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX, + guard, *ACE_Static_Object_Lock::instance (), + -1)); + #if defined (TAO_PLATFORM_SVC_CONF_FILE_NOTSUP) ignore_default_svc_conf_file = 1; #endif /* TAO_PLATFORM_SVC_CONF_FILE_NOTSUP */ diff --git a/TAO/tao/TAO_Internal.h b/TAO/tao/TAO_Internal.h index 4cfba39fefd..f862f9a13b1 100644 --- a/TAO/tao/TAO_Internal.h +++ b/TAO/tao/TAO_Internal.h @@ -1,76 +1,93 @@ -// This may look like C, but it's really -*- C++ -*- -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// TAO -// -// = FILENAME -// TAO_Internal.h -// -// = DESCRIPTION -// Structures and methods completely internal to TAO. -// -// = AUTHOR -// Chris Cleeland -// -// ============================================================================ +// -*- C++ -*- + +//============================================================================= +/** + * @file TAO_Internal.h + * + * $Id$ + * + * Structures and methods completely internal to TAO. + * + * @author Chris Cleeland + */ +//============================================================================= + #ifndef TAO_INTERNAL_H #define TAO_INTERNAL_H + #include "ace/pre.h" -#include "tao/corbafwd.h" +#include "TAO_Export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +/** + * @class TAO_Internal + * + * @brief This class encapsulates some private behaviors and global data + * structures used internal to TAO. No application should EVER + * see this class. + */ class TAO_Export TAO_Internal - // = TITLE - // This class encapsulates some private behaviors and global data - // structures used internal to TAO. No application should EVER - // see this class. { public: - static int open_services (int &argc, - char **argv, - int ignore_default_svc_conf_file = 0, - int skip_service_config_open = 0); - // Initialize the ACE Service Configurator. This is a one-shot - // method, i.e., it can be called multiple times but it will only do - // its work once. It does, however, track the number of times it's - // called (see <open_services>). It is fully thread-safe. Return 0 - // if successful, -1 with errno set if failure. You can provide - // your program a set of default <svc.conf> entries by setting - // <ignore_default_svc_conf_file> to non-zero and use - // <default_svc_conf_entries> before calling <open_services>. In - // addition, you can <skip_service_config_open> altogether, which is - // important if the ORB is linked in via the - // <ACE_Service_Configuator>, which is non-reentrant. + /// Extract ACE Service Configurator arguments from the given + /// argument vector, and initialize the ACE Service Configurator. + /// This method should be called before the ORB Core is initialized, + /// and before any ORBInitializers are invoked. + static int open_services (int &argc, char **argv); + + /** + * The complement to open_services(), this will perform appropriate + * ACE Service Configurator closure operations. It should be called + * as many times as open_services(), and will only actually close + * things down on the last call. It is fully thread-safe. Return 0 + * if successful, -1 with errno set if failure. + */ static int close_services (void); - // The complement to <open_services>, this will perform appropriate - // ACE Service Configurator closure operations. It should be called - // as many times as <open_services>, and will only actually close - // things down on the last call. It is fully thread-safe. Return 0 - // if successful, -1 with errno set if failure. + /// Set default `svc.conf' content. This call has no effect if This + /// function must be called before first ORB initialization. static void default_svc_conf_entries (const char *resource_factory_args, const char *server_strategy_args, const char *client_strategy_args); - // Set default svc.conf content. This call has no effect if This - // function must be called before first ORB initialization. private: + + /// Private constructor prevents this class from being + /// instantiated. TAO_Internal (void); - // Private CTOR prevents this class from being instantiated. + /** + * Initialize the ACE Service Configurator. This is a one-shot + * method, i.e., it can be called multiple times but it will only do + * its work once. It does, however, track the number of times it's + * called (see open_services()). It is fully thread-safe. Return 0 + * if successful, -1 with errno set if failure. You can provide + * your program a set of default `svc.conf' entries by setting + * \param ignore_default_svc_conf_file to non-zero and use + * \param default_svc_conf_entries before calling open_services(). + * In addition, you can \param skip_service_config_open altogether, + * which is important if the ORB is linked in via the \param + * ACE_Service_Configuator, which is non-reentrant. + */ + static int open_services_i (int &argc, + char **argv, + int ignore_default_svc_conf_file = 0, + int skip_service_config_open = 0); + +private: + + + /// Number of times open_services() has been called. Incremented by + /// open_services(), and decremented by close_services(). Access to + /// this is protected via the \param ACE_Static_Object_Lock. static int service_open_count_; - // Number of times <open_services> has been called. Incremented by - // <open_services>, and decremented by <close_services>. Access to - // this is protected via the <ACE_Static_Object_Lock>. + static const char *resource_factory_args_; static const char *server_strategy_args_; @@ -78,4 +95,5 @@ private: }; #include "ace/post.h" -#endif /* TAO_INTERNAL_H */ + +#endif /* TAO_INTERNAL_H */ |