Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends

TAO_ORB_Core Class Reference

Encapsulates the state of an ORB. More...

#include <ORB_Core.h>

Collaboration diagram for TAO_ORB_Core:
Collaboration graph
[legend]

List of all members.

Public Types

typedef void(* Timeout_Hook )(TAO_ORB_Core *, TAO_Stub *, bool &, ACE_Time_Value &)
 Define the Timeout_Hook signature.
typedef void(* Sync_Scope_Hook )(TAO_ORB_Core *, TAO_Stub *, bool &, Messaging::SyncScope &)
typedef ACE_Array_Map
< ACE_CString, ACE_CString
InitRefMap

Public Member Functions

 TAO_ORB_Core (const char *id, ACE_Intrusive_Auto_Ptr< ACE_Service_Gestalt > g)
 Constructor.
TAO_ORB_Parametersorb_params (void)
 Accessor for the ORB parameters.
TAO_Connector_Registryconnector_registry (void)
 Get the connector registry.
TAO_Parser_Registryparser_registry (void)
 Get the IOR parser registry.
TAO::PolicyFactory_Registry_Adapter * policy_factory_registry (void)
TAO::ORBInitializer_Registry_Adapter * orbinitializer_registry (void)
TAO_ZIOP_Adapterziop_adapter () const
void ziop_adapter (TAO_ZIOP_Adapter *adapter)
TAO_Service_Context_Registryservice_context_registry (void)
TAO_ProtocolFactorySetprotocol_factories (void)
 Get the protocol factories.
CORBA::ORB_ptr orb (void)
 Get pointer to the ORB.
ACE_Reactorreactor (void)
 Wrappers that forward the request to the concurrency strategy.
ACE_Thread_Managerthr_mgr (void)
 Get the ACE_Thread_Manager.
CORBA::Object_ptr root_poa (void)
 Return the RootPOA, or try to load it if not initialized already.
TAO_Adapter_Registryadapter_registry (void)
 Get the adapter registry.
TAO_Adapterpoa_adapter (void)
TAO_Protocols_Hooksget_protocols_hooks (void)
 Gets the value of TAO_ORB_Core::protocols_hooks__.
TAO_Network_Priority_Protocols_Hooksget_network_priority_protocols_hooks (void)
 Gets the value of TAO_ORB_Core::network_priority_protocols_hooks__.
int is_collocated (const TAO_MProfile &mprofile)
ACE_Allocatoroutput_cdr_dblock_allocator (void)
ACE_Allocatoroutput_cdr_buffer_allocator (void)
ACE_Allocatoroutput_cdr_msgblock_allocator (void)
ACE_Allocatorinput_cdr_dblock_allocator (void)
ACE_Allocatorinput_cdr_buffer_allocator (void)
ACE_Allocatorinput_cdr_msgblock_allocator (void)
ACE_Allocatortransport_message_buffer_allocator (void)
ACE_Data_Blockcreate_input_cdr_data_block (size_t size)
ACE_Locklocking_strategy (void)
 Return the locking strategy used for the data blocks.
TAO_Policy_Setget_default_policies (void)
 Accessor method for the default_policies_.
CORBA::Policy_ptr get_policy (CORBA::PolicyType type)
CORBA::Policy_ptr get_policy_including_current (CORBA::PolicyType type)
CORBA::Policy_ptr get_cached_policy (TAO_Cached_Policy_Type type)
CORBA::Policy_ptr get_cached_policy_including_current (TAO_Cached_Policy_Type type)
TAO_Policy_Managerpolicy_manager (void)
 Return the Policy_Manager for this ORB.
TAO_Policy_Currentpolicy_current (void)
void call_timeout_hook (TAO_Stub *stub, bool &has_timeout, ACE_Time_Value &time_value)
 Invoke the timeout hook if present.
void set_timeout_hook (Timeout_Hook hook)
void connection_timeout (TAO_Stub *stub, bool &has_timeout, ACE_Time_Value &time_value)
 Invoke the timeout hook if present.
void call_sync_scope_hook (TAO_Stub *stub, bool &has_synchronization, Messaging::SyncScope &scope)
TAO::Transport_Queueing_Strategy * get_transport_queueing_strategy (TAO_Stub *stub, Messaging::SyncScope &scope)
void set_sync_scope_hook (Sync_Scope_Hook hook)
TAO_ORB_Core_TSS_Resourcesget_tss_resources (void)
 Obtain the TSS resources of this orb.
void * get_tss_resource (size_t slot_id)
 Obtain the TSS resource in the given slot.
int set_tss_resource (size_t slot_id, void *)
int add_tss_cleanup_func (ACE_CLEANUP_FUNC cleanup, size_t &slot_id)
void tss_cleanup (ACE_Array_Base< void * > &ts_objects)
 Cleans up ts_objects using the underlying TSS cleanup function registry.
TAO_Leader_Followerleader_follower (void)
 Get access to the leader_follower class.
TAO_LF_Strategylf_strategy (void)
 Get access to the leader follower strategy.
TAO_Thread_Lane_Resourceslane_resources (void)
 Get access to the thread lane resources.
int run (ACE_Time_Value *tv, int perform_work)
 Run the event loop.
void shutdown (CORBA::Boolean wait_for_completion)
 End the event loop.
bool has_shutdown (void) const
 Get the shutdown flag value.
void destroy (void)
 Shutdown the ORB and free resources.
void check_shutdown (void)
 Check if ORB has shutdown. If it has, throw an exception.
int thread_per_connection_timeout (ACE_Time_Value &timeout) const
TAO_Stubcreate_stub_object (TAO_MProfile &mprofile, const char *type_id, CORBA::PolicyList *policy_list)
TAO_Stubcreate_stub (const char *repository_id, const TAO_MProfile &profiles)
CORBA::Object_ptr create_object (TAO_Stub *the_stub)
CORBA::Long initialize_object (TAO_Stub *the_stub, CORBA::Object_ptr obj)
CORBA::Long reinitialize_object (TAO_Stub *stub)
const char * orbid (void) const
 Return ORBid string.
CORBA::Boolean use_implrepo (void)
 Do we attempt to register with the Implementation Repository.
CORBA::Boolean imr_endpoints_in_ior (void)
 Do we put the ImR's endpoints into persistent object references we create.
CORBA::Object_ptr resolve_typecodefactory (void)
 Resolve the TypeCodeFactory DLL.
CORBA::Object_ptr resolve_picurrent (void)
 Resolve the PICurrent.
CORBA::Object_ptr resolve_poa_current (void)
 Resolve POA Current.
CORBA::Object_ptr resolve_codecfactory (void)
 Resolve the CodecFactory DLL.
CORBA::Object_ptr resolve_compression_manager (void)
 Resolve the Compression DLL.
CORBA::Object_ptr resolve_dynanyfactory (void)
 Resolve the Dynamic Any Factory.
CORBA::Object_ptr resolve_ior_manipulation (void)
 Resolve the IOR Manipulation reference for this ORB.
TAO_ZIOP_Adapterziop_adapter_i (void)
CORBA::Object_ptr resolve_ior_table (void)
 Resolve the IOR Table reference for this ORB.
CORBA::Object_ptr resolve_monitor (void)
 Resolve the Monitor reference for this ORB.
CORBA::Object_ptr resolve_rir (const char *name)
 Resolve an initial reference via the -ORBInitRef and.
CORBA::Object_ptr resolve_rt_orb (void)
 Resolve the RT ORB reference for this ORB.
const char * server_id (void) const
CORBA::ORB_ObjectIdList * list_initial_references (void)
 List all the service known by the ORB.
unsigned long _incr_refcnt (void)
 Reference counting...
unsigned long _decr_refcnt (void)
unsigned long _refcnt (void) const
int register_handle (ACE_HANDLE handle)
int remove_handle (ACE_HANDLE handle)
TAO_Valuetype_Adaptervaluetype_adapter (void)
 Return the valuetype adapter.
CORBA::ValueFactory register_value_factory (const char *repository_id, CORBA::ValueFactory factory)
void unregister_value_factory (const char *repository_id)
CORBA::ValueFactory lookup_value_factory (const char *repository_id)
TAO_IORInterceptor_Adapterior_interceptor_adapter (void)
CORBA::Boolean bidir_giop_policy (void)
void bidir_giop_policy (CORBA::Boolean)
TAO_Object_Ref_Tableobject_ref_table (void)
TAO::ObjectKey_Table & object_key_table (void)
 Acceessor to the table that stores the object_keys.
TAO_Request_Dispatcherrequest_dispatcher (void)
 Return the current request dispatcher strategy.
void request_dispatcher (TAO_Request_Dispatcher *rd)
void load_policy_validators (TAO_Policy_Validator &validator)
TAO_Flushing_Strategyflushing_strategy (void)
 Return the flushing strategy.
TAO_Codeset_Managercodeset_manager (void)
 Get Code Set Manager.
InitRefMapinit_ref_map (void)
 Return a pointer to the -ORBInitRef map.
void set_default (const char *orb_id)
void not_default (const char *orb_id)
 Choose to be not a default ORB when there is more than one ORB.
CORBA::Boolean is_permanent_forward_condition (const CORBA::Object_ptr obj, const TAO_Service_Context &service_context)
ACE_Service_Gestaltconfiguration () const
 Configuration accessor method.
auto_ptr
< TAO_GIOP_Fragmentation_Strategy
fragmentation_strategy (TAO_Transport *transport)
 Get outgoing fragmentation strategy.
void set_eager_transport_queueing_strategy (TAO::Transport_Queueing_Strategy *strategy)
void set_delayed_transport_queueing_strategy (TAO::Transport_Queueing_Strategy *strategy)

CORBA::Object_ptr poa_current (void)
 Accessor to the POA current.

void optimize_collocation_objects (CORBA::Boolean opt)
 Set/get the collocation flags.
CORBA::Boolean optimize_collocation_objects (void) const
 Set/get the collocation flags.
void use_global_collocation (CORBA::Boolean opt)
 Set/get the collocation flags.
CORBA::Boolean use_global_collocation (void) const
 Set/get the collocation flags.
CORBA::ULong get_collocation_strategy (void) const
 Set/get the collocation flags.
Access to Factories

These factories are not thread-specific, and are presented here in order to have one place to get useful information. Often, the instances to which the return pointers are stored in the Service Repository.

TAO_Resource_Factoryresource_factory (void)
 Returns pointer to the resource factory.
TAO::GUIResource_Factory * gui_resource_factory (void)
 Returns pointer to the factory for creating gui resources.
TAO_Client_Strategy_Factoryclient_factory (void)
 Returns pointer to the client factory.
TAO_Server_Strategy_Factoryserver_factory (void)
 Returns pointer to the server factory.
TAO_Protocols_Hooksprotocols_hooks (void)
 Returns pointer to the Protocols_Hooks.
TAO_Thread_Lane_Resources_Managerthread_lane_resources_manager (void)
 Returns a pointer to the Thread Lane Resources Manager.
TAO_Collocation_Resolvercollocation_resolver (void)
 Returns a pointer to the Collocation Resolver.
TAO_Stub_Factorystub_factory (void)
 Returns a pointer to the Stub factory.
TAO_Endpoint_Selector_Factoryendpoint_selector_factory (void)
 Returns a pointer to the endpoint selector factory.

CORBA::Environmentdefault_environment (void) const
void default_environment (CORBA::Environment *)

CORBA::Object_ptr implrepo_service (void)
 Set/Get the IOR of the Implementation Repository service.
void implrepo_service (const CORBA::Object_ptr ir)
 Set/Get the IOR of the Implementation Repository service.
ORB Core Service Hooks

These methods would represent the hooks in the ORB Core. These hooks would be used to call back on the services or other features that are dynamically loaded.

CORBA::Boolean service_profile_selection (const TAO_MProfile &mprofile, TAO_Profile *&profile)
CORBA::Boolean object_is_nil (CORBA::Object_ptr object)
TAO_Service_Callbacks::Profile_Equivalence is_profile_equivalent (const TAO_Profile *this_p, const TAO_Profile *that_p)
CORBA::ULong hash_service (TAO_Profile *this_p, CORBA::ULong max)
TAO_Fault_Tolerance_Servicefault_tolerance_service (void)
 Return a reference to the Fault Tolerant service object.
CORBA::Boolean ft_send_extended_sc (void)
TAO::Invocation_Status service_raise_comm_failure (IOP::ServiceContextList &clist, TAO_Profile *profile)
TAO::Invocation_Status service_raise_transient_failure (IOP::ServiceContextList &clist, TAO_Profile *profile)
Portable Interceptor Related Methods

These are support methods for interceptor registration and interceptor set (an array) access, in addition to PICurrent access.

CORBA::Object_ptr pi_current (void)
 Return a pointer to the cached TAO::PICurrent object.
void pi_current (CORBA::Object_ptr current)
 Set the pointer to the cached TAO::PICurrent object.
void add_interceptor (PortableInterceptor::ClientRequestInterceptor_ptr interceptor)
 Register a client request interceptor.
void add_interceptor (PortableInterceptor::ServerRequestInterceptor_ptr interceptor)
 Register a server request interceptor.
void add_interceptor (PortableInterceptor::ClientRequestInterceptor_ptr interceptor, const CORBA::PolicyList &policies)
 Register a client request interceptor with policies.
void add_interceptor (PortableInterceptor::ServerRequestInterceptor_ptr interceptor, const CORBA::PolicyList &policies)
 Register a server request interceptor with policies.
TAO::ClientRequestInterceptor_Adapter * clientrequestinterceptor_adapter (void)
TAO::ServerRequestInterceptor_Adapter * serverrequestinterceptor_adapter (void)
void add_interceptor (PortableInterceptor::IORInterceptor_ptr interceptor)
 Register an IOR interceptor.

Static Public Member Functions

static void set_resource_factory (const char *resource_factory_name)
 Sets the value of TAO_ORB_Core::resource_factory_.
static void set_gui_resource_factory (TAO::GUIResource_Factory *gui_factory)
static void set_network_priority_protocols_hooks (const char *network_priority_protocols_hooks_name)
 Sets the value of TAO_ORB_Core::network_priority_protocols_hooks_.
static void dynamic_adapter_name (const char *name)
 Sets the value of TAO_ORB_Core::dynamic_adapter_name_.
static const char * dynamic_adapter_name (void)
 Gets the value of TAO_ORB_Core::dynamic_adapter_name_.
static void ifr_client_adapter_name (const char *name)
 Sets the value of TAO_ORB_Core::ifr_client_adapter_name_.
static const char * ifr_client_adapter_name (void)
 Gets the value of TAO_ORB_Core::ifr_client_adapter_name_.
static void typecodefactory_adapter_name (const char *name)
 Sets the value of TAO_ORB_Core::typecodefactory_adapter_name_.
static const char * typecodefactory_adapter_name (void)
 Gets the value of TAO_ORB_Core::typecodefactory_adapter_name_.
static void iorinterceptor_adapter_factory_name (const char *name)
 Sets the value of TAO_ORB_Core::iorinterceptor_adapter_factory_name_.
static const char * iorinterceptor_adapter_factory_name (void)
 Gets the value of TAO_ORB_Core::iorinterceptor_adapter_factory_name_.
static void valuetype_adapter_factory_name (const char *name)
 Sets the value of TAO_ORB_Core::valuetype_adapter_factory_name.
static const char * valuetype_adapter_factory_name (void)
 Gets the value of TAO_ORB_Core::valuetype_adapter_factory_name.
static void connection_timeout_hook (Timeout_Hook hook)
 Define the Timeout_Hook signature.
static void default_sync_scope_hook (TAO_ORB_Core *, TAO_Stub *, bool &has_synchronization, Messaging::SyncScope &scope)
 Default Sync_Scope_Hook.

Public Attributes

TAO_Protocols_Hooksprotocols_hooks_
 Handle to the factory for protocols_hooks_..
TAO_Network_Priority_Protocols_Hooksnetwork_priority_protocols_hooks_
 Handle to the factory for network_priority_protocols_hooks_..

Protected Member Functions

 ~TAO_ORB_Core (void)
int init (int &argc, char *argv[])
int fini (void)
ACE_Data_Blockcreate_data_block_i (size_t size, ACE_Allocator *buffer_allocator, ACE_Allocator *dblock_allocator, ACE_Lock *lock)
 Routine that creates a ACE_Data_Block given the lock and allocators.
void resolve_typecodefactory_i (void)
 Obtain and cache the typecode factory object reference.
void resolve_poa_current_i (void)
 Obtain and cache the poa current.
void resolve_picurrent_i (void)
 Obtain and cache the picurrent factory object reference.
TAO::ClientRequestInterceptor_Adapter * clientrequestinterceptor_adapter_i (void)
TAO::ServerRequestInterceptor_Adapter * serverrequestinterceptor_adapter_i (void)
void resolve_codecfactory_i (void)
 Obtain and cache the codec factory object reference.
void resolve_compression_manager_i (void)
 Obtain and cache the compression manager object reference.
void resolve_dynanyfactory_i (void)
 Obtain and cache the dynamic any factory object reference.
void resolve_iormanipulation_i (void)
 Obtain and cache the IORManipulation factory object reference.
void resolve_monitor_i (void)
 Obtain and cache the Monitor object reference.
void services_callbacks_init (void)
void destroy_interceptors (void)
int set_endpoint_helper (const ACE_CString &lane, const ACE_CString &endpoints)
TAO::PolicyFactory_Registry_Adapter * policy_factory_registry_i (void)
TAO::ORBInitializer_Registry_Adapter * orbinitializer_registry_i (void)
CORBA::Long initialize_object_i (TAO_Stub *the_stub, const TAO_MProfile &mprofile)
 Common code from initialize_object and reinitialize_object.
 ACE_TSS_TYPE (TAO_ORB_Core_TSS_Resources) tss_resources_
 This is where the tss resources for this ORB are stored.

Protected Attributes

TAO_SYNCH_MUTEX lock_
 Synchronize internal state...
TAO_Thread_Lane_Resources_Managerthread_lane_resources_manager_
TAO_Collocation_Resolvercollocation_resolver_
TAO_Stub_Factorystub_factory_
TAO_ProtocolFactorySetprotocol_factories_
CORBA::Object_ptr implrepo_service_
 The cached IOR for the Implementation Repository.
int use_implrepo_
 Flag for whether the implrepo support is enabled or not.
int imr_endpoints_in_ior_
 Flag for whether to put the ImR endpoints into our object refs.
CORBA::Object_ptr typecode_factory_
 The cached IOR for the TypeCodeFactory DLL.
CORBA::Object_ptr codec_factory_
 The cached IOR for the CodecFactory DLL.
CORBA::Object_ptr compression_manager_
 The cached IOR for the Compression DLL.
CORBA::Object_ptr dynany_factory_
 The cached object reference for the DynAnyFactory.
CORBA::Object_ptr ior_manip_factory_
 The cached object reference for the IORManipulataion.
CORBA::Object_ptr ior_table_
 The cached object reference for the IORTable.
CORBA::Object_ptr monitor_
 The cached object reference for the Monitor.
CORBA::Object_var rt_orb_
 The cached object reference for the RTCORBA::RTORB.
CORBA::Object_var rt_current_
 The cached object reference for the RTCORBA::Current interface.
CORBA::ORB_ptr orb_
CORBA::Object_var root_poa_
TAO_ORB_Parameters orb_params_
 Parameters used by the ORB.
InitRefMap init_ref_map_
 Return InitRefMap to find if a particular object id is present.
TAO_Object_Ref_Table object_ref_table_
TAO::ObjectKey_Table object_key_table_
 Table that stores the object key instead of caching one per-profile.
char * orbid_
 The ORBid for this ORB.
TAO_Resource_Factoryresource_factory_
 Handle to the factory for resource information..
ACE_CString server_id_
 The server_id_ that was passed via -ORBServerId option.
TAO_Client_Strategy_Factoryclient_factory_
 Handle to the factory for Client-side strategies.
TAO_Server_Strategy_Factoryserver_factory_
 Handle to the factory for Server-side strategies.
CORBA::Boolean ft_send_extended_sc_
CORBA::Boolean opt_for_collocation_
CORBA::Boolean use_global_collocation_
CORBA::ULong collocation_strategy_
 Default collocation policy. This should never be ORB_CONTROL.
TAO_Policy_Managerpolicy_manager_
 The Policy_Manager for this ORB.
TAO_Policy_Setdefault_policies_
 The default policies.
TAO_Policy_Currentpolicy_current_
 Policy current.
TAO_Request_Dispatcherrequest_dispatcher_
 The request dispatching strategy.
CORBA::Object_var poa_current_
TAO_Adapter_Registry adapter_registry_
 The list of Adapters used in this ORB.
TAO_Adapterpoa_adapter_
 An optimization for the POA.
ACE_Thread_Manager tm_
 The Thread Manager.
ACE_Lock_Adapter< TAO_SYNCH_MUTEX > data_block_lock_
 The data block reference counts are locked using this mutex.
TAO_Cleanup_Func_Registry tss_cleanup_funcs_
bool has_shutdown_
 Flag which denotes that the ORB has been shutdown.
TAO_SYNCH_MUTEX open_lock_
 Mutual exclusion for calling open.
TAO_Endpoint_Selector_Factoryendpoint_selector_factory_
TAO::Transport_Queueing_Strategy * eager_transport_queueing_strategy_
 This strategy will buffer messages.
TAO::Transport_Queueing_Strategy * delayed_transport_queueing_strategy_
 This strategy will buffer messages.
TAO::Transport_Queueing_Strategy * flush_transport_queueing_strategy_
ACE_Atomic_Op< TAO_SYNCH_MUTEX,
unsigned long > 
refcount_
 Number of outstanding references to this object.
TAO::PolicyFactory_Registry_Adapter * policy_factory_registry_
 Registry containing all registered policy factories.
TAO::ORBInitializer_Registry_Adapter * orbinitializer_registry_
 Registry containing all orb initializers.
TAO_Service_Context_Registry service_context_registry_
 Registry containing all service context handlers.
CORBA::Object_ptr pi_current_
 Cached pointer/reference to the PICurrent object.
TAO::ClientRequestInterceptor_Adapter * client_request_interceptor_adapter_
 The adapter for handling client request interceptors.
TAO::ServerRequestInterceptor_Adapter * server_request_interceptor_adapter_
 The adapter for handling server request interceptors.
TAO_IORInterceptor_Adapterior_interceptor_adapter_
 IORInterceptor adapter.
TAO_Valuetype_Adaptervaluetype_adapter_
 Pointer to the valuetype adapter.
TAO_Parser_Registry parser_registry_
 The IOR parser registry.
TAO_BiDir_Adapterbidir_adapter_
 BiDirectional GIOP factory.
CORBA::Boolean bidir_giop_policy_
 Bir Dir GIOP policy value.
TAO_ZIOP_Adapterziop_adapter_
 ZIOP Adapter.
CORBA::Boolean ziop_enabled_
 ZIOP enabled or not.
TAO_Flushing_Strategyflushing_strategy_
 Hold the flushing strategy.
TAO_Codeset_Managercodeset_manager_
 Code Set Manager, received from the Resource Factory.
ACE_Intrusive_Auto_Ptr
< ACE_Service_Gestalt
config_
 ORB's service configuration.
Sync_Scope_Hook sync_scope_hook_
 The hook to be set for the SyncScopePolicy.
Timeout_Hook timeout_hook_
 The hook to be set for the RelativeRoundtripTimeoutPolicy.
Service Level Hooks

TAO_Fault_Tolerance_Service ft_service_
 Fault Tolerant service hook.

int thread_per_connection_use_timeout_
 The value of the timeout if the flag above is not zero.
ACE_Time_Value thread_per_connection_timeout_
 The value of the timeout if the flag above is not zero.

Private Member Functions

void resolve_ior_table_i (void)
 Obtain and cache the dynamic any factory object reference.
CORBA::Boolean is_collocation_enabled (TAO_ORB_Core *other_orb, const TAO_MProfile &mp)

 TAO_ORB_Core (const TAO_ORB_Core &)
 The ORB Core should not be copied.
void operator= (const TAO_ORB_Core &)
 The ORB Core should not be copied.

Private Attributes

bool use_local_memory_pool_

Friends

class TAO_ORB_Core_Auto_Ptr
CORBA::ORB_ptr CORBA::ORB_init (int &, ACE_TCHAR *argv[], const char *)

Collocation Strategies



enum  { ORB_CONTROL, THRU_POA, DIRECT }
static TAO::Collocation_Strategy collocation_strategy (CORBA::Object_ptr object)

Detailed Description

Encapsulates the state of an ORB.

This is the implementation class for the CORBA::ORB interface. The class also encapsulates the access to the ORB resources and its state.

Some resources can be TSS or global, those resources are always accessed through a TSS interface, but are allocated using the Resource_Factory. If the resource is really global the Resource_Factory will simply return a pointer to the global instance.

Definition at line 160 of file ORB_Core.h.


Member Typedef Documentation

Definition at line 882 of file ORB_Core.h.

Definition at line 533 of file ORB_Core.h.

Define the Timeout_Hook signature.

Definition at line 474 of file ORB_Core.h.


Member Enumeration Documentation

anonymous enum

This method returns the right collocation strategy, if any, to be used to perform a method invocation on the given object.

Note:
No-Collocation is a special case of collocation.
Enumerator:
ORB_CONTROL 

Indicate object should refer to ORB for either one of the following strategies.

THRU_POA 

Collocated calls will go thru POA.

DIRECT 

Collocated calls invoke operation on Servant directly.

Definition at line 230 of file ORB_Core.h.

  {
    /// Indicate object should refer to ORB for either one of the
    /// following strategies.
    ORB_CONTROL,

    /// Collocated calls will go thru POA.
    THRU_POA,

    /// Collocated calls invoke operation on Servant directly.
    DIRECT
  };


Constructor & Destructor Documentation

TAO_ORB_Core::TAO_ORB_Core ( const char *  id,
ACE_Intrusive_Auto_Ptr< ACE_Service_Gestalt g 
)

Constructor.

Definition at line 187 of file ORB_Core.cpp.

  : protocols_hooks_ (0),
    network_priority_protocols_hooks_ (0),
#if TAO_USE_LOCAL_MEMORY_POOL == 1
    use_local_memory_pool_ (true),
#else
    use_local_memory_pool_ (false),
#endif
    lock_ (),
    thread_lane_resources_manager_ (0),
    collocation_resolver_ (0),
    stub_factory_ (0),
    protocol_factories_ (0),
    implrepo_service_ (CORBA::Object::_nil ()),
    use_implrepo_ (0),
    imr_endpoints_in_ior_ (1),
    typecode_factory_ (CORBA::Object::_nil ()),
    codec_factory_ (CORBA::Object::_nil ()),
    compression_manager_ (CORBA::Object::_nil ()),
    dynany_factory_ (CORBA::Object::_nil ()),
    ior_manip_factory_ (CORBA::Object::_nil ()),
    ior_table_ (CORBA::Object::_nil ()),
    monitor_ (CORBA::Object::_nil ()),
    orb_ (CORBA::ORB::_nil ()),
    root_poa_ (),
    orb_params_ (),
    init_ref_map_ (TAO_DEFAULT_OBJECT_REF_TABLE_SIZE),
    object_ref_table_ (),
    object_key_table_ (),
    orbid_ (ACE_OS::strdup (orbid ? orbid : "")),
    resource_factory_ (0),
    client_factory_ (0),
    server_factory_ (0),
    ft_send_extended_sc_ (false),
    opt_for_collocation_ (true),
    use_global_collocation_ (true),
    collocation_strategy_ (THRU_POA),

#if (TAO_HAS_CORBA_MESSAGING == 1)

    policy_manager_ (0),
    default_policies_ (0),
    policy_current_ (0),

#endif /* TAO_HAS_CORBA_MESSAGING == 1 */

    poa_current_ (),
    adapter_registry_ (this),
    poa_adapter_ (0),
    tm_ (),
    tss_cleanup_funcs_ (),
    tss_resources_ (),
    has_shutdown_ (true),  // Start the ORB in a  "shutdown" state.  Only
                           // after CORBA::ORB_init() is called will the
                           // ORB no longer be shutdown.  This does not
                           // mean that the ORB can be reinitialized.  It
                           // can only be initialized once.
    thread_per_connection_use_timeout_ (1),
    open_lock_ (),
    endpoint_selector_factory_ (0),
#if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)
    eager_transport_queueing_strategy_ (0),
    delayed_transport_queueing_strategy_ (0),
    flush_transport_queueing_strategy_ (0),
#endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */
    refcount_ (1),
    policy_factory_registry_ (0),
    orbinitializer_registry_ (0),
#if (TAO_HAS_INTERCEPTORS == 1)
    pi_current_ (CORBA::Object::_nil ()),
    client_request_interceptor_adapter_ (0),
    server_request_interceptor_adapter_ (0),
#endif  /* TAO_HAS_INTERCEPTORS == 1 */
    ior_interceptor_adapter_ (0),
    valuetype_adapter_ (0),
    parser_registry_ (),
    bidir_adapter_ (0),
    bidir_giop_policy_ (0),
    ziop_adapter_ (0),
    ziop_enabled_ (false),
    flushing_strategy_ (0),
    codeset_manager_ (0),
    config_ (gestalt),
    sync_scope_hook_ (0),
    timeout_hook_ (0)
{
#if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)

  ACE_NEW (this->flush_transport_queueing_strategy_,
           TAO::Flush_Transport_Queueing_Strategy);

#endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */

#if (TAO_HAS_CORBA_MESSAGING == 1)

  ACE_NEW (this->policy_manager_,
           TAO_Policy_Manager);

  ACE_NEW (this->default_policies_,
           TAO_Policy_Set (TAO_POLICY_ORB_SCOPE));

  ACE_NEW (this->policy_current_,
           TAO_Policy_Current);

#endif /* TAO_HAS_CORBA_MESSAGING == 1 */

  // Initialize the default request dispatcher.
  ACE_NEW (this->request_dispatcher_,
           TAO_Request_Dispatcher);

  this->set_sync_scope_hook (TAO_ORB_Core::default_sync_scope_hook);
}

TAO_ORB_Core::~TAO_ORB_Core ( void   )  [protected]

Destructor is protected since the ORB Core is a reference counted object.

Definition at line 301 of file ORB_Core.cpp.

{
  delete this->thread_lane_resources_manager_;

  delete this->flushing_strategy_;

  ACE_OS::free (this->orbid_);

#if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)

  delete this->eager_transport_queueing_strategy_;
  delete this->delayed_transport_queueing_strategy_;
  delete this->flush_transport_queueing_strategy_;

#endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */

#if (TAO_HAS_CORBA_MESSAGING == 1)

  ::CORBA::release (this->policy_manager_);
  delete this->default_policies_;
  ::CORBA::release (this->policy_current_);

#endif /* TAO_HAS_CORBA_MESSAGING == 1 */

  delete this->request_dispatcher_;

  delete this->policy_factory_registry_;

  // Don't delete, is a process wide singleton shared by all orbs
  orbinitializer_registry_ = 0;

  ::CORBA::release (this->orb_);

  delete this->codeset_manager_;
  this->codeset_manager_ = 0;

  // This will destroy the service repository for this core
  (void) TAO::ORB::close_services (this->config_);

}

TAO_ORB_Core::TAO_ORB_Core ( const TAO_ORB_Core  )  [private]

The ORB Core should not be copied.


Member Function Documentation

unsigned long TAO_ORB_Core::_decr_refcnt ( void   ) 

Definition at line 29 of file ORB_Core.inl.

{
  unsigned long const count = --this->refcount_;
  if (count != 0)
    return count;

  this->fini ();
  return 0;
}

unsigned long TAO_ORB_Core::_incr_refcnt ( void   ) 

Reference counting...

Definition at line 17 of file ORB_Core.inl.

{
  return this->refcount_++;
}

unsigned long TAO_ORB_Core::_refcnt ( void   )  const

Definition at line 23 of file ORB_Core.inl.

{
  return this->refcount_.value ();
}

TAO_ORB_Core::ACE_TSS_TYPE ( TAO_ORB_Core_TSS_Resources   )  [protected]

This is where the tss resources for this ORB are stored.

TAO_Adapter_Registry & TAO_ORB_Core::adapter_registry ( void   ) 

Get the adapter registry.

Definition at line 172 of file ORB_Core.inl.

{
  return this->adapter_registry_;
}

void TAO_ORB_Core::add_interceptor ( PortableInterceptor::ClientRequestInterceptor_ptr  interceptor,
const CORBA::PolicyList &  policies 
)

Register a client request interceptor with policies.

Definition at line 3384 of file ORB_Core.cpp.

{
  if (this->clientrequestinterceptor_adapter_i ())
    {
      this->client_request_interceptor_adapter_->add_interceptor (
        interceptor,
        policies);

    }
  else
    {
      ACE_ERROR ((LM_ERROR,
                  ACE_TEXT ("TAO (%P|%t) - %p\n"),
                  ACE_TEXT ("ERROR: ORB Core unable to find the ")
                  ACE_TEXT ("Client Request Interceptor Adapter Factory ")
                  ACE_TEXT ("instance")));

      throw ::CORBA::INTERNAL ();
    }
}

void TAO_ORB_Core::add_interceptor ( PortableInterceptor::ServerRequestInterceptor_ptr  interceptor,
const CORBA::PolicyList &  policies 
)

Register a server request interceptor with policies.

Definition at line 3408 of file ORB_Core.cpp.

{
  if (this->serverrequestinterceptor_adapter_i ())
    {
      this->server_request_interceptor_adapter_->add_interceptor (
        interceptor,
        policies);

    }
  else
    {
      ACE_ERROR ((LM_ERROR,
                  ACE_TEXT ("TAO (%P|%t) - %p\n"),
                  ACE_TEXT ("ERROR: ORB Core unable to find the ")
                  ACE_TEXT ("Server Request Interceptor Adapter Factory ")
                  ACE_TEXT ("instance")));

      throw ::CORBA::INTERNAL ();
    }
}

void TAO_ORB_Core::add_interceptor ( PortableInterceptor::IORInterceptor_ptr  interceptor  ) 

Register an IOR interceptor.

Definition at line 3258 of file ORB_Core.cpp.

{
  if (this->ior_interceptor_adapter ())
    {
      this->ior_interceptor_adapter_->add_interceptor (interceptor);
    }
  else
    {
      ACE_ERROR ((LM_ERROR,
                  ACE_TEXT ("TAO (%P|%t) - %p\n"),
                  ACE_TEXT ("ERROR: ORB Core unable to find the ")
                  ACE_TEXT ("IORInterceptor Adapter Factory instance")));

      throw ::CORBA::INTERNAL ();
    }
}

void TAO_ORB_Core::add_interceptor ( PortableInterceptor::ServerRequestInterceptor_ptr  interceptor  ) 

Register a server request interceptor.

Definition at line 3363 of file ORB_Core.cpp.

{
  if (this->serverrequestinterceptor_adapter_i ())
    {
      this->server_request_interceptor_adapter_->add_interceptor (interceptor);
    }
  else
    {
      ACE_ERROR ((LM_ERROR,
                  ACE_TEXT ("TAO (%P|%t) - %p\n"),
                  ACE_TEXT ("ERROR: ORB Core unable to find the ")
                  ACE_TEXT ("Server Request Interceptor Adapter Factory ")
                  ACE_TEXT ("instance")));

      throw ::CORBA::INTERNAL ();
    }
}

void TAO_ORB_Core::add_interceptor ( PortableInterceptor::ClientRequestInterceptor_ptr  interceptor  ) 

Register a client request interceptor.

Definition at line 3314 of file ORB_Core.cpp.

{
  if (this->clientrequestinterceptor_adapter_i ())
    {
      this->client_request_interceptor_adapter_->add_interceptor (interceptor);
    }
  else
    {
      ACE_ERROR ((LM_ERROR,
                  ACE_TEXT ("TAO (%P|%t) - %p\n"),
                  ACE_TEXT ("ERROR: ORB Core unable to find the ")
                  ACE_TEXT ("Client Request Interceptor Adapter Factory ")
                  ACE_TEXT ("instance")));

      throw ::CORBA::INTERNAL ();
    }
}

int TAO_ORB_Core::add_tss_cleanup_func ( ACE_CLEANUP_FUNC  cleanup,
size_t &  slot_id 
)

Register a TSS cleanup function. The slot ID for the corresponding ORB core TSS resource is returned by the reference argument. This method return 0 on success, and -1 on failure.

Definition at line 3057 of file ORB_Core.cpp.

{
  return this->tss_cleanup_funcs_.register_cleanup_function (cleanup, slot_id);
}

CORBA::Boolean TAO_ORB_Core::bidir_giop_policy ( void   ) 

Set and Get methods to indicate whether a BiDir IIOP policy has been set in the POA.

Note:
At present, the value will be true even if one of the POA's is set with the Bi Dir GIOP policy.

Definition at line 49 of file ORB_Core.inl.

{
  return this->bidir_giop_policy_;
}

void TAO_ORB_Core::bidir_giop_policy ( CORBA::Boolean  val  ) 

Definition at line 55 of file ORB_Core.inl.

{
  this->bidir_giop_policy_ = val;
}

void TAO_ORB_Core::call_sync_scope_hook ( TAO_Stub stub,
bool &  has_synchronization,
Messaging::SyncScope scope 
)

Definition at line 3007 of file ORB_Core.cpp.

{
  Sync_Scope_Hook sync_scope_hook = this->sync_scope_hook_;

  if (sync_scope_hook == 0)
    {
      has_synchronization = false;
      return;
    }

  (*sync_scope_hook) (this, stub, has_synchronization, scope);
}

void TAO_ORB_Core::call_timeout_hook ( TAO_Stub stub,
bool &  has_timeout,
ACE_Time_Value time_value 
)

Invoke the timeout hook if present.

The timeout hook is used to determine if the timeout policy is set and with what value. If the ORB is compiled without support for Messaging this feature does not take effect

Parameters:
has_timeout returns 0 if there is no timeout policy set.
time_value returns the timeout value in effect for the object, thread and current ORB.

Definition at line 3063 of file ORB_Core.cpp.

{
  Timeout_Hook timeout_hook = this->timeout_hook_;

  if (timeout_hook == 0)
    {
      has_timeout = false;
      return;
    }
  (*timeout_hook) (this, stub, has_timeout, time_value);
}

void TAO_ORB_Core::check_shutdown ( void   ) 

Check if ORB has shutdown. If it has, throw an exception.

Definition at line 2386 of file ORB_Core.cpp.

{
  if (this->has_shutdown ())
    {
      // As defined by the CORBA 2.3 specification, throw a
      // CORBA::BAD_INV_ORDER exception with minor code 4 if the ORB
      // has shutdown by the time an ORB function is called.

      throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
    }
}

TAO_Client_Strategy_Factory * TAO_ORB_Core::client_factory ( void   ) 

Returns pointer to the client factory.

Definition at line 1820 of file ORB_Core.cpp.

{
  if (this->client_factory_ == 0)
    {
      // Look in the service repository for an instance.
      this->client_factory_ =
        ACE_Dynamic_Service<TAO_Client_Strategy_Factory>::instance
          (this->configuration (),
           ACE_TEXT ("Client_Strategy_Factory"));
    }

  return this->client_factory_;
}

TAO::ClientRequestInterceptor_Adapter * TAO_ORB_Core::clientrequestinterceptor_adapter ( void   ) 

Get the Client Request Interceptor adapter. Will not create a new one if not available yet.

Definition at line 610 of file ORB_Core.inl.

TAO::ClientRequestInterceptor_Adapter * TAO_ORB_Core::clientrequestinterceptor_adapter_i ( void   )  [protected]

Get the Client Request Interceptor adapter. If not created, this method will try to create one if needed.

Definition at line 3335 of file ORB_Core.cpp.

TAO_Codeset_Manager * TAO_ORB_Core::codeset_manager ( void   ) 

Get Code Set Manager.

Definition at line 429 of file ORB_Core.inl.

{
  if (this->orb_params()->negotiate_codesets() == 0)
    return 0;
  if (this->codeset_manager_ == 0)
    {
      // This causes a factory to be loaded which will call
      // the codeset_manager setter in this thread.
      this->codeset_manager_ =
        this->resource_factory()->codeset_manager();
      if (this->codeset_manager_ == 0)
        this->orb_params()->negotiate_codesets(false);
    }
  return this->codeset_manager_;
}

TAO_Collocation_Resolver & TAO_ORB_Core::collocation_resolver ( void   ) 

Returns a pointer to the Collocation Resolver.

Definition at line 1633 of file ORB_Core.cpp.

{
  // Check if there is a cached reference.
  if (this->collocation_resolver_ != 0)
    return *this->collocation_resolver_;

  // If not, lookup it up.
  this->collocation_resolver_ =
    ACE_Dynamic_Service<TAO_Collocation_Resolver>::instance
      (this->configuration (),
       ACE_TEXT_CHAR_TO_TCHAR (this->orb_params ()->collocation_resolver_name ()));

  return *this->collocation_resolver_;
}

TAO::Collocation_Strategy TAO_ORB_Core::collocation_strategy ( CORBA::Object_ptr  object  )  [static]

This method returns the right collocation strategy, if any, to be used to perform a method invocation on the given object.

Note:
No-Collocation is a special case of collocation.

Definition at line 3619 of file ORB_Core.cpp.

{
  TAO_Stub *stub = object->_stubobj ();
  if (!CORBA::is_nil (stub->servant_orb_var ().in ()) &&
      stub->servant_orb_var ()->orb_core () != 0)
    {
      TAO_ORB_Core *orb_core = stub->servant_orb_var ()->orb_core ();

      if (orb_core->collocation_resolver ().is_collocated (object))
        {
          switch (orb_core->get_collocation_strategy ())
            {
            case THRU_POA:
              return TAO::TAO_CS_THRU_POA_STRATEGY;

            case DIRECT:
              {
                /////////////////////////////////////////////////////////////
                // If the servant is null and you are collocated this means
                // that the POA policy NON-RETAIN is set, and with that policy
                // using the DIRECT collocation strategy is just insane.
                /////////////////////////////////////////////////////////////
                ACE_ASSERT (object->_servant () != 0);
                return TAO::TAO_CS_DIRECT_STRATEGY;
              }
            }
        }
    }

  // In this case the Object is a client.
  return TAO::TAO_CS_REMOTE_STRATEGY;
}

ACE_Service_Gestalt * TAO_ORB_Core::configuration ( void   )  const

Configuration accessor method.

Definition at line 11 of file ORB_Core.inl.

{
  return this->config_.get ();
}

void TAO_ORB_Core::connection_timeout ( TAO_Stub stub,
bool &  has_timeout,
ACE_Time_Value time_value 
)

Invoke the timeout hook if present.

The timeout hook is used to determine if the timeout policy is set and with what value. If the ORB is compiled without support for Messaging this feature does not take effect

Parameters:
has_timeout returns 0 if there is no timeout policy set.
time_value returns the timeout value in effect for the object, thread and current ORB.

Definition at line 3078 of file ORB_Core.cpp.

{
  Timeout_Hook connection_timeout_hook =
    TAO_ORB_Core_Static_Resources::instance ()->connection_timeout_hook_;

  if (connection_timeout_hook == 0)
    {
      has_timeout = false;
      return;
    }

  (*connection_timeout_hook) (this, stub, has_timeout, time_value);

  Timeout_Hook alt_connection_timeout_hook =
    TAO_ORB_Core_Static_Resources::instance ()->alt_connection_timeout_hook_;

  if (alt_connection_timeout_hook == 0)
    return;

  if (!has_timeout || time_value == ACE_Time_Value::zero )
    {
      (*alt_connection_timeout_hook) (this, stub, has_timeout,time_value);
      return;
    }

  // At this point, both the primary and alternate hooks are defined, and
  // the primary did indeed set a value
  ACE_Time_Value tv1;
  bool ht1;
  (*alt_connection_timeout_hook) (this, stub, ht1,tv1);
  if (ht1 && tv1 > ACE_Time_Value::zero && tv1 < time_value)
    time_value = tv1;
}

void TAO_ORB_Core::connection_timeout_hook ( Timeout_Hook  hook  )  [static]

Define the Timeout_Hook signature.

The connection timeout hook was originally defined to allow the TAO Messaging code to be factored out of the core TAO library and placed in to an optional library. Since then, a new invocation endpoint selector, the optimised connection endpoint selector (see Strategies/OC_Endpoint_Selector.h) reused this connection timeout hook. However, this set up a problem when both the Messaging library and OCES are being used in the same application.

The solution was to add a new connection timeout hook attribute (see alt_connection_timeout_hook_ below). This method now checks to see if the connection timeout hook is already set, and if so assigns the supplied hook value to the alternate connection timeout hook. This functionality has a side-effect of assuming that hooks are NEVER unloaded or actively replaced. IOW, no one will call this method with a 0 or some other pointer value to replace an existing hook.

If such functionality as unloading a hook pointer is required, then this method must be extended to give some kind of identity for the hook. Additional changes to the definition of the hook will also be necessary to support such identity and manipulation.

Definition at line 3115 of file ORB_Core.cpp.

{
  // Saving the hook pointer so that we can use it later when needed.
  // For now there are only two entry points that may supply a connection
  // timeout hook. But there might be future entry points, so this should
  // probably be addressed by a more sophisticated mechanism.

#define TOCSRi TAO_ORB_Core_Static_Resources::instance ()

  // A consern was raised that since this function is called by two
  // different initializers there may be a race condition that might
  // require a lock. We are not using a lock at this time because of
  // two callers, one happens only during service directive processing
  // and the other only during ORB Initialization time. The former
  // happens when the OC_Endpoint_Selector_Factory is loaded, the
  // latter is part of the messaging library. The messaging library
  // calls this function as part of pre_init processing, and this call
  // happes for every ORB instance. This was the case before these The
  // latter call occurs when the messaging library is loaded. The
  // redundant calls occured then as well. Second, it isn't clear how
  // a lock in this static method would react in the face of windows
  // dlls, shared memory segments, etc. Therefore we are continuing to
  // keep this code lockless as it always was, assuming no
  // simultanious overwrite will occur.

  if (TOCSRi->connection_timeout_hook_ == 0)
    {
      if (TAO_debug_level > 2)
        {
          ACE_DEBUG ((LM_DEBUG,
                      ACE_TEXT("TAO (%P|%t) - Setting primary connection ")
                      ACE_TEXT("timeout hook\n")));
        }
      TOCSRi->connection_timeout_hook_ = hook;
    }
  else if (TOCSRi->connection_timeout_hook_ != hook &&
           TOCSRi->alt_connection_timeout_hook_ == 0)
    {
      if (TAO_debug_level > 2)
        {
          ACE_DEBUG ((LM_DEBUG,
                      ACE_TEXT("TAO (%P|%t) - Setting alternate connection ")
                      ACE_TEXT("timeout hook\n")));
        }
      TOCSRi->alt_connection_timeout_hook_ = hook;
    }
  else
    if (TAO_debug_level > 2)
      {
        ACE_DEBUG ((LM_DEBUG,
                    ACE_TEXT ("TAO (%P|%t) - Not overwriting alternate ")
                    ACE_TEXT ("connection timeout hook. It is %@\n"),
                    TOCSRi->alt_connection_timeout_hook_));
      }

#undef TOCSRi
}

TAO_Connector_Registry * TAO_ORB_Core::connector_registry ( void   ) 

Get the connector registry.

Definition at line 2943 of file ORB_Core.cpp.

{
  TAO_Connector_Registry *conn =
    this->lane_resources ().connector_registry ();

  return conn;
}

ACE_Data_Block * TAO_ORB_Core::create_data_block_i ( size_t  size,
ACE_Allocator buffer_allocator,
ACE_Allocator dblock_allocator,
ACE_Lock lock 
) [protected]

Routine that creates a ACE_Data_Block given the lock and allocators.

Definition at line 2919 of file ORB_Core.cpp.

{
  ACE_Data_Block *nb = 0;

  ACE_NEW_MALLOC_RETURN (
                         nb,
                         static_cast<ACE_Data_Block*> (
                           dblock_allocator->malloc (sizeof (ACE_Data_Block))),
                         ACE_Data_Block (size,
                                         ACE_Message_Block::MB_DATA,
                                         0,
                                         buffer_allocator,
                                         lock_strategy,
                                         0,
                                         dblock_allocator),
                         0);

  return nb;
}

ACE_Data_Block * TAO_ORB_Core::create_input_cdr_data_block ( size_t  size  ) 

The Message Blocks used for input CDRs must have appropiate locking strategies.

Definition at line 2895 of file ORB_Core.cpp.

{

  ACE_Allocator *dblock_allocator = 0;
  ACE_Allocator *buffer_allocator = 0;

  dblock_allocator =
    this->input_cdr_dblock_allocator ();
  buffer_allocator =
    this->input_cdr_buffer_allocator ();

  ACE_Lock* lock_strategy = 0;
  if (this->resource_factory ()->use_locked_data_blocks ())
    {
      lock_strategy = &this->data_block_lock_;
    }

  return this->create_data_block_i (size,
                                    buffer_allocator,
                                    dblock_allocator,
                                    lock_strategy);
}

CORBA::Object_ptr TAO_ORB_Core::create_object ( TAO_Stub the_stub  ) 

Create a new object, use the adapter registry to create a collocated object, if not possible then create a regular object.

Definition at line 1994 of file ORB_Core.cpp.

{
  // @@ What about forwarding.  With this approach we are never forwarded
  //    when we use collocation!
  const TAO_MProfile &mprofile = stub->base_profiles ();

  // @@ We should thow CORBA::NO_MEMORY in platforms with exceptions,
  // but we are stuck in platforms without exceptions!
  TAO_ORB_Core_Auto_Ptr collocated_orb_core;
  CORBA::Object_ptr x = 0;

  {
    // Lock the ORB_Table against concurrent modification while we
    // iterate through the ORBs.
    ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
                      guard,
                      TAO::ORB_Table::instance()->lock (),
                      CORBA::Object::_nil ());

    TAO::ORB_Table * const table = TAO::ORB_Table::instance ();
    TAO::ORB_Table::iterator const end = table->end ();
    for (TAO::ORB_Table::iterator i = table->begin (); i != end; ++i)
      {
        ::TAO_ORB_Core * const other_core = (*i).second.core ();

        if (this->is_collocation_enabled (other_core, mprofile))
          {
            other_core->_incr_refcnt();
             TAO_ORB_Core_Auto_Ptr tmp_auto_ptr (other_core);
             collocated_orb_core = tmp_auto_ptr;
            break;
          }
      }
  }

  if (collocated_orb_core.get ())
    {
      x = collocated_orb_core.get ()->adapter_registry ().create_collocated_object (stub, mprofile);
    }


  if (!x)
    {
      // The constructor sets the proxy broker as the
      // Remote one.
      ACE_NEW_RETURN (x,
                      CORBA::Object (stub, 0),
                      0);
    }

  return x;
}

TAO_Stub * TAO_ORB_Core::create_stub ( const char *  repository_id,
const TAO_MProfile profiles 
)

Factory method that create the "right" Stub depending on wheather RTCORBA is loaded or not. The factory used to create the stub, is loaded at ORB initialization, and its type depends on the fact that RTCORBA is being used or not.

Definition at line 1919 of file ORB_Core.cpp.

{
  TAO_Stub *retval =
    this->stub_factory ()->create_stub (repository_id, profiles, this);
  return retval;
}

TAO_Stub * TAO_ORB_Core::create_stub_object ( TAO_MProfile mprofile,
const char *  type_id,
CORBA::PolicyList *  policy_list 
)

Makes sure that the ORB is open and then creates a TAO_Stub based on the endpoint.

Initialize a TAO_Stub object with the mprofile thats passed.

Definition at line 1937 of file ORB_Core.cpp.

{
  // Add the Polices contained in "policy_list" to each profile so
  // that those policies will be exposed to the client in the IOR.  In
  // particular each CORBA::Policy has to be converted in to
  // Messaging::PolicyValue, and then all the Messaging::PolicyValue
  // should be embedded inside a Messaging::PolicyValueSeq which
  // became in turns the "body" of the IOP::TaggedComponent. This
  // conversion is a responsability of the CORBA::Profile class.  (See
  // orbos\98-05-05.pdf Section 5.4)
  if (policy_list->length () != 0)
    {
      TAO_Profile * profile = 0;

      CORBA::ULong const count = mprofile.profile_count ();
      for (CORBA::ULong i = 0; i < count; ++i)
        {
          // Get the ith profile
          profile = mprofile.get_profile (i);
          profile->policies (policy_list);
        }
    }

  /// Initialize a TAO_Stub object with the mprofile thats passed.
  TAO_Stub *stub = this->create_stub (type_id, mprofile);

  stub->base_profiles ().policy_list (policy_list);

  return stub;
}

CORBA::Environment * TAO_ORB_Core::default_environment ( void   )  const

The thread has a default environment to simplify porting between platforms that support native C++ exceptions and those that don't. This is a TSS resource (always), but with a twist: if the user creates a new environment the old one is "pushed" (actually the new one remembers it), eventually the new environment destructor pops itself from the stack and we recover the old environment.

This means that if the user create a new environment and somebody calls a function using the default one the exception will still be received in the environment created by the user. The only drawback is that environments life time must nest properly, this shouldn't be a problem because environments are usually created on the stack, but, the spec allows their creation on the heap and/or as class members; we need to investigate the tradeoffs and take a decision.

Definition at line 3246 of file ORB_Core.cpp.

void TAO_ORB_Core::default_environment ( CORBA::Environment env  ) 

The thread has a default environment to simplify porting between platforms that support native C++ exceptions and those that don't. This is a TSS resource (always), but with a twist: if the user creates a new environment the old one is "pushed" (actually the new one remembers it), eventually the new environment destructor pops itself from the stack and we recover the old environment.

This means that if the user create a new environment and somebody calls a function using the default one the exception will still be received in the environment created by the user. The only drawback is that environments life time must nest properly, this shouldn't be a problem because environments are usually created on the stack, but, the spec allows their creation on the heap and/or as class members; we need to investigate the tradeoffs and take a decision.

Definition at line 3252 of file ORB_Core.cpp.

void TAO_ORB_Core::default_sync_scope_hook ( TAO_ORB_Core ,
TAO_Stub ,
bool &  has_synchronization,
Messaging::SyncScope scope 
) [static]

Default Sync_Scope_Hook.

Definition at line 2997 of file ORB_Core.cpp.

{
  has_synchronization = true;
  scope = Messaging::SYNC_WITH_TRANSPORT;
}

void TAO_ORB_Core::destroy ( void   ) 

Shutdown the ORB and free resources.

Definition at line 2350 of file ORB_Core.cpp.

{
  // All destroy() should do is (a) call shutdown() and (b) unbind()
  // from the ORB table.  Nothing else should really be added to this
  // method.  Everything else should go to the shutdown() method.
  // Remember when the ORB Core is finally removed from the ORB table,
  // the reference count goes to zero and fini() is called.  fini()
  // calls shutdown() and does not call destroy() since destroy() will
  // try to unbind from the ORB table again.  Additional code should
  // not be added to destroy() since there is no guarantee that
  // orb->destroy() will ever be called by the user.  Since TAO
  // guarantees that shutdown() will be called, all cleanup code
  // should go there.
  //

  // Shutdown the ORB and block until the shutdown is complete.
  this->shutdown (1);

  // Invoke Interceptor::destroy() on all registered interceptors.
  this->destroy_interceptors ();

  // Clean TSS resources. This cannot be done in shutdown() since the later
  // can be called during an upcall and once it's done it will remove
  // resources such as PICurrent that are required after the upcall. And this
  // cannot be postponed to TAO_ORB_Core's destructor as fini() needs access
  // to orb core and what is more important orb core can be destroyed too late
  // when some required libraries are already unloaded and we'll get
  // 'pure virtual method called' during cleanup.
  this->get_tss_resources ()->fini ();

  // Now remove it from the ORB table so that it's ORBid may be
  // reused.
  TAO::ORB_Table::instance ()->unbind (this->orbid_);
}

void TAO_ORB_Core::destroy_interceptors ( void   )  [protected]

Helper method that invokes Interceptor::destroy() on all registered interceptors when ORB::destroy() is called. Prevents exceptions from propagating up the call chain.

Definition at line 2399 of file ORB_Core.cpp.

{
  try
    {
      ACE_GUARD (TAO_SYNCH_MUTEX, monitor, this->lock_);

#if TAO_HAS_INTERCEPTORS == 1
      if (this->client_request_interceptor_adapter_ != 0)
        {
          this->client_request_interceptor_adapter_->destroy_interceptors ();

          delete this->client_request_interceptor_adapter_;
          this->client_request_interceptor_adapter_ = 0;
        }

      if (this->server_request_interceptor_adapter_ != 0)
        {
          this->server_request_interceptor_adapter_->destroy_interceptors ();

          delete this->server_request_interceptor_adapter_;
          this->server_request_interceptor_adapter_ = 0;
        }

#endif  /* TAO_HAS_INTERCEPTORS == 1 */

      if (this->ior_interceptor_adapter_ != 0)
        {
          this->ior_interceptor_adapter_->destroy_interceptors ();

          this->ior_interceptor_adapter_ = 0;
        }

    }
  catch (...)
    {
      // .. catch all the exceptions..
      if (TAO_debug_level > 3)
        {
          ACE_DEBUG ((LM_DEBUG,
                      ACE_TEXT ("TAO (%P|%t) - Exception in TAO_ORB_Core")
                      ACE_TEXT ("::destroy_interceptors ()\n")));
        }
    }

  return;
}

void TAO_ORB_Core::dynamic_adapter_name ( const char *  name  )  [static]

Sets the value of TAO_ORB_Core::dynamic_adapter_name_.

Definition at line 1523 of file ORB_Core.cpp.

const char * TAO_ORB_Core::dynamic_adapter_name ( void   )  [static]

Gets the value of TAO_ORB_Core::dynamic_adapter_name_.

Definition at line 1529 of file ORB_Core.cpp.

TAO_Endpoint_Selector_Factory * TAO_ORB_Core::endpoint_selector_factory ( void   ) 

Returns a pointer to the endpoint selector factory.

Definition at line 1746 of file ORB_Core.cpp.

{
  // Check if there is a cached reference.
  if (this->endpoint_selector_factory_ != 0)
    return this->endpoint_selector_factory_;

  // If not, look in the service repository for an instance.
  const char* endpoint_selector_factory_name =
    this->orb_params ()->endpoint_selector_factory_name ();

  this->endpoint_selector_factory_ =
    ACE_Dynamic_Service<TAO_Endpoint_Selector_Factory>::instance
      (this->configuration (),
       ACE_TEXT_CHAR_TO_TCHAR (endpoint_selector_factory_name));

  return this->endpoint_selector_factory_;
}

TAO_Fault_Tolerance_Service & TAO_ORB_Core::fault_tolerance_service ( void   ) 

Return a reference to the Fault Tolerant service object.

Definition at line 148 of file ORB_Core.inl.

{
  return this->ft_service_;
}

int TAO_ORB_Core::fini ( void   )  [protected]

Final termination hook, typically called by CORBA::ORB's destructor.

Definition at line 1438 of file ORB_Core.cpp.

{
  try
    {
      // Shutdown the ORB and block until the shutdown is complete.
      this->shutdown (1);
    }
  catch (const ::CORBA::Exception& ex)
    {
      ACE_CString message =
        "Exception caught in trying to shutdown ";
      message += this->orbid_;
      message += "\n";

      ex._tao_print_exception (message.c_str ());
    }

  // Wait for any server threads, ignoring any failures.
  (void) this->thr_mgr ()->wait ();

  ::CORBA::release (this->typecode_factory_);

  ::CORBA::release (this->codec_factory_);

  ::CORBA::release (this->dynany_factory_);

  ::CORBA::release (this->ior_manip_factory_);

  ::CORBA::release (this->ior_table_);

  ::CORBA::release (this->monitor_);

  if (TAO_debug_level > 2)
    {
      ACE_DEBUG ((LM_DEBUG,
                  ACE_TEXT ("TAO (%P|%t) - Destroying ORB <%C>\n"),
                  this->orbid_));
    }

  // Finalize lane resources.
  //
  // @@ Do not call this->thread_lane_resources_manager().finalize().
  // this->thread_lane_manager_resources() can seg fault if the
  // factory method it invokes returns a zero pointer, which can
  // easily occur if the ORB is partially initialized due to a Service
  // Configurator initialization failure.  Instead check if the
  // cached pointer is non-zero and then finalize.
  //
  // @todo Fix potential seg fault in
  //       TAO_ORB_Core::thread_lane_resources_manager().
  if (this->thread_lane_resources_manager_ != 0)
    this->thread_lane_resources_manager_->finalize ();

  // Destroy the object_key table
  this->object_key_table_.destroy ();

  delete this;

  return 0;
}

TAO_Flushing_Strategy * TAO_ORB_Core::flushing_strategy ( void   ) 

Return the flushing strategy.

The flushing strategy is created by the resource factory, and it is used by the ORB to control the mechanism used to flush the outgoing data queues. The flushing strategies are stateless, therefore, there is only one per ORB.

Definition at line 73 of file ORB_Core.inl.

{
  return this->flushing_strategy_;
}

auto_ptr< TAO_GIOP_Fragmentation_Strategy > TAO_ORB_Core::fragmentation_strategy ( TAO_Transport transport  ) 

Get outgoing fragmentation strategy.

Definition at line 2952 of file ORB_Core.cpp.

{
  return
    this->resource_factory ()->create_fragmentation_strategy (
      transport,
      this->orb_params_.max_message_size ());
}

CORBA::Boolean TAO_ORB_Core::ft_send_extended_sc ( void   ) 

Transmit the entire TAG_FT_GROUP component data from a server IOGR as a FT_GROUP_VERSION tagged service context on requests to that IOGR instead of just the group version.

Definition at line 154 of file ORB_Core.inl.

{
  return this->ft_send_extended_sc_;
}

CORBA::Policy_ptr TAO_ORB_Core::get_cached_policy ( TAO_Cached_Policy_Type  type  ) 

Get a cached policy. First, check the ORB-level Policy Manager, then check the ORB defaults.

Definition at line 3210 of file ORB_Core.cpp.

{
  CORBA::Policy_var result;

  TAO_Policy_Manager *policy_manager = this->policy_manager ();
  if (policy_manager != 0)
    {
      result = policy_manager->get_cached_policy (type);
    }

  if (CORBA::is_nil (result.in ()))
    {
      result = this->get_default_policies ()->get_cached_policy (type);
    }

  return result._retn ();
}

CORBA::Policy_ptr TAO_ORB_Core::get_cached_policy_including_current ( TAO_Cached_Policy_Type  type  ) 

Get a cached policy. First, check the thread current, then check the ORB-level Policy Manager, then check the ORB defaults.

Definition at line 3229 of file ORB_Core.cpp.

{
  TAO_Policy_Current &policy_current = this->policy_current ();

  CORBA::Policy_var result = policy_current.get_cached_policy (type);

  if (CORBA::is_nil (result.in ()))
    {
      result = this->get_cached_policy (type);
    }

  return result._retn ();
}

CORBA::ULong TAO_ORB_Core::get_collocation_strategy ( void   )  const

Set/get the collocation flags.

Definition at line 228 of file ORB_Core.inl.

{
  return this->collocation_strategy_;
}

TAO_Policy_Set * TAO_ORB_Core::get_default_policies ( void   ) 

Accessor method for the default_policies_.

Definition at line 562 of file ORB_Core.inl.

{
  return this->default_policies_;
}

TAO_Network_Priority_Protocols_Hooks * TAO_ORB_Core::get_network_priority_protocols_hooks ( void   ) 

Gets the value of TAO_ORB_Core::network_priority_protocols_hooks__.

Definition at line 85 of file ORB_Core.inl.

CORBA::Policy_ptr TAO_ORB_Core::get_policy ( CORBA::PolicyType  type  ) 

Get a policy. First, check the ORB-level Policy Manager, then check the ORB defaults.

Definition at line 3176 of file ORB_Core.cpp.

{
  CORBA::Policy_var result;

  TAO_Policy_Manager *policy_manager = this->policy_manager ();
  if (policy_manager != 0)
    {
      result = policy_manager->get_policy (type);
    }

  if (CORBA::is_nil (result.in ()))
    {
      result = this->get_default_policies ()->get_policy (type);
    }

  return result._retn ();
}

CORBA::Policy_ptr TAO_ORB_Core::get_policy_including_current ( CORBA::PolicyType  type  ) 

Get a policy. First, check the thread current, then check the ORB-level Policy Manager, then check the ORB defaults.

Definition at line 3195 of file ORB_Core.cpp.

{
  TAO_Policy_Current &policy_current = this->policy_current ();

  CORBA::Policy_var result = policy_current.get_policy (type);

  if (CORBA::is_nil (result.in ()))
    {
      result = this->get_policy (type);
    }

  return result._retn ();
}

TAO_Protocols_Hooks * TAO_ORB_Core::get_protocols_hooks ( void   ) 

Gets the value of TAO_ORB_Core::protocols_hooks__.

Definition at line 79 of file ORB_Core.inl.

{
  return this->protocols_hooks_;
}

TAO::Transport_Queueing_Strategy * TAO_ORB_Core::get_transport_queueing_strategy ( TAO_Stub stub,
Messaging::SyncScope scope 
)

Definition at line 3025 of file ORB_Core.cpp.

{
  switch (scope)
  {
    case Messaging::SYNC_WITH_TRANSPORT:
    case Messaging::SYNC_WITH_SERVER:
    case Messaging::SYNC_WITH_TARGET:
    {
      return this->flush_transport_queueing_strategy_;
    }
    break;
    case Messaging::SYNC_NONE:
    {
      return this->eager_transport_queueing_strategy_;
    }
    break;
    case TAO::SYNC_DELAYED_BUFFERING:
    {
      return this->delayed_transport_queueing_strategy_;
    }
    break;
    default:
    {
      return 0;
    }
  }
}

void * TAO_ORB_Core::get_tss_resource ( size_t  slot_id  ) 

Obtain the TSS resource in the given slot.

Definition at line 275 of file ORB_Core.inl.

{
  TAO_ORB_Core_TSS_Resources *tss_resources =
    this->get_tss_resources ();

  if (slot_id >= tss_resources->ts_objects_.size ())
    return 0;

  return tss_resources->ts_objects_[slot_id];
}

TAO_ORB_Core_TSS_Resources * TAO_ORB_Core::get_tss_resources ( void   ) 

Obtain the TSS resources of this orb.

Definition at line 269 of file ORB_Core.inl.

{
  return ACE_TSS_GET (&this->tss_resources_,TAO_ORB_Core_TSS_Resources);
}

TAO::GUIResource_Factory * TAO_ORB_Core::gui_resource_factory ( void   ) 

Returns pointer to the factory for creating gui resources.

Definition at line 1604 of file ORB_Core.cpp.

bool TAO_ORB_Core::has_shutdown ( void   )  const

Get the shutdown flag value.

Definition at line 334 of file ORB_Core.inl.

{
  return this->has_shutdown_;
}

CORBA::ULong TAO_ORB_Core::hash_service ( TAO_Profile this_p,
CORBA::ULong  max 
)

Hook for the services to determine the <hash> value of a profile. For details on how this is used please see the FT service

Definition at line 137 of file ORB_Core.inl.

{
  if (this->ft_service_.service_callback ())
    {
      return this->ft_service_.service_callback ()->hash_ft (p, m);
    }

  return 0;
}

void TAO_ORB_Core::ifr_client_adapter_name ( const char *  name  )  [static]

Sets the value of TAO_ORB_Core::ifr_client_adapter_name_.

Definition at line 1535 of file ORB_Core.cpp.

const char * TAO_ORB_Core::ifr_client_adapter_name ( void   )  [static]

Gets the value of TAO_ORB_Core::ifr_client_adapter_name_.

Definition at line 1541 of file ORB_Core.cpp.

CORBA::Object_ptr TAO_ORB_Core::implrepo_service ( void   ) 

Set/Get the IOR of the Implementation Repository service.

Definition at line 2967 of file ORB_Core.cpp.

{
  if (!this->use_implrepo_)
    return CORBA::Object::_nil ();

  if (CORBA::is_nil (this->implrepo_service_))
    {

      try
        {
          CORBA::Object_var temp =
            this->orb_->resolve_initial_references ("ImplRepoService");

          ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, CORBA::Object::_nil ());

          // @@ Worry about assigning a different IOR? (brunsch)
          this->implrepo_service_ = temp._retn ();
        }
      catch (const ::CORBA::Exception&)
        {
          // Just make sure that we have a null pointer.  Ignore the exception
          // anyway.
          this->implrepo_service_ = CORBA::Object::_nil ();
        }
    }

  return CORBA::Object::_duplicate (this->implrepo_service_);
}

void TAO_ORB_Core::implrepo_service ( const CORBA::Object_ptr  ir  ) 

Set/Get the IOR of the Implementation Repository service.

Definition at line 353 of file ORB_Core.inl.

{
  this->implrepo_service_ = ir;
}

CORBA::Boolean TAO_ORB_Core::imr_endpoints_in_ior ( void   ) 

Do we put the ImR's endpoints into persistent object references we create.

Definition at line 365 of file ORB_Core.inl.

int TAO_ORB_Core::init ( int &  argc,
char *  argv[] 
) [protected]

Initialize the guts of the ORB Core. It is intended that this be called by <CORBA::ORB_init>.

Definition at line 343 of file ORB_Core.cpp.

{
  // Right now, this code expects to begin parsing in argv[1] rather
  // than argv[0].  I don't think that's wise.  I think we need to
  // change that convention to argv[0] and let the initializing code
  // make any necessary shifts.
  //
  // Parse arguments to the ORB.  Typically the ORB is passed
  // arguments straight from the command line, so we will simply pass
  // through them and respond to the ones we understand and ignore
  // those we don't.
  //
  // In some instances, we may actually build another vector of
  // arguments and stash it for use initializing other components such
  // as the RootPOA.

  bool use_ior = true;
  int cdr_tradeoff = ACE_DEFAULT_CDR_MEMCPY_TRADEOFF;

  // The following things should be changed to use the ACE_Env_Value<>
  // template sometime.

  // Name Service port use for Multicast
  unsigned short ns_port = 0;

  // Trading Service port used for Multicast
  unsigned short ts_port = 0;

  // Implementation Repository Service port #.
  unsigned short ir_port = 0;

  // Buffer sizes for kernel socket buffers
  // @@ should be a default defined for each protocol implementation?
  //    since we may have protocols loaded which use shared memory of
  //    some form, fredk
  int rcv_sock_size = -1;
  int snd_sock_size = -1;

  // Use TCP_NODELAY.
  int nodelay = 1;

  // Use SO_KEEPALIVE (default 0).
  int so_keepalive = 0;

  // Use SO_DONTROUTE (default 0)
  int so_dontroute = 0;

  // Number of hops for a datagram sent through socket.
  int ip_hoplimit = -1;

  // Use IP_MILTICAST_LOOP (default 1).
  int ip_multicastloop = 1;

  // Use dotted decimal addresses
  // @@ This option will be treated as a suggestion to each loaded
  //    protocol to use a character representation for the numeric
  //    address, otherwise use a logical name. fredk
#if (TAO_USE_DOTTED_DECIMAL_ADDRESSES == 1)
  int dotted_decimal_addresses = 1;
#else
  int dotted_decimal_addresses = 0;
#endif /* TAO_USE_DOTTED_DECIMAL_ADDRESSES */

  // Disable looking up the host name for incoming connections.
  int no_server_side_name_lookups = 0;

#if defined (TAO_STD_PROFILE_COMPONENTS)
  bool std_profile_components = true;
#else
  bool std_profile_components = false;
#endif /* TAO_STD_PROFILE_COMPONENTS */

  int linger = TAO_SO_LINGER;
  time_t accept_error_delay = TAO_ACCEPT_ERROR_DELAY;
  bool use_parallel_connects = TAO_USE_PARALLEL_CONNECT;

  // Copy command line parameter not to use original.
  ACE_Argv_Type_Converter command_line (argc, argv);

  ACE_Arg_Shifter arg_shifter (command_line.get_argc (),
                               command_line.get_TCHAR_argv ());

  ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
                    monitor,
                    this->lock_,
                    -1);

#if (TAO_NEGOTIATE_CODESETS == 1)
  bool negotiate_codesets = true;
#else
  bool negotiate_codesets = false;
#endif /* TAO_NEGOTIATE_CODESETS */

  // Pick up the value of the use_implrepo_ flag from an environment variable
  // called "TAO_USE_IMR". Do it here so that it can be overridden by
  // the "-ORBUseIMR" command line argument.
  //
  char* const use_IMR_env_var_value = ACE_OS::getenv  ("TAO_USE_IMR") ;
  if  (use_IMR_env_var_value != 0)
    {
      this->use_implrepo_ = ACE_OS::atoi  (use_IMR_env_var_value) ;
    }


  while (arg_shifter.is_anything_left ())
    {
      const ACE_TCHAR *current_arg = 0;

      ////////////////////////////////////////////////////////////////
      // begin with the 'parameterless' flags                       //
      ////////////////////////////////////////////////////////////////
      if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBDottedDecimalAddresses"))))
        {
          // Use dotted decimal addresses
          // @@ this should be renamed.  See above comment. fredk
          dotted_decimal_addresses =
            ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBNoServerSideNameLookups"))))
        {
          // Don't look up the host name for incoming connections
          no_server_side_name_lookups =
            ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBNameServicePort"))))
        {
          // Specify the port number for the NameService.
          // Unrelated to ORB Protocols, this is used for multicast.

          ns_port = static_cast <CORBA::UShort> (ACE_OS::atoi (current_arg));

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBMulticastDiscoveryEndpoint"))))
        {
          // Specify mcast address:port@network_interface for the
          // Naming Service Multicast Discovery Protocol.
          // If there is no colon, its only the port no.
          // If there is a '@' also, it means that the network
          // interface name is specified.
          this->orb_params ()->mcast_discovery_endpoint (
            ACE_TEXT_ALWAYS_CHAR(current_arg));

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBNodelay"))))
        {
          // Use TCP_NODELAY or not.
          nodelay =
            ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBKeepalive"))))
        {
          // Use SO_KEEPALIVE or not.
          so_keepalive =
            ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBDontRoute"))))
        {
          // Use SO_DONTROUTE or not.
          so_dontroute =
            ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBIPHopLimit"))))
        {
          // Number of IP hops.
          ip_hoplimit =
            ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBIPMulticastLoop"))))
        {
          // Use IP_MULTICAST_LOOP or not.
          ip_multicastloop =
            ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBTradingServicePort"))))
        {
          // Specify the port number for the TradingService.

          ts_port = static_cast <CORBA::UShort> (ACE_OS::atoi (current_arg));

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBImplRepoServicePort"))))
        {
          // Specify the multicast port number for the Implementation
          // Repository.
          ir_port = static_cast <CORBA::UShort> (ACE_OS::atoi (current_arg));

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBRcvSock"))))
        {
          // @@ All protocol implementation may not use sockets, so
          //    this can either be a generic I/O Buffer size or
          //    Buffer info can be a per protocol specification, fredk

          // Specify the size of the socket's receive buffer

          rcv_sock_size = ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBSndSock"))))
        {
          // @@ All protocol implementation may not use sockets, so
          //    this can either be a generic I/O Buffer size or
          //    Buffer info can be a per protocol specification, fredk

          // Specify the size of the socket's send buffer
          snd_sock_size = ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBObjRefStyle"))))
        {
          // Specifies the style of printed objrefs: URL or IOR
          //
          // BEGIN COMMENTS FROM IIOP-1.4 On Win32, we should be
          // collecting information from the Registry such as what
          // ORBs are configured, specific configuration details like
          // whether they generate IOR or URL style stringified
          // objrefs and which addresses they listen to (e.g. allowing
          // multihomed hosts to implement firewalls), user-meaningful
          // orb names (they will normally indicate domains), and
          // more.
          //
          // On UNIX, we should collect that from some private config
          // file.
          //
          // Instead, this just treats the "internet" ORB name
          // specially and makes it always use URL-style stringified
          // objrefs, where the hostname and TCP port number are
          // explicit (and the whole objref is readable by mortals).
          // BEGIN COMMENTS FROM IIOP-1.4
          const ACE_TCHAR *opt = current_arg;
          if (ACE_OS::strcasecmp (opt, ACE_TEXT("URL")) == 0)
            use_ior = false;
          else if (ACE_OS::strcasecmp (opt, ACE_TEXT("IOR")) == 0)
            use_ior = true;

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBCollocationStrategy"))))
        {
          // Specify which collocation policy we want to use.
          const ACE_TCHAR *opt = current_arg;
          if (ACE_OS::strcasecmp (opt, ACE_TEXT("thru_poa")) == 0)
            this->collocation_strategy_ = THRU_POA;
          else if (ACE_OS::strcasecmp (opt, ACE_TEXT("direct")) == 0)
            this->collocation_strategy_ = DIRECT;

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBCollocation"))))
        {
          // Specify whether we want to optimize against collocation
          // objects.  Valid arguments are: "global", "no", and "per-orb".
          // Default is global.

          const ACE_TCHAR *opt = current_arg;
          if (ACE_OS::strcasecmp (opt, ACE_TEXT("global")) == 0)
            {
              this->opt_for_collocation_ = true;
              this->use_global_collocation_ = true;
            }
          else if (ACE_OS::strcasecmp (opt, ACE_TEXT("NO")) == 0)
            {
              this->opt_for_collocation_ = false;
              this->use_global_collocation_ = false;
            }
          else if (ACE_OS::strcasecmp (opt, ACE_TEXT("per-orb")) == 0)
            {
              this->opt_for_collocation_ = true;
              this->use_global_collocation_ = false;
            }
          else
            {
              ACE_DEBUG ((LM_WARNING,
                          ACE_TEXT ("WARNING: Unknown option to ")
                          ACE_TEXT ("'-ORBCollocation': %s\n"), opt));
            }

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBPreferredInterfaces"))))
        {
          if (this->orb_params ()->preferred_interfaces (
                ACE_TEXT_ALWAYS_CHAR (current_arg)) == false)
            throw ::CORBA::INTERNAL (
              CORBA::SystemException::_tao_minor_code (
                TAO_ORB_CORE_INIT_LOCATION_CODE,
                0),
              CORBA::COMPLETED_NO);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBEnforcePreferredInterfaces"))))
        {
          int enforce_pref_interfaces = ACE_OS::atoi (current_arg);
          if (enforce_pref_interfaces)
            this->orb_params ()->enforce_pref_interfaces (false);
          else
            this->orb_params ()->enforce_pref_interfaces (true);

          arg_shifter.consume_arg ();
        }
#if defined (ACE_HAS_IPV6)
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBPreferIPV6Interfaces"))))
        {
          int prefer_ipv6_interfaces = ACE_OS::atoi (current_arg);
          if (prefer_ipv6_interfaces)
            this->orb_params ()->prefer_ipv6_interfaces (true);
          else
            this->orb_params ()->prefer_ipv6_interfaces (false);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBConnectIPV6Only"))))
        {
          int connect_ipv6_only = ACE_OS::atoi (current_arg);
          if (connect_ipv6_only)
            this->orb_params ()->connect_ipv6_only (true);
          else
            this->orb_params ()->connect_ipv6_only (false);

          arg_shifter.consume_arg ();
        }
      else if ((current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBUseIPV6LinkLocal"))))
        {
          int use_ipv6_link_local = ACE_OS::atoi (current_arg);
          if (use_ipv6_link_local)
            this->orb_params ()->use_ipv6_link_local (true);
          else
            this->orb_params ()->use_ipv6_link_local (false);

          arg_shifter.consume_arg ();
        }
#endif /* ACE_HAS_IPV6 */
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBCDRTradeoff"))))
        {
          cdr_tradeoff = ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }

      // A new <ObjectID>:<IOR> mapping has been specified. This will be
      // used by the resolve_initial_references ().

      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBInitRef"))))
        {
          const ACE_TCHAR *pos = ACE_OS::strchr (current_arg, '=');
          if (pos == 0)
            {
              ACE_ERROR ((LM_ERROR,
                          ACE_TEXT ("Invalid ORBInitRef argument '%s'")
                          ACE_TEXT ("format is ObjectID=IOR\n"),
                          current_arg));
              throw ::CORBA::INTERNAL (
                CORBA::SystemException::_tao_minor_code (
                  TAO_ORB_CORE_INIT_LOCATION_CODE,
                  0),
                CORBA::COMPLETED_NO);
            }
          ACE_CString object_id (ACE_TEXT_ALWAYS_CHAR(current_arg),
                                 pos - current_arg);
          ACE_CString IOR (ACE_TEXT_ALWAYS_CHAR(pos + 1));
          if (!this->init_ref_map_.insert (
                 std::make_pair (InitRefMap::key_type (object_id),
                                 InitRefMap::data_type (IOR))).second)
            {
              ACE_ERROR ((LM_ERROR,
                          ACE_TEXT ("Duplicate -ORBInitRef ")
                          ACE_TEXT ("argument '%s'\n"),
                          current_arg));
              throw ::CORBA::INTERNAL (
                CORBA::SystemException::_tao_minor_code (
                  TAO_ORB_CORE_INIT_LOCATION_CODE,
                  0),
                CORBA::COMPLETED_NO);
            }
          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBDefaultInitRef"))))
        {
          // Set the list of prefixes from -ORBDefaultInitRef.
          this->orb_params ()->default_init_ref
            (ACE_TEXT_ALWAYS_CHAR(current_arg));

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBStdProfileComponents"))))
        {
          std_profile_components =
            ACE_OS::atoi (current_arg);
          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBAMICollocation"))))
        {
          int ami_collocation = ACE_OS::atoi (current_arg);
          if (ami_collocation)
            this->orb_params ()->ami_collication (true);
          else
            this->orb_params ()->ami_collication (false);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBResources"))))
        {
          ACE_DEBUG ((LM_WARNING,
                      ACE_TEXT ("\"-ORBResources\" has been ")
                      ACE_TEXT ("deprecated.\n")));

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBLogFile"))))
        {
          // redirect all ACE_DEBUG and ACE_ERROR output to a file
          // USAGE: -ORBLogFile <file>
          // default: if <file> is present     = append
          //          if <file> is not present = create

          const ACE_TCHAR *file_name = current_arg;
          arg_shifter.consume_arg ();

          // would rather use ACE_OSTREAM_TYPE out here..
          // but need ACE_FSTREAM_TYPE to call ->open(...)
          // and haven't found such a macro to rep FILE* and/or fstream*

#if defined (ACE_LACKS_IOSTREAM_TOTALLY)

          FILE* output_stream = ACE_OS::fopen (file_name, ACE_TEXT ("a"));

          ACE_LOG_MSG->msg_ostream (output_stream, 1);

#else /* ! ACE_LACKS_IOSTREAM_TOTALLY */

          ofstream* output_stream = 0;

          //
          // note: we are allocating dynamic memory here....but
          // I assume it will persist for the life of the program
          //

          ACE_NEW_THROW_EX (output_stream,
                            ofstream (),
                            CORBA::NO_MEMORY (
                              CORBA::SystemException::_tao_minor_code (
                                TAO_ORB_CORE_INIT_LOCATION_CODE,
                                ENOMEM),
                              CORBA::COMPLETED_NO));

          output_stream->open (ACE_TEXT_ALWAYS_CHAR (file_name),
                               ios::out | ios::app);

          if (!output_stream->bad ())
            {
              ACE_LOG_MSG->msg_ostream (output_stream, 1);
            }

#endif /* ACE_LACKS_IOSTREAM_TOTALLY */

          ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER);
          ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM);
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBVerboseLogging"))))
        {
          unsigned long const verbose_logging = ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();

          typedef void (ACE_Log_Msg::*PTMF)(u_long);
          PTMF flagop = &ACE_Log_Msg::set_flags;
          u_long value;

          switch (verbose_logging)
            {
            case 0:
              flagop = &ACE_Log_Msg::clr_flags;
              value = ACE_Log_Msg::VERBOSE | ACE_Log_Msg::VERBOSE_LITE;
              break;
            case 1:
              value = ACE_Log_Msg::VERBOSE_LITE; break;
            default:
              value = ACE_Log_Msg::VERBOSE; break;
            }

          (ACE_LOG_MSG->*flagop)(value);
        }
      else if ((current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBHandleLoggingStrategyEvents"))))
        {
          ACE_Logging_Strategy *logging_strategy =
            dynamic_cast<ACE_Logging_Strategy*> (
              ACE_Dynamic_Service<ACE_Service_Object>::instance (current_arg));

          if (logging_strategy != 0)
            {
              logging_strategy->reactor (this->reactor ());
            }

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBUseIMR"))))
        {
          // Use IR or not.
          this->use_implrepo_ = ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBIMREndpointsInIOR"))))
        {
          this->imr_endpoints_in_ior_ = ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBid"))))
        {
          // The ORBid is actually set in ORB_init(), and then passed
          // to the TAO_ORB_Core() constructor.  However, in the case
          // where the ORBid third argument to ORB_init() is not zero,
          // any "-ORBid" arguments in the argv argument list are
          // supposed to be ignored, according to the CORBA spec.  As
          // such, "-ORBid" must be removed from the argument list
          // since ORB_init() must remove all "-ORB" option
          // arguments.

          // We obtain a lock on the ORB table when setting the
          // ORBid.  For this reason we should *not* set the ORBid
          // here.  CORBA::ORB_init() does all of the proper locking
          // and setting.

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBServerId"))))
        {
          // The this->server_id_ is to uniquely identify a server to
          // an IMR.
          // Fill in later.
          this->server_id_.set(ACE_TEXT_ALWAYS_CHAR(current_arg));

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
               (ACE_TEXT("-ORBLingerTimeout"))))
        {
          linger = ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
               (ACE_TEXT("-ORBAcceptErrorDelay"))))
        {
          accept_error_delay = ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBEndpoint"))))
        {
          // Each "endpoint" is of the form:
          //
          //   protocol://V.v@addr1,addr2,...,addrN
          //
          // or:
          //
          //   protocol://addr1,addr2,...,addrN
          //
          // where "V.v" is an optional protocol version for each
          // addr.  All endpoint strings should be of the above
          // form(s).
          //
          // Multiple sets of endpoint may be seperated by a semi-colon `;'.
          // For example:
          //
          //   corbaloc:space:2001,1.2@odyssey:2010;uiop://foo,bar
          //
          // All endpoint strings should be of the above form(s).

          this->set_endpoint_helper (TAO_DEFAULT_LANE,
                                     ACE_TEXT_ALWAYS_CHAR (current_arg));

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBListenEndpoints"))))
        {
          // This option is similar to the -ORBEndPoint option. May be
          // ORBEndpoint option will be deprecated in future. But, for
          // now, I (Priyanka) am leaving so that both options can be
          // used.

          this->set_endpoint_helper (TAO_DEFAULT_LANE,
                                     ACE_TEXT_ALWAYS_CHAR (current_arg));

          arg_shifter.consume_arg ();
        }
      else if ((0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBLaneEndpoint")))) ||
               (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBLaneListenEndpoints")))))
        {
          // This option is similar to the -ORBEndPoint option but
          // specifies endpoints for each lane.

          if (arg_shifter.is_option_next ())
            return -1;

          ACE_CString lane (ACE_TEXT_ALWAYS_CHAR (current_arg));
          arg_shifter.consume_arg ();

          if (arg_shifter.is_option_next ())
            return -1;

          ACE_CString endpoints (ACE_TEXT_ALWAYS_CHAR
                                  (arg_shifter.get_current ()));
          arg_shifter.consume_arg ();

          this->set_endpoint_helper (lane, endpoints);
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBNoProprietaryActivation"))))
        {
          // This option can be used to set to not use any proprietary
          // activation framework. The only TAO proprietary activation
          // framework is IMR. So, by setting this option in TAO, the
          // IMR shouldnt be used .. even if the ORBUseIMR option is
          // set.
          // Fill in later
          // @@ To do later: Priyanka.

          throw ::CORBA::NO_IMPLEMENT ();
        }
       else if (0 != (current_arg = arg_shifter.get_the_parameter
                 (ACE_TEXT("-ORBUseSharedProfile"))))
         {
           this->orb_params ()->shared_profile (ACE_OS::atoi (current_arg));

           arg_shifter.consume_arg ();
         }
       else if (0 != (current_arg = arg_shifter.get_the_parameter
                 (ACE_TEXT("-ORBNegotiateCodesets"))))
         {
           negotiate_codesets = (ACE_OS::atoi (current_arg));

           arg_shifter.consume_arg ();
         }
       else if (0 != (current_arg = arg_shifter.get_the_parameter
                 (ACE_TEXT("-ORBUseParallelConnects"))))
         {
           use_parallel_connects = ACE_OS::atoi (current_arg);
           arg_shifter.consume_arg ();
         }
       else if (0 != (current_arg = arg_shifter.get_the_parameter
                 (ACE_TEXT("-ORBParallelConnectDelay"))))
         {
           this->orb_params ()->parallel_connect_delay
             (ACE_OS::atoi (current_arg));
           arg_shifter.consume_arg ();
         }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBSingleReadOptimization"))))
        {
          this->orb_params ()->single_read_optimization
            (ACE_OS::atoi (current_arg));

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBDisableRTCollocation"))))
        {
          int disable_rt_collocation = ACE_OS::atoi (current_arg);
          if (disable_rt_collocation)
            this->orb_params ()->disable_rt_collocation_resolver (true);
          else
            this->orb_params ()->disable_rt_collocation_resolver (false);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBUseLocalMemoryPool"))))
        {
          this->use_local_memory_pool_ = (0 != ACE_OS::atoi (current_arg));

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBMaxMessageSize"))))
        {
          this->orb_params_.max_message_size (ACE_OS::atoi (current_arg));

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBFTSendFullGroupTC"))))
        {
          this->ft_send_extended_sc_ = ACE_OS::atoi (current_arg);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBForwardInvocationOnObjectNotExist"))))
        {
          int forward = ACE_OS::atoi (current_arg);
          if (forward)
            this->orb_params_.forward_invocation_on_object_not_exist (true);
          else
            this->orb_params_.forward_invocation_on_object_not_exist (false);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBForwardOnceOnObjectNotExist"))))
        {
          int forward = ACE_OS::atoi (current_arg);
          if (forward)
            this->orb_params_.forward_once_exception (TAO::FOE_OBJECT_NOT_EXIST);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBForwardOnceOnCommFailure"))))
        {
          int forward = ACE_OS::atoi (current_arg);
          if (forward)
            this->orb_params_.forward_once_exception (TAO::FOE_COMM_FAILURE);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBForwardOnceOnTransient"))))
        {
          int forward = ACE_OS::atoi (current_arg);
          if (forward)
            this->orb_params_.forward_once_exception (TAO::FOE_TRANSIENT);

          arg_shifter.consume_arg ();
        }
      else if (0 != (current_arg = arg_shifter.get_the_parameter
                (ACE_TEXT("-ORBForwardOnceOnInvObjref"))))
        {
          int forward = ACE_OS::atoi (current_arg);
          if (forward)
            this->orb_params_.forward_once_exception (TAO::FOE_INV_OBJREF);

          arg_shifter.consume_arg ();
        }

      ////////////////////////////////////////////////////////////////
      // catch any unknown -ORB args                                //
      ////////////////////////////////////////////////////////////////
      else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-ORB")) != -1)
        {
          if (TAO_debug_level > 0)
            {
              current_arg = arg_shifter.get_current ();
              ACE_ERROR ((LM_ERROR,
                          ACE_TEXT ("ERROR: Unknown \"-ORB\" option ")
                          ACE_TEXT ("<%s>.\n"),
                          ((current_arg == 0) ? ACE_TEXT("<NULL>")
                                              : current_arg)));
            }

          throw ::CORBA::BAD_PARAM (
            CORBA::SystemException::_tao_minor_code (
              TAO_ORB_CORE_INIT_LOCATION_CODE,
              EINVAL),
            CORBA::COMPLETED_NO);
        }

      ////////////////////////////////////////////////////////////////
      // ok, we can't interpret this argument, move to next argument//
      ////////////////////////////////////////////////////////////////
      else
        {
          // Any arguments that don't match are ignored so that the
          // caller can still use them.
          arg_shifter.ignore_arg ();
        }
    }

  const char *env_endpoint =
    ACE_OS::getenv ("TAO_ORBENDPOINT");

  if (env_endpoint != 0)
    {
      int result =
        this->orb_params ()->add_endpoints (TAO_DEFAULT_LANE, env_endpoint);

      if (result != 0)
        {
          if (TAO_debug_level > 0)
            {
              ACE_ERROR ((LM_ERROR,
                          ACE_TEXT ("ERROR: Environment variable ")
                          ACE_TEXT ("TAO_ORBENDPOINT set to invalid value ")
                          ACE_TEXT ("<%C>.\n"),
                          env_endpoint));
            }

          throw ::CORBA::BAD_PARAM (
            CORBA::SystemException::_tao_minor_code (
              TAO_ORB_CORE_INIT_LOCATION_CODE,
              EINVAL),
            CORBA::COMPLETED_NO);
        }
    }

#if defined (SIGPIPE) && !defined (ACE_LACKS_UNIX_SIGNALS)
  // There's really no way to deal with this in a portable manner, so
  // we just have to suck it up and get preprocessor conditional and
  // ugly.
  //
  // Impractical to have each call to the ORB protect against the
  // implementation artifact of potential writes to dead connections,
  // as it'd be way expensive.  Do it here; who cares about SIGPIPE in
  // these kinds of applications, anyway?
  (void) ACE_OS::signal (SIGPIPE, (ACE_SignalHandler) SIG_IGN);
#endif /* SIGPIPE */

  // 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.
  this->parser_registry_.open (this);

  // Initialize the pointers to resources in the ORB Core instance,
  // e.g., reactor, connector, etc.  Must do this after we open
  // services because we'll load the factory from there.
  TAO_Resource_Factory *trf = this->resource_factory ();

  if (trf == 0)
    {
      ACE_ERROR ((LM_ERROR,
                  ACE_TEXT ("TAO (%P|%t) - %p\n"),
                  ACE_TEXT ("ORB Core unable to find a ")
                  ACE_TEXT ("Resource Factory instance")));
      throw ::CORBA::INTERNAL (
        CORBA::SystemException::_tao_minor_code (
          TAO_ORB_CORE_INIT_LOCATION_CODE,
          0),
        CORBA::COMPLETED_NO);
    }

  // Set whether or not to use the local memory pool for the cdr allocators.

  trf->use_local_memory_pool (this->use_local_memory_pool_);

  // @@ ????
  // Make sure the reactor is initialized...
  ACE_Reactor *reactor = this->reactor ();
  if (reactor == 0)
    {
      ACE_ERROR ((LM_ERROR,
                  ACE_TEXT ("TAO (%P|%t) - %p\n"),
                  ACE_TEXT ("ORB Core unable to initialize reactor")));
      throw ::CORBA::INITIALIZE (
        CORBA::SystemException::_tao_minor_code (
          TAO_ORB_CORE_INIT_LOCATION_CODE,
          0),
        CORBA::COMPLETED_NO);
    }

  TAO_Server_Strategy_Factory *ssf = this->server_factory ();

  if (ssf == 0)
    {
      ACE_ERROR ((LM_ERROR,
                  ACE_TEXT ("TAO (%P|%t) - %p\n"),
                  ACE_TEXT ("ORB Core unable to find a ")
                  ACE_TEXT ("Server Strategy Factory instance")));
      throw ::CORBA::INTERNAL (
        CORBA::SystemException::_tao_minor_code (
          TAO_ORB_CORE_INIT_LOCATION_CODE,
          0),
        CORBA::COMPLETED_NO);
    }

  ssf->open (this);

  // Open the ObjectKey_Table
  (void) this->object_key_table_.init (this);

  // Obtain the timeout value for the thread-per-connection model
  this->thread_per_connection_use_timeout_ =
    ssf->thread_per_connection_timeout (this->thread_per_connection_timeout_);

  if (thread_per_connection_use_timeout_ == -1)
    {
      if (ACE_OS::strcasecmp (TAO_DEFAULT_THREAD_PER_CONNECTION_TIMEOUT,
                              "INFINITE") == 0)
        {
          this->thread_per_connection_use_timeout_ = 0;
        }
      else
        {
          this->thread_per_connection_use_timeout_ = 1;
          int milliseconds =
            ACE_OS::atoi (TAO_DEFAULT_THREAD_PER_CONNECTION_TIMEOUT);
          // Use a temporary to obtain automatic normalization.
          this->thread_per_connection_timeout_ =
            ACE_Time_Value (0, 1000 * milliseconds);
        }
    }
  if (this->thread_per_connection_use_timeout_ == 0)
    {
      // Do not wait for the server threads because they may block
      // forever.
      this->tm_.wait_on_exit (0);
    }

  // Initialize the "ORB" pseudo-object now.
  this->orb_ = CORBA::ORB::_tao_make_ORB (this);

  // This should probably move into the ORB Core someday rather then
  // being done at this level.
  this->orb_->_use_omg_ior_format (use_ior);

  // Set all kinds of orb parameters whose setting needed to be
  // deferred until after the service config entries had been
  // determined.

  this->orb_params ()->service_port (TAO::MCAST_NAMESERVICE, ns_port);

  if (ns_port != 0)
    {
      static char const mcast_fmt[] = "mcast://:%d::";
      static size_t const PORT_BUF_SIZE = 256;

      char def_init_ref[PORT_BUF_SIZE] = { 0 };

      ACE_OS::snprintf (def_init_ref,
                        PORT_BUF_SIZE,
                        mcast_fmt,
                        ns_port);

      this->orb_params ()->default_init_ref (def_init_ref);
    }

  this->orb_params ()->service_port (TAO::MCAST_TRADINGSERVICE, ts_port);
  this->orb_params ()->service_port (TAO::MCAST_IMPLREPOSERVICE, ir_port);

  this->orb_params ()->use_dotted_decimal_addresses (dotted_decimal_addresses);
  // When caching incoming transports don't use the host name if
  // -ORBDottedDecimalAddresses or -ORBNoServerSideNameLookups is true.
  this->orb_params ()->cache_incoming_by_dotted_decimal_address
                                            (no_server_side_name_lookups
                                             || dotted_decimal_addresses);

  this->orb_params ()->use_parallel_connects
    (use_parallel_connects != 0);

  this->orb_params ()->linger (linger);
  this->orb_params ()->accept_error_delay (accept_error_delay);
  this->orb_params ()->nodelay (nodelay);
  this->orb_params ()->sock_keepalive (so_keepalive);
  this->orb_params ()->sock_dontroute (so_dontroute);
  this->orb_params ()->ip_hoplimit (ip_hoplimit);
  this->orb_params ()->ip_multicastloop (ip_multicastloop);
  if (rcv_sock_size >= 0)
    this->orb_params ()->sock_rcvbuf_size (rcv_sock_size);
  if (snd_sock_size >= 0)
    this->orb_params ()->sock_sndbuf_size (snd_sock_size);
  if (cdr_tradeoff >= 0)
    this->orb_params ()->cdr_memcpy_tradeoff (cdr_tradeoff);

  this->orb_params ()->std_profile_components (std_profile_components);

  this->orb_params ()->negotiate_codesets (negotiate_codesets);

  if (this->codeset_manager())
    this->codeset_manager_->open(*this);
  else
    if  (TAO_debug_level > 0)
        ACE_DEBUG ((LM_DEBUG,
                    ACE_TEXT("TAO (%P|%t) - ORB_Core: ")
                    ACE_TEXT("Codeset Manager not available\n")));

  // Set up the pluggable protocol infrastructure.  First get a
  // pointer to the protocol factories set, then obtain pointers to
  // all factories loaded by the service configurator.
  // Load all protocol factories!
  if (trf->init_protocol_factories () == -1)
    throw ::CORBA::INITIALIZE (
      CORBA::SystemException::_tao_minor_code (
        TAO_ORB_CORE_INIT_LOCATION_CODE,
        0),
      CORBA::COMPLETED_NO);

  // init the ORB core's pointer
  this->protocol_factories_ = trf->get_protocol_factories ();

  // Initialize the flushing strategy
  this->flushing_strategy_ = trf->create_flushing_strategy ();

  // Look in the service repository for an instance of the Protocol Hooks.
  const char *protocols_hooks_name = this->orb_params ()->protocols_hooks_name ();

  this->protocols_hooks_ =
    ACE_Dynamic_Service<TAO_Protocols_Hooks>::instance
    (this->configuration (),
     ACE_TEXT_CHAR_TO_TCHAR (protocols_hooks_name));

  if (this->protocols_hooks_ != 0)
    {
      // Initialize the protocols hooks instance.
      this->protocols_hooks_->init_hooks (this);
    }

  // If available, allow the Adapter Factory to setup.
  ACE_Service_Object *adapter_factory =
    ACE_Dynamic_Service<ACE_Service_Object>::instance (
      this->configuration (),
      this->orb_params ()->poa_factory_name ());

  if (adapter_factory != 0)
    {
      adapter_factory->init (0, 0);
    }

  // Look in the service repository for an instance of the
  // Network Priority Protocol Hooks.
  const ACE_CString &network_priority_protocols_hooks_name =
     TAO_ORB_Core_Static_Resources::instance ()->
       network_priority_protocols_hooks_name_;

  this->network_priority_protocols_hooks_ =
    ACE_Dynamic_Service<TAO_Network_Priority_Protocols_Hooks>::instance
    (this->configuration (),
     ACE_TEXT_CHAR_TO_TCHAR (network_priority_protocols_hooks_name.c_str()));

  if (this->network_priority_protocols_hooks_ != 0)
    {
      // Initialize the protocols hooks instance.
      this->network_priority_protocols_hooks_->init_hooks (this);
    }

  // As a last step perform initializations of the service callbacks
  this->services_callbacks_init ();

  // The ORB has been initialized, meaning that the ORB is no longer
  // in the shutdown state.
  this->has_shutdown_ = false;

  return 0;
}

TAO_ORB_Core::InitRefMap * TAO_ORB_Core::init_ref_map ( void   ) 

Return a pointer to the -ORBInitRef map.

Definition at line 184 of file ORB_Core.inl.

{
  return &this->init_ref_map_;
}

CORBA::Long TAO_ORB_Core::initialize_object ( TAO_Stub the_stub,
CORBA::Object_ptr  obj 
)

Initialize a new object, use the adapter registry to initialize a collocated object, if not possible then initialize a regular object. NOTE: Why would this method be required? The answer is if the user decides to use lazy initialization of CORBA object, then this is the route that we have to take to do the initialization.

Definition at line 2048 of file ORB_Core.cpp.

{
  // @@ What about forwarding.  With this approach we are never forwarded
  //    when we use collocation!
  const TAO_MProfile &mprofile =
    stub->base_profiles ();

  return initialize_object_i (stub, mprofile);
}

CORBA::Long TAO_ORB_Core::initialize_object_i ( TAO_Stub the_stub,
const TAO_MProfile mprofile 
) [protected]

Common code from initialize_object and reinitialize_object.

Definition at line 2067 of file ORB_Core.cpp.

{
  CORBA::Long retval = 0;
  TAO_ORB_Core_Auto_Ptr collocated_orb_core;

  {
    // Lock the ORB_Table against concurrent modification while we
    // iterate through the ORBs.
    ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
                              guard,
                              TAO::ORB_Table::instance()->lock (),
                              0));

    TAO::ORB_Table * const table = TAO::ORB_Table::instance ();
    TAO::ORB_Table::iterator const end = table->end ();
    for (TAO::ORB_Table::iterator i = table->begin (); i != end; ++i)
      {
        TAO_ORB_Core * const other_core = (*i).second.core ();

        if (this->is_collocation_enabled (other_core,
                                          mprofile))
          {
            other_core->_incr_refcnt ();
            TAO_ORB_Core_Auto_Ptr tmp_auto_ptr (other_core);
            collocated_orb_core = tmp_auto_ptr;
            break;
          }
      }
  }

  if (collocated_orb_core.get ())
    {
      retval = collocated_orb_core.get ()->adapter_registry ().initialize_collocated_object (stub);
    }
  else
    {
      stub->is_collocated (false);
    }

  return retval;
}

ACE_Allocator * TAO_ORB_Core::input_cdr_buffer_allocator ( void   ) 

This allocator is always global and has no locks. It is intended for allocating the buffers used in *incoming* CDR streams.

Definition at line 2855 of file ORB_Core.cpp.

ACE_Allocator * TAO_ORB_Core::input_cdr_dblock_allocator ( void   ) 

This allocator is global, may or may not have locks. It is intended for allocating the ACE_Data_Blocks used in *incoming* CDR streams.

Definition at line 2849 of file ORB_Core.cpp.

ACE_Allocator * TAO_ORB_Core::input_cdr_msgblock_allocator ( void   ) 

This allocator is always global and has no locks. It is intended for allocating the buffers used in *incoming* CDR streams.

Definition at line 2861 of file ORB_Core.cpp.

TAO_IORInterceptor_Adapter * TAO_ORB_Core::ior_interceptor_adapter ( void   ) 

Get the IOR Interceptor adapter. If not created, this method will try to create one.

Definition at line 3277 of file ORB_Core.cpp.

{
  if (this->ior_interceptor_adapter_ == 0)
    {
      ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
                        ace_mon,
                        this->lock_,
                        0);

      if (this->ior_interceptor_adapter_ == 0)
        {
          try
            {
              TAO_IORInterceptor_Adapter_Factory * ior_ap_factory =
                ACE_Dynamic_Service<TAO_IORInterceptor_Adapter_Factory>::instance
                  (this->configuration (),
                   ACE_TEXT_CHAR_TO_TCHAR (TAO_ORB_Core::iorinterceptor_adapter_factory_name ()));

              if (ior_ap_factory)
                {
                  this->ior_interceptor_adapter_ = ior_ap_factory->create ();
                }
            }
          catch (const ::CORBA::Exception& ex)
            {
              ex._tao_print_exception (
                "Cannot initialize the ior_interceptor_adapter\n");
            }
        }
    }

  return this->ior_interceptor_adapter_;
}

const char * TAO_ORB_Core::iorinterceptor_adapter_factory_name ( void   )  [static]

Gets the value of TAO_ORB_Core::iorinterceptor_adapter_factory_name_.

Definition at line 1565 of file ORB_Core.cpp.

void TAO_ORB_Core::iorinterceptor_adapter_factory_name ( const char *  name  )  [static]

Sets the value of TAO_ORB_Core::iorinterceptor_adapter_factory_name_.

Definition at line 1559 of file ORB_Core.cpp.

int TAO_ORB_Core::is_collocated ( const TAO_MProfile mprofile  ) 

See if we have a collocated address, if yes, return the POA associated with the address.

Definition at line 2135 of file ORB_Core.cpp.

{
  // @@ Lots of issues arise when dealing with collocation.  What about
  //    forwarding or what if this is a multi-profile IOR where the order is
  //    significant and only one of the profiles is collocated.  For example
  //    when using a multiple servers for fault tolerance.  For now, we just
  //    look through all profiles and if any are colocated then we assume
  //    the object is collocated.
  // @@ Note, if collocated we can not be forwarded!
  //    Also, acceptor_registry_->is_collocated (...) will check the
  //    address (ORB Host) but not the object_key.  This should be checked
  //    also.

  return this->thread_lane_resources_manager ().is_collocated (mprofile);
}

CORBA::Boolean TAO_ORB_Core::is_collocation_enabled ( TAO_ORB_Core other_orb,
const TAO_MProfile mp 
) [private]

Checks to see whether collocation optimizations have to be applied on objects in the other_orb

Definition at line 2111 of file ORB_Core.cpp.

{
  TAO_MProfile mp_temp;

  TAO_Profile* profile = 0;
  if (this->service_profile_selection(mp, profile) && profile)
  {
    mp_temp.add_profile(profile);
  }

  if (!orb_core->optimize_collocation_objects ())
    return 0;

  if (!orb_core->use_global_collocation () && orb_core != this)
    return 0;

  if (!orb_core->is_collocated (profile ? mp_temp : mp))
    return 0;

  return 1;
}

CORBA::Boolean TAO_ORB_Core::is_permanent_forward_condition ( const CORBA::Object_ptr  obj,
const TAO_Service_Context service_context 
)

Verify condition for permanent forward is given, both parameters must provide group attributes.

Definition at line 627 of file ORB_Core.inl.

{
  const TAO_Service_Callbacks *service_callback =
      this->fault_tolerance_service ().service_callback ();

  // Since forward location is allowed to be nil then check for it.
  CORBA::Boolean const permanent_forward_condition =
      service_callback && obj &&
      service_callback->is_permanent_forward_condition (obj,
                                                        service_context);

  return permanent_forward_condition;
}

TAO_Service_Callbacks::Profile_Equivalence TAO_ORB_Core::is_profile_equivalent ( const TAO_Profile this_p,
const TAO_Profile that_p 
)

Hook for the services to determine whether the profiles are equivalent or not. For details on how this is used please see the FT service

Definition at line 120 of file ORB_Core.inl.

{
  TAO_Service_Callbacks::Profile_Equivalence retval
    = TAO_Service_Callbacks::DONT_KNOW;

  if (this->ft_service_.service_callback ())
    {
      retval =
        this->ft_service_.service_callback ()->is_profile_equivalent (this_p,
                                                                      that_p);
    }

  return retval;
}

TAO_Thread_Lane_Resources & TAO_ORB_Core::lane_resources ( void   ) 

Get access to the thread lane resources.

Definition at line 2447 of file ORB_Core.cpp.

TAO_Leader_Follower & TAO_ORB_Core::leader_follower ( void   ) 

Get access to the leader_follower class.

Definition at line 2154 of file ORB_Core.cpp.

{
  return this->lane_resources ().leader_follower ();
}

TAO_LF_Strategy & TAO_ORB_Core::lf_strategy ( void   ) 

Get access to the leader follower strategy.

Definition at line 2160 of file ORB_Core.cpp.

CORBA::ORB::ObjectIdList * TAO_ORB_Core::list_initial_references ( void   ) 

List all the service known by the ORB.

Definition at line 2791 of file ORB_Core.cpp.

{
  // Unsupported initial services should NOT be included in the below list!
  static const char *initial_services[] = { TAO_LIST_OF_INITIAL_SERVICES };
  // Make sure the "terminating" zero is the last array element so
  // that there is a stop condition when iterating through the list.

  static const size_t initial_services_size =
    sizeof (initial_services) / sizeof (initial_services[0]);

  const size_t total_size =
    initial_services_size
    + this->init_ref_map_.size ()
    + this->object_ref_table_.current_size ();

  CORBA::ORB::ObjectIdList *tmp = 0;

  ACE_NEW_THROW_EX (tmp,
                    CORBA::ORB::ObjectIdList (
                      static_cast<CORBA::ULong> (total_size)),
                    CORBA::NO_MEMORY ());

  CORBA::ORB::ObjectIdList_var list (tmp);
  list->length (static_cast<CORBA::ULong> (total_size));

  CORBA::ULong index = 0;
  // Index for ObjectIdList members.

  // Iterate over the registered initial references.
  for (index = 0; index < initial_services_size; ++index)
    list[index] = initial_services[index];

  // Now iterate over the initial references created by the user and
  // add them to the sequence.

  // References registered via
  // ORBInitInfo::register_initial_reference().
  TAO_Object_Ref_Table::iterator const obj_ref_end =
    this->object_ref_table_.end ();

  for (TAO_Object_Ref_Table::iterator i = this->object_ref_table_.begin ();
       i != obj_ref_end;
       ++i, ++index)
    list[index] = CORBA::string_dup ((*i).first.in ());

  // References registered via INS.
  InitRefMap::iterator const end = this->init_ref_map_.end ();

  for (InitRefMap::iterator j = this-> init_ref_map_.begin ();
       j != end;
       ++j, ++index)
    list[index] = (*j).first.c_str ();

  return list._retn ();
}

void TAO_ORB_Core::load_policy_validators ( TAO_Policy_Validator validator  ) 

Call the libraries to handover the validators if they havent registered yet with the list of validators.

Definition at line 1971 of file ORB_Core.cpp.

{
  if (this->bidir_adapter_ == 0)
    {
      this->bidir_adapter_ =
        ACE_Dynamic_Service<TAO_BiDir_Adapter>::instance
          (this->configuration (), ACE_TEXT ("BiDirGIOP_Loader"));
    }

  // Call the BiDir library if it has been loaded
  if (this->bidir_adapter_)
    {
      this->bidir_adapter_->load_policy_validators (validator);
    }

  // Call the ZIOP library if it has been loaded
  if (this->ziop_adapter_)
    {
      this->ziop_adapter_->load_policy_validators (validator);
    }
}

ACE_Lock * TAO_ORB_Core::locking_strategy ( void   ) 

Return the locking strategy used for the data blocks.

Definition at line 40 of file ORB_Core.inl.

{
  if (this->resource_factory ()->use_locked_data_blocks ())
    return &this->data_block_lock_;

  return 0;
}

CORBA::ValueFactory TAO_ORB_Core::lookup_value_factory ( const char *  repository_id  ) 

Definition at line 3559 of file ORB_Core.cpp.

{
  if (this->valuetype_adapter ())
    {
      ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0);

      if (this->valuetype_adapter_ == 0)
        {
          return 0;
        }

      return this->valuetype_adapter_->vf_map_find (repository_id);
    }

  return 0;
}

void TAO_ORB_Core::not_default ( const char *  orb_id  ) 

Choose to be not a default ORB when there is more than one ORB.

Definition at line 197 of file ORB_Core.inl.

{
  TAO::ORB_Table * const table = TAO::ORB_Table::instance ();
  table->not_default (orb_id);
}

CORBA::Boolean TAO_ORB_Core::object_is_nil ( CORBA::Object_ptr  object  ) 

The loaded service would determine if the CORBA::Object_ptr is actually nil or not. This would be useful to accomodate new enhanced definitions as defined by the service specification.

Definition at line 108 of file ORB_Core.inl.

{
  CORBA::Boolean retval = false;
  if (this->ft_service_.service_callback ())
    {
      retval = this->ft_service_.service_callback ()->object_is_nil (obj);
    }
  return retval;
}

TAO::ObjectKey_Table & TAO_ORB_Core::object_key_table ( void   ) 

Acceessor to the table that stores the object_keys.

Definition at line 67 of file ORB_Core.inl.

{
  return this->object_key_table_;
}

TAO_Object_Ref_Table & TAO_ORB_Core::object_ref_table ( void   ) 

Return the table that maps object key/name to de-stringified object reference. It is needed for supporting local objects in the resolve_initial_references() mechanism.

Definition at line 61 of file ORB_Core.inl.

{
  return this->object_ref_table_;
}

void TAO_ORB_Core::operator= ( const TAO_ORB_Core  )  [private]

The ORB Core should not be copied.

void TAO_ORB_Core::optimize_collocation_objects ( CORBA::Boolean  opt  ) 

Set/get the collocation flags.

Definition at line 204 of file ORB_Core.inl.

{
  this->opt_for_collocation_ = opt;
}

CORBA::Boolean TAO_ORB_Core::optimize_collocation_objects ( void   )  const

Set/get the collocation flags.

Definition at line 210 of file ORB_Core.inl.

{
  return this->opt_for_collocation_;
}

CORBA::ORB_ptr TAO_ORB_Core::orb ( void   ) 

Get pointer to the ORB.

Definition at line 166 of file ORB_Core.inl.

{
  return this->orb_;
}

TAO_ORB_Parameters * TAO_ORB_Core::orb_params ( void   ) 

Accessor for the ORB parameters.

Definition at line 234 of file ORB_Core.inl.

{
  return &(this->orb_params_);
}

const char * TAO_ORB_Core::orbid ( void   )  const

Return ORBid string.

Definition at line 347 of file ORB_Core.inl.

{
  return this->orbid_;
}

TAO::ORBInitializer_Registry_Adapter * TAO_ORB_Core::orbinitializer_registry ( void   ) 

Return pointer to the orb initializer registry associated with this ORB core. Tries to load the PI library if it is not loaded yet

Definition at line 458 of file ORB_Core.inl.

{
  ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
                    0);
  if (orbinitializer_registry_ == 0)
    {
      return this->orbinitializer_registry_i ();
    }
  return this->orbinitializer_registry_;
}

TAO::ORBInitializer_Registry_Adapter * TAO_ORB_Core::orbinitializer_registry_i ( void   )  [protected]

Return pointer to the orb initializer registry associated with this ORB core.

Definition at line 1695 of file ORB_Core.cpp.

{
  // @todo The ORBInitializer_Registry is supposed to be a singleton.

  // If not, lookup it up.
  this->orbinitializer_registry_ =
    ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance
      (this->configuration (),
       ACE_TEXT ("ORBInitializer_Registry"));

#if !defined (TAO_AS_STATIC_LIBS) && !(defined (ACE_VXWORKS) && !defined (__RTP__))
      // In case we build shared, try to load the PI Client library, in a
      // static build we just can't do this, so don't try it, lower layers
      // output an error then.
  if (this->orbinitializer_registry_ == 0)
    {
      this->configuration ()->process_directive (
        ACE_DYNAMIC_SERVICE_DIRECTIVE ("ORBInitializer_Registry",
                                       "TAO_PI",
                                       "_make_ORBInitializer_Registry",
                                       ""));
      this->orbinitializer_registry_ =
        ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance
          (this->configuration (),
           ACE_TEXT ("ORBInitializer_Registry"));
    }
#endif /* !TAO_AS_STATIC_LIBS && !(ACE_VXWORKS && !__RTP__) */

  return this->orbinitializer_registry_;
}

ACE_Allocator * TAO_ORB_Core::output_cdr_buffer_allocator ( void   ) 

This allocator is always TSS and has no locks. It is intended for allocating the buffers used in *outgoing* CDR streams.

Definition at line 2874 of file ORB_Core.cpp.

ACE_Allocator * TAO_ORB_Core::output_cdr_dblock_allocator ( void   ) 

This allocator is always TSS and has no locks. It is intended for allocating the ACE_Data_Blocks used in *outgoing* CDR streams.

Definition at line 2867 of file ORB_Core.cpp.

ACE_Allocator * TAO_ORB_Core::output_cdr_msgblock_allocator ( void   ) 

This allocator is always TSS and has no locks. It is intended for allocating the ACE_Data_Blocks used in *outgoing* CDR streams.

Definition at line 2881 of file ORB_Core.cpp.

TAO_Parser_Registry * TAO_ORB_Core::parser_registry ( void   ) 

Get the IOR parser registry.

Definition at line 251 of file ORB_Core.inl.

{
  return &this->parser_registry_;
}

CORBA::Object_ptr TAO_ORB_Core::pi_current ( void   ) 

Return a pointer to the cached TAO::PICurrent object.

Definition at line 592 of file ORB_Core.inl.

{
  // A pointer/reference to PICurrent is cached in the ORB Core since
  // it is accessed in the critical path (i.e. the request invocation
  // path).  Caching it prevents additional overhead to due object
  // resolution from occurring.
  return this->pi_current_;
}

void TAO_ORB_Core::pi_current ( CORBA::Object_ptr  current  ) 

Set the pointer to the cached TAO::PICurrent object.

Definition at line 602 of file ORB_Core.inl.

{
  // Not duplicated since the ORB Core's "object_ref_table" already
  // contains a duplicate of the PICurrent object.
  this->pi_current_ = current;
}

TAO_Adapter * TAO_ORB_Core::poa_adapter ( void   ) 

Get the adapter named "RootPOA" and cache the result, this is an optimization for the POA.

Definition at line 1904 of file ORB_Core.cpp.

{
  if (this->poa_adapter_ == 0)
    {
      ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0);
      if (this->poa_adapter_ == 0)
        {
          this->poa_adapter_ =
            this->adapter_registry_.find_adapter ("RootPOA");
        }
    }
  return this->poa_adapter_;
}

CORBA::Object_ptr TAO_ORB_Core::poa_current ( void   ) 

Accessor to the POA current.

Todo:
In the future this hook should change, instead of hardcoding the object we should add a "Resolver" to the ORB, so the "POACurrent" object returns a per-ORB object.
Similarly, each ORB should implement the TSS pattern to put the POA_Current_Impl in a void* slot. The current approach *does* decouple the POA from the ORB, but it cannot add new adapters or other components transparently.
TAO_Policy_Current & TAO_ORB_Core::policy_current ( void   ) 

Accesors to the policy current, this object should be kept in TSS storage. The POA has to reset the policy current object on every upcall.

Definition at line 540 of file ORB_Core.inl.

{
  return *this->policy_current_;
}

TAO::PolicyFactory_Registry_Adapter * TAO_ORB_Core::policy_factory_registry ( void   ) 

Return pointer to the policy factory registry associated with this ORB core.

Definition at line 476 of file ORB_Core.inl.

{
  ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
                    0);
  if (policy_factory_registry_ == 0)
    {
      return this->policy_factory_registry_i ();
    }
  return this->policy_factory_registry_;
}

TAO::PolicyFactory_Registry_Adapter * TAO_ORB_Core::policy_factory_registry_i ( void   )  [protected]

Return pointer to the policy factory registry associated with this ORB core.

Definition at line 1649 of file ORB_Core.cpp.

{

  TAO_PolicyFactory_Registry_Factory *loader =
    ACE_Dynamic_Service<TAO_PolicyFactory_Registry_Factory>::instance
      (this->configuration (),
       ACE_TEXT ("PolicyFactory_Loader"));

  if (loader == 0)
    {
      this->configuration ()->process_directive (
        ACE_DYNAMIC_SERVICE_DIRECTIVE("PolicyFactory_Loader",
                                      "TAO_PI",
                                      "_make_TAO_PolicyFactory_Loader",
                                      ""));
      loader =
        ACE_Dynamic_Service<TAO_PolicyFactory_Registry_Factory>::instance
          (this->configuration (),
           ACE_TEXT ("PolicyFactory_Loader"));
    }

  if (loader != 0)
    {
      this->policy_factory_registry_ =
        loader->create ();
    }

  return this->policy_factory_registry_;
}

TAO_Policy_Manager * TAO_ORB_Core::policy_manager ( void   ) 

Return the Policy_Manager for this ORB.

Definition at line 261 of file ORB_Core.inl.

{
  return this->policy_manager_;
}

TAO_ProtocolFactorySet * TAO_ORB_Core::protocol_factories ( void   ) 

Get the protocol factories.

Definition at line 245 of file ORB_Core.inl.

TAO_Protocols_Hooks* TAO_ORB_Core::protocols_hooks ( void   ) 

Returns pointer to the Protocols_Hooks.

ACE_Reactor * TAO_ORB_Core::reactor ( void   ) 

Wrappers that forward the request to the concurrency strategy.

Definition at line 2961 of file ORB_Core.cpp.

{
  return this->leader_follower ().reactor ();
}

int TAO_ORB_Core::register_handle ( ACE_HANDLE  handle  ) 

Register the handle of an open connection with the ORB Core handle set. This handle set will be used to explicitly remove corresponding event handlers from the reactor.

CORBA::ValueFactory TAO_ORB_Core::register_value_factory ( const char *  repository_id,
CORBA::ValueFactory  factory 
)

Definition at line 3507 of file ORB_Core.cpp.

{
  if (this->valuetype_adapter ())
    {
      ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0);

      if (this->valuetype_adapter_ == 0)
        {
          return 0;
        }

      int const result =
        this->valuetype_adapter_->vf_map_rebind (repository_id, factory);

      if (result == 0) // No previous factory found
        {
          return 0;
        }

      if (result == -1)
        {
          // Error on bind.
          throw ::CORBA::MARSHAL ();
        }
    }

  return factory;    // previous factory was found
}

CORBA::Long TAO_ORB_Core::reinitialize_object ( TAO_Stub stub  ) 

Reinitialise a stub after the effective profile has changed. This will happen after a location forward has been received or if a location forward supplied new target subsequently fails.

Definition at line 2059 of file ORB_Core.cpp.

{
  return initialize_object_i (stub, stub->forward_profiles ()
                                    ? *(stub->forward_profiles ())
                                    : stub->base_profiles ());
}

int TAO_ORB_Core::remove_handle ( ACE_HANDLE  handle  ) 

Remove handle from the ORB Core's handle set so that it isn't included in the set that is passed to the reactor upon ORB destruction.

TAO_Request_Dispatcher * TAO_ORB_Core::request_dispatcher ( void   ) 

Return the current request dispatcher strategy.

Definition at line 178 of file ORB_Core.inl.

{
  return this->request_dispatcher_;
}

void TAO_ORB_Core::request_dispatcher ( TAO_Request_Dispatcher rd  ) 

Set a new request dispatcher. The ORB Core retains ownership of the request dispatcher once it gets it. Currently, this only gets called at initialization.

Definition at line 1928 of file ORB_Core.cpp.

{
  // Assume ownership of the request dispatcher.
  TAO_Request_Dispatcher *tmp = this->request_dispatcher_;
  this->request_dispatcher_ = request_dispatcher;
  delete tmp;
}

CORBA::Object_ptr TAO_ORB_Core::resolve_codecfactory ( void   ) 

Resolve the CodecFactory DLL.

Definition at line 399 of file ORB_Core.inl.

void TAO_ORB_Core::resolve_codecfactory_i ( void   )  [protected]

Obtain and cache the codec factory object reference.

Definition at line 2486 of file ORB_Core.cpp.

{
  TAO_Object_Loader *loader =
    ACE_Dynamic_Service<TAO_Object_Loader>::instance
      (this->configuration (),
       ACE_TEXT ("CodecFactory_Loader"));

  if (loader == 0)
    {
      this->configuration()->process_directive
        (ACE_DYNAMIC_SERVICE_DIRECTIVE("CodecFactory",
                                       "TAO_CodecFactory",
                                       "_make_TAO_CodecFactory_Loader",
                                       ""));
      loader =
        ACE_Dynamic_Service<TAO_Object_Loader>::instance
          (this->configuration (), ACE_TEXT ("CodecFactory_Loader"));
    }

  if (loader != 0)
    {
      this->codec_factory_ =
        loader->create_object (this->orb_, 0, 0);
    }
}

CORBA::Object_ptr TAO_ORB_Core::resolve_compression_manager ( void   ) 

Resolve the Compression DLL.

Definition at line 411 of file ORB_Core.inl.

void TAO_ORB_Core::resolve_compression_manager_i ( void   )  [protected]

Obtain and cache the compression manager object reference.

Definition at line 2513 of file ORB_Core.cpp.

{
  TAO_Object_Loader *loader =
    ACE_Dynamic_Service<TAO_Object_Loader>::instance
      (this->configuration (),
       ACE_TEXT ("Compression_Loader"));

  if (loader == 0)
    {
      this->configuration()->process_directive
        (ACE_DYNAMIC_SERVICE_DIRECTIVE("Compression",
                                       "TAO_Compression",
                                       "_make_TAO_Compression_Loader",
                                       ""));
      loader =
        ACE_Dynamic_Service<TAO_Object_Loader>::instance
          (this->configuration (), ACE_TEXT ("Compression_Loader"));
    }

  if (loader != 0)
    {
      this->compression_manager_ = loader->create_object (this->orb_, 0, 0);
    }
}

CORBA::Object_ptr TAO_ORB_Core::resolve_dynanyfactory ( void   ) 

Resolve the Dynamic Any Factory.

Definition at line 488 of file ORB_Core.inl.

void TAO_ORB_Core::resolve_dynanyfactory_i ( void   )  [protected]

Obtain and cache the dynamic any factory object reference.

Definition at line 2599 of file ORB_Core.cpp.

{
  TAO_Object_Loader *loader =
    ACE_Dynamic_Service<TAO_Object_Loader>::instance
      (this->configuration (),
       ACE_TEXT ("DynamicAny_Loader"));

  if (loader == 0)
    {
      this->configuration ()->process_directive
        (ACE_DYNAMIC_SERVICE_DIRECTIVE("DynamicAny_Loader",
                                       "TAO_DynamicAny",
                                       "_make_TAO_DynamicAny_Loader",
                                       ""));
      loader =
        ACE_Dynamic_Service<TAO_Object_Loader>::instance
        (this->configuration (),
         ACE_TEXT ("DynamicAny_Loader"));
    }

  if (loader != 0)
    {
      this->dynany_factory_ = loader->create_object (this->orb_, 0, 0);
    }
}

CORBA::Object_ptr TAO_ORB_Core::resolve_ior_manipulation ( void   ) 

Resolve the IOR Manipulation reference for this ORB.

Definition at line 500 of file ORB_Core.inl.

CORBA::Object_ptr TAO_ORB_Core::resolve_ior_table ( void   ) 

Resolve the IOR Table reference for this ORB.

Definition at line 512 of file ORB_Core.inl.

void TAO_ORB_Core::resolve_ior_table_i ( void   )  [private]

Obtain and cache the dynamic any factory object reference.

Definition at line 2652 of file ORB_Core.cpp.

{
  TAO_Adapter_Factory *factory =
    ACE_Dynamic_Service<TAO_Adapter_Factory>::instance
      (this->configuration (),
       ACE_TEXT ("TAO_IORTable"));

  if (factory == 0)
    {
      this->configuration ()->process_directive
        (ACE_DYNAMIC_SERVICE_DIRECTIVE("TAO_IORTable",
                                       "TAO_IORTable",
                                       "_make_TAO_Table_Adapter_Factory",
                                       ""));
      factory =
        ACE_Dynamic_Service<TAO_Adapter_Factory>::instance
          (this->configuration (), ACE_TEXT ("TAO_IORTable"));
    }

  if (factory != 0)
    {
      ACE_Auto_Ptr <TAO_Adapter> iortable_adapter (factory->create (this));
      iortable_adapter->open ();

      CORBA::Object_var tmp_root = iortable_adapter->root ();

      this->adapter_registry_.insert (iortable_adapter.get ());

      // It is now (exception) safe to release ownership from the auto pointers
      this->ior_table_= tmp_root._retn ();
      iortable_adapter.release ();
    }
}

void TAO_ORB_Core::resolve_iormanipulation_i ( void   )  [protected]

Obtain and cache the IORManipulation factory object reference.

Definition at line 2626 of file ORB_Core.cpp.

{
  TAO_Object_Loader *loader =
    ACE_Dynamic_Service<TAO_Object_Loader>::instance
      (this->configuration (),
       ACE_TEXT ("IORManip_Loader"));

  if (loader == 0)
    {
      this->configuration()->process_directive
        (ACE_DYNAMIC_SERVICE_DIRECTIVE("IORManip_Loader",
                                       "TAO_IORManip",
                                       "_make_TAO_IORManip_Loader",
                                       ""));
      loader =
        ACE_Dynamic_Service<TAO_Object_Loader>::instance
          (this->configuration (), ACE_TEXT ("IORManip_Loader"));
    }

  if (loader != 0)
    {
      this->ior_manip_factory_ = loader->create_object (this->orb_, 0, 0);
    }
}

CORBA::Object_ptr TAO_ORB_Core::resolve_monitor ( void   ) 

Resolve the Monitor reference for this ORB.

Definition at line 524 of file ORB_Core.inl.

void TAO_ORB_Core::resolve_monitor_i ( void   )  [protected]

Obtain and cache the Monitor object reference.

Definition at line 2687 of file ORB_Core.cpp.

{
  TAO_Object_Loader *loader =
    ACE_Dynamic_Service<TAO_Object_Loader>::instance
      (this->configuration (),
       ACE_TEXT ("Monitor_Init"));

  if (loader == 0)
    {
      this->configuration ()->process_directive
        (ACE_DYNAMIC_SERVICE_DIRECTIVE("Monitor_Init",
                                       "TAO_Monitor",
                                       "_make_TAO_Monitor_Init",
                                       ""));
      loader =
        ACE_Dynamic_Service<TAO_Object_Loader>::instance
        (this->configuration (),
         ACE_TEXT ("Monitor_Init"));
    }

  if (loader != 0)
    {
      this->monitor_ = loader->create_object (this->orb_, 0, 0);
    }
}

CORBA::Object_ptr TAO_ORB_Core::resolve_picurrent ( void   ) 

Resolve the PICurrent.

Definition at line 385 of file ORB_Core.inl.

void TAO_ORB_Core::resolve_picurrent_i ( void   )  [protected]

Obtain and cache the picurrent factory object reference.

Definition at line 2568 of file ORB_Core.cpp.

{
  TAO_Object_Loader *loader =
    ACE_Dynamic_Service<TAO_Object_Loader>::instance
      (this->configuration (),
       ACE_TEXT ("PICurrent_Loader"));

  if (loader == 0)
    {
      this->configuration ()->process_directive
        (ACE_DYNAMIC_SERVICE_DIRECTIVE("PICurrent_Loader",
                                       "TAO_PI",
                                       "_make_TAO_PICurrent_Loader",
                                       ""));
      loader =
        ACE_Dynamic_Service<TAO_Object_Loader>::instance
          (this->configuration (), ACE_TEXT ("PICurrent_Loader"));
    }

  if (loader != 0)
    {
      CORBA::Object_ptr pi = loader->create_object (this->orb_, 0, 0);

      this->pi_current_ = pi;
    }
}

CORBA::Object_ptr TAO_ORB_Core::resolve_poa_current ( void   ) 

Resolve POA Current.

Definition at line 548 of file ORB_Core.inl.

void TAO_ORB_Core::resolve_poa_current_i ( void   )  [protected]

Obtain and cache the poa current.

Definition at line 2539 of file ORB_Core.cpp.

{
  TAO_Object_Loader *loader =
    ACE_Dynamic_Service<TAO_Object_Loader>::instance
      (this->configuration(),
       ACE_TEXT ("TAO_POA_Current_Factory"));

  if (loader == 0)
    {
      this->configuration()->process_directive
        (ACE_DYNAMIC_SERVICE_DIRECTIVE("TAO_POA_Current_Factory",
                                       "TAO_PortableServer",
                                       "_make_TAO_POA_Current_Factory",
                                       ""));
      loader =
        ACE_Dynamic_Service<TAO_Object_Loader>::instance
          (this->configuration(), ACE_TEXT ("TAO_POA_Current_Factory"));
    }

  if (loader != 0)
    {
      this->poa_current_ = loader->create_object (this->orb_, 0, 0);
    }
}

CORBA::Object_ptr TAO_ORB_Core::resolve_rir ( const char *  name  ) 

Resolve an initial reference via the -ORBInitRef and.

Definition at line 2734 of file ORB_Core.cpp.

{
  // Get the table of initial references specified through
  // -ORBInitRef.
  ACE_CString ior;
  ACE_CString object_id ((const char *) name);

  // Get the list of initial reference prefixes specified through
  // -ORBDefaultInitRef.
  CORBA::String_var default_init_ref =
    this->orb_params ()->default_init_ref ();

  // Check if a DefaultInitRef was specified.
  if (ACE_OS::strlen (default_init_ref.in ()) != 0)
    {
      static const char corbaloc_prefix[] = "corbaloc:";
      static const char mcast_prefix[] = "mcast:";
      char object_key_delimiter = 0;

      ACE_CString list_of_profiles (default_init_ref.in ());

      // Check if the protocol is corbaloc: or mcast:.
      // If it is, set the object_key_delimiter.
      if ((ACE_OS::strncmp (default_init_ref.in (),
                            corbaloc_prefix,
                            sizeof corbaloc_prefix -1) == 0) ||
          (ACE_OS::strncmp (default_init_ref.in (),
                            mcast_prefix,
                            sizeof mcast_prefix -1) == 0))
        {
          object_key_delimiter = '/';
        }
      else
        {
          TAO_Connector_Registry *conn_reg = this->connector_registry ();

          // Obtain the appropriate object key delimiter for the
          // specified protocol.
          object_key_delimiter =
            conn_reg->object_key_delimiter (list_of_profiles.c_str ());
        }

      // Make sure that the default initial reference doesn't end
      // with the object key delimiter character.
      if (list_of_profiles[list_of_profiles.length() - 1] !=
          object_key_delimiter)
            list_of_profiles += ACE_CString (object_key_delimiter);

      list_of_profiles += object_id;

      return this->orb ()->string_to_object (list_of_profiles.c_str ());
    }

  return CORBA::Object::_nil ();
}

CORBA::Object_ptr TAO_ORB_Core::resolve_rt_orb ( void   ) 

Resolve the RT ORB reference for this ORB.

Definition at line 571 of file ORB_Core.inl.

{
  if (CORBA::is_nil (this->rt_orb_.in ()))
    {
      ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
                        CORBA::Object::_nil ());
      if (CORBA::is_nil (this->rt_orb_.in ()))
        {
          // Save a reference to the priority mapping manager.
          this->rt_orb_ =
              this->object_ref_table ().resolve_initial_reference (
              TAO_OBJID_RTORB);
        }
    }

  return CORBA::Object::_duplicate (this->rt_orb_.in ());
}

CORBA::Object_ptr TAO_ORB_Core::resolve_typecodefactory ( void   ) 

Resolve the TypeCodeFactory DLL.

Definition at line 371 of file ORB_Core.inl.

void TAO_ORB_Core::resolve_typecodefactory_i ( void   )  [protected]

Obtain and cache the typecode factory object reference.

Definition at line 2453 of file ORB_Core.cpp.

{
  TAO_Object_Loader *loader =
    ACE_Dynamic_Service<TAO_Object_Loader>::instance
      (this->configuration (),
       ACE_TEXT ("TypeCodeFactory_Loader"));

  if (loader == 0)
    {
      this->configuration ()->process_directive
        (ACE_DYNAMIC_SERVICE_DIRECTIVE("TypeCodeFactory",
                                       "TAO_TypeCodeFactory",
                                       "_make_TAO_TypeCodeFactory_Loader",
                                       ""));
      loader =
        ACE_Dynamic_Service<TAO_Object_Loader>::instance
        (this->configuration (),
         ACE_TEXT ("TypeCodeFactory_Loader"));

      if (loader == 0)
        {
          ACE_ERROR ((LM_ERROR,
                      ACE_TEXT ("TAO (%P|%t) Unable to instantiate ")
                      ACE_TEXT ("a TypeCodeFactory_Loader\n")));
          throw ::CORBA::ORB::InvalidName ();
        }
    }

  this->typecode_factory_ =
    loader->create_object (this->orb_, 0, 0);
}

TAO_Resource_Factory * TAO_ORB_Core::resource_factory ( void   ) 

Returns pointer to the resource factory.

Definition at line 1583 of file ORB_Core.cpp.

{
  // Check if there is a cached reference.
  if (this->resource_factory_ != 0)
    {
      return this->resource_factory_;
    }

  // Look in the service repository for an instance.
  ACE_CString &resource_factory_name =
    TAO_ORB_Core_Static_Resources::instance ()->resource_factory_name_;

  this->resource_factory_ =
    ACE_Dynamic_Service<TAO_Resource_Factory>::instance
      (this->configuration (),
       ACE_TEXT_CHAR_TO_TCHAR (resource_factory_name.c_str()));

  return this->resource_factory_;
}

CORBA::Object_ptr TAO_ORB_Core::root_poa ( void   ) 

Return the RootPOA, or try to load it if not initialized already.

Definition at line 1850 of file ORB_Core.cpp.

{
  // DCL ..
  if (CORBA::is_nil (this->root_poa_.in ()))
    {
      // Making sure the initialization process in the current thread uses
      // the correct service repository (ours), instead of the global one.
      ACE_Service_Config_Guard scg (this->configuration ());

      TAO_Adapter_Factory *factory =
        ACE_Dynamic_Service<TAO_Adapter_Factory>::instance
          (this->configuration (),
          this->orb_params ()->poa_factory_name ());

      if (factory == 0)
        {
          this->configuration()->process_directive (
             this->orb_params ()->poa_factory_directive ());

          factory =
            ACE_Dynamic_Service<TAO_Adapter_Factory>::instance
              (this->configuration (),
              this->orb_params ()->poa_factory_name ());
        }

      if (factory == 0)
        {
          return CORBA::Object::_nil ();
        }

      ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
                        monitor,
                        this->open_lock_,
                        0);

      if (CORBA::is_nil (this->root_poa_.in ()))
        {
          auto_ptr<TAO_Adapter> poa_adapter (factory->create (this));

          poa_adapter->open ();

          // @@ Not exception safe
          this->root_poa_ = poa_adapter->root ();

          this->adapter_registry_.insert (poa_adapter.get ());

          poa_adapter.release ();
        }
    }

  return CORBA::Object::_duplicate (this->root_poa_.in ());
}

int TAO_ORB_Core::run ( ACE_Time_Value tv,
int  perform_work 
)

Run the event loop.

Definition at line 2166 of file ORB_Core.cpp.

{
  // ORB::run may be called from a thread, different from the one that
  // did the ORB_init, consequently we must establish the Service
  // Gestalt, this thread will consider "global"

  ACE_Service_Config_Guard use_orbs (this->configuration());

  if (TAO_debug_level > 10)
    {
      ACE_DEBUG ((LM_DEBUG,
                  ACE_TEXT ("TAO (%P|%t) - ORB_Core::run, ")
                  ACE_TEXT ("start [%s]\n"),
                  perform_work?ACE_TEXT("perform_work"):ACE_TEXT("run")));
    }

  // Fetch the Reactor
  ACE_Reactor *r = this->reactor ();

  int result = 1;
  // 1 to detect that nothing went wrong

  // Loop handling client requests until the ORB is shutdown.

  // We could use the leader-follower lock to check for the state
  // if this variable or use the lock <create_event_loop_lock> in
  // the server strategy factory.
  // We don't need to do this because we use the Reactor
  // mechanisms to shutdown in a thread-safe way.

  while (this->has_shutdown () == false)
    {
      // Every time we perform an interation we have to become the
      // leader again, because it is possible that a client has
      // acquired the leader role...
      TAO_Leader_Follower &leader_follower = this->leader_follower ();
      TAO_LF_Strategy &lf_strategy = this->lf_strategy ();

      TAO_LF_Event_Loop_Thread_Helper helper (leader_follower, lf_strategy, tv);

      result = helper.event_loop_return ();
      if (result != 0)
        {
          if (errno == ETIME)
            return 0;
          else
            return result;
        }

      // Set the owning thread of the Reactor to the one which we're
      // currently in.  This is necessary b/c it's possible that the
      // application is calling us from a thread other than that in which
      // the Reactor's CTOR (which sets the owner) was called.
      //
      // We need to do this on every iteration because the reactor may be
      // acquired by one of the client threads in the LF waiting
      // strategy
      r->owner (ACE_Thread::self ());

      if (TAO_debug_level > 10)
        {
          ACE_DEBUG ((LM_DEBUG,
                      ACE_TEXT ("TAO (%P|%t) - ORB_Core::run, ")
                      ACE_TEXT ( "calling handle_events()\n")));
        }

      result = r->handle_events (tv);

      if (TAO_debug_level > 10)
        {
          ACE_DEBUG ((LM_DEBUG,
                      ACE_TEXT ("TAO (%P|%t) - ORB_Core::run, ")
                      ACE_TEXT ("handle_events() returns %d\n"),
                      result));
        }

      if (result == -1)
        {
          // An error, terminate the loop
          break;
        }
      if (result == 0
          && tv != 0
          && *tv == ACE_Time_Value::zero)
        {
          // A timeout, terminate the loop...
          break;
        }

      if (perform_work)
        {
          // This is running on behalf of a perform_work() call,
          // The loop should run only once.
          break;
        }
      // Otherwise just continue..
    }

  // wait only in the parent thread.
  if (this->has_shutdown () == true &&
      (this->server_factory_->activate_server_connections () ||
       (this->tm_.task() == 0 && this->tm_.count_threads() > 0) ) ) {
    this->tm_.wait ();
  }

  if (TAO_debug_level > 10)
    {
      ACE_DEBUG ((LM_DEBUG,
                  ACE_TEXT ("TAO (%P|%t) - ORB_Core::run, ")
                  ACE_TEXT ("ends with result = %d\n"),
                  result));
    }

  return result;
}

TAO_Server_Strategy_Factory * TAO_ORB_Core::server_factory ( void   ) 

Returns pointer to the server factory.

Definition at line 1835 of file ORB_Core.cpp.

{
  if (this->server_factory_ == 0)
    {
      // Look in the service repository for an instance.
      this->server_factory_ =
        ACE_Dynamic_Service<TAO_Server_Strategy_Factory>::instance
          (this->configuration (),
           ACE_TEXT ("Server_Strategy_Factory"));
    }

  return this->server_factory_;
}

const char * TAO_ORB_Core::server_id ( void   )  const

Resolve the RT Current flyweight for this ORB. Return server_id string.

Definition at line 423 of file ORB_Core.inl.

{
  return this->server_id_.c_str();
}

TAO::ServerRequestInterceptor_Adapter * TAO_ORB_Core::serverrequestinterceptor_adapter ( void   ) 

Get the Server Request Interceptor adapter. Will not create a new one if not available yet.

Definition at line 616 of file ORB_Core.inl.

TAO::ServerRequestInterceptor_Adapter * TAO_ORB_Core::serverrequestinterceptor_adapter_i ( void   )  [protected]

Get the Server Request Interceptor adapter. If not created, this method will try to create one if needed.

Definition at line 3432 of file ORB_Core.cpp.

TAO_Service_Context_Registry & TAO_ORB_Core::service_context_registry ( void   ) 

Definition at line 470 of file ORB_Core.inl.

{
  return this->service_context_registry_;
}

CORBA::Boolean TAO_ORB_Core::service_profile_selection ( const TAO_MProfile mprofile,
TAO_Profile *&  profile 
)

The loaded service in the ORB_Core would determine if the profile selection is going to be made by the services or not. If the services do make the selection they would return the selected profile through <profile>.

Definition at line 91 of file ORB_Core.inl.

{
  CORBA::Boolean retval = false;
  // @@ If different services have the same feature we may want to
  // prioritise them here. We need to decide here whose selection of
  // profile is more important.
  if (this->ft_service_.service_callback ())
    {
      retval =
        this->ft_service_.service_callback ()->select_profile (mprofile,
                                                                profile);
    }
  return retval;
}

TAO::Invocation_Status TAO_ORB_Core::service_raise_comm_failure ( IOP::ServiceContextList &  clist,
TAO_Profile profile 
)

Raise a comm failure exception if a service is not loaded, else delegate to the service to see what the service has to do for this case.

Definition at line 1786 of file ORB_Core.cpp.

{
  if (this->ft_service_.service_callback ())
    {
      return this->ft_service_.service_callback ()->
                 raise_comm_failure (clist, profile);
    }

  throw ::CORBA::COMM_FAILURE (
    CORBA::SystemException::_tao_minor_code (
      TAO_INVOCATION_RECV_REQUEST_MINOR_CODE,
      errno),
    CORBA::COMPLETED_MAYBE);
}

TAO::Invocation_Status TAO_ORB_Core::service_raise_transient_failure ( IOP::ServiceContextList &  clist,
TAO_Profile profile 
)

Raise a transient failure exception if a service is not loaded, else delegate to the service to see what the service has to do for this case.

Definition at line 1805 of file ORB_Core.cpp.

{
  if (this->ft_service_.service_callback ())
    {
      return
        this->ft_service_.service_callback ()->raise_transient_failure (clist,
                                 profile);
    }

  return TAO::TAO_INVOKE_FAILURE;
}

void TAO_ORB_Core::services_callbacks_init ( void   )  [protected]

Search the Dynamic service list for well known services that has callbacks which can be dynamically loaded.

Definition at line 1775 of file ORB_Core.cpp.

{
  // We (should) know what are the services that would need
  // callbacks. So, what we do is go through the Service Configurator
  // list for looking at the services that we want to load.
  this->ft_service_.init (this);

  // @@ Other service callbacks can be added here
}

void TAO_ORB_Core::set_default ( const char *  orb_id  ) 

Set the ORB related to the orb_id as the default ORB and not the ORB that is first binded in the ORB Table

Definition at line 190 of file ORB_Core.inl.

{
  TAO::ORB_Table * const table = TAO::ORB_Table::instance ();
  table->set_default (orb_id);
}

void TAO_ORB_Core::set_delayed_transport_queueing_strategy ( TAO::Transport_Queueing_Strategy *  strategy  ) 

Definition at line 669 of file ORB_Core.inl.

void TAO_ORB_Core::set_eager_transport_queueing_strategy ( TAO::Transport_Queueing_Strategy *  strategy  ) 

Definition at line 661 of file ORB_Core.inl.

{
  this->eager_transport_queueing_strategy_ = strategy;
}

int TAO_ORB_Core::set_endpoint_helper ( const ACE_CString lane,
const ACE_CString endpoints 
) [protected]

Pointer to the list of protocol loaded into this ORB instance. Helper method to hold the common code part for -ORBEndpoint and -ORBListenEndpoints options.

Definition at line 2714 of file ORB_Core.cpp.

{
  if (this->orb_params ()->add_endpoints (lane, endpoints) != 0)
    {
      ACE_ERROR ((LM_ERROR,
                  ACE_TEXT ("(%P|%t) ")
                  ACE_TEXT ("Invalid endpoint(s) specified: <%C>.\n"),
                  endpoints.c_str ()));
      throw ::CORBA::BAD_PARAM (
        CORBA::SystemException::_tao_minor_code (
          TAO_ORB_CORE_INIT_LOCATION_CODE,
          EINVAL),
        CORBA::COMPLETED_NO);
    }

  return 0;
}

void TAO_ORB_Core::set_gui_resource_factory ( TAO::GUIResource_Factory *  gui_factory  )  [static]

Sets the value of TAO_ORB_Core::gui_resource_factory_.

Sets the value of gui_resource_factory in TSS. ORB_Core is responsible for releasing this factory if needed.

Definition at line 1507 of file ORB_Core.cpp.

{
  if (TAO_TSS_Resources::instance ()->gui_resource_factory_ != 0)
    {
      if (TAO_debug_level > 2)
        {
          ACE_DEBUG ((LM_DEBUG,
                      "TAO (%P|%t) - Deleting old gui_resource_factory.\n"));
        }
      delete TAO_TSS_Resources::instance ()->gui_resource_factory_;
    }

  TAO_TSS_Resources::instance ()->gui_resource_factory_ = gui_resource_factory;
}

void TAO_ORB_Core::set_network_priority_protocols_hooks ( const char *  network_priority_protocols_hooks_name  )  [static]

Sets the value of TAO_ORB_Core::network_priority_protocols_hooks_.

Definition at line 1765 of file ORB_Core.cpp.

{
  // Is synchronization necessary?
  TAO_ORB_Core_Static_Resources::instance ()->
    network_priority_protocols_hooks_name_ =
      network_priority_protocols_hooks_name;
}

void TAO_ORB_Core::set_resource_factory ( const char *  resource_factory_name  )  [static]

Sets the value of TAO_ORB_Core::resource_factory_.

Definition at line 1500 of file ORB_Core.cpp.

void TAO_ORB_Core::set_sync_scope_hook ( Sync_Scope_Hook  hook  ) 

Definition at line 644 of file ORB_Core.inl.

{
  this->sync_scope_hook_ = hook;
}

void TAO_ORB_Core::set_timeout_hook ( Timeout_Hook  hook  ) 

Definition at line 651 of file ORB_Core.inl.

{
  // Saving the hook pointer so that we can use it later when needed.
  this->timeout_hook_ = hook;
}

int TAO_ORB_Core::set_tss_resource ( size_t  slot_id,
void *  ts_object 
)

Set the TSS resource at the given slot. Returns 0 on success, and -1 on failure.

Definition at line 287 of file ORB_Core.inl.

{
  TAO_ORB_Core_TSS_Resources *tss_resources =
    this->get_tss_resources ();

  // The number of allocated slots is equal to the number of
  // registered TSS cleanup functions, *not* the size of the array in
  // the ORB core TSS resources.
  if (slot_id >= this->tss_cleanup_funcs_.size ())
    {
      errno = EINVAL;
      return -1;
    }

  // If the TSS array isn't large enough, then increase its size.
  // We're guaranteed not to exceed the number of allocated slots by
  // the above check.
  const size_t old_size = tss_resources->ts_objects_.size ();
  const size_t new_size = slot_id + 1;
  if (slot_id >= old_size
      && tss_resources->ts_objects_.size (new_size) != 0)
    return -1;

  // Initialize intermediate array elements to zero, since they
  // haven't been initialized yet.  This ensures that garbage is not
  // returned when accessing any of those elements at a later point in
  // time.
  for (size_t i = old_size; i < slot_id; ++i)
    tss_resources->ts_objects_[i] = 0;

  tss_resources->ts_objects_[slot_id] = ts_object;

  // Make sure the ORB core pointer is set in the ORB core's TSS
  // resources so that the TSS cleanup functions stored in the ORB
  // core can be invoked.
  tss_resources->orb_core_ = this;

  return 0;
}

void TAO_ORB_Core::shutdown ( CORBA::Boolean  wait_for_completion  ) 

End the event loop.

Definition at line 2284 of file ORB_Core.cpp.

{
  {
    ACE_GUARD (TAO_SYNCH_MUTEX, monitor, this->lock_);

    if (this->has_shutdown () == true)
      return;

    // Check if we are on the right state, i.e. do not accept
    // shutdowns with the 'wait_for_completion' flag set in the middle
    // of an upcall (because those deadlock).
    this->adapter_registry_.check_close (wait_for_completion);

    // Set the 'has_shutdown' flag, so any further attempt to shutdown
    // becomes a noop.
    this->has_shutdown_ = true;

    // need to release the mutex, because some of the shutdown
    // operations invoke application code, that could (and in practice
    // does!) callback into ORB Core code.
  }

  this->adapter_registry_.close (wait_for_completion);

  // Shutdown reactor.
  this->thread_lane_resources_manager ().shutdown_reactor ();

  // Cleanup transports
  this->thread_lane_resources_manager ().close_all_transports ();
  
  // Grab the thread manager
  ACE_Thread_Manager *tm = this->thr_mgr ();

  // Try to cancel all the threads in the ORB.
  tm->cancel_all ();

  // If <wait_for_completion> is set, wait for all threads to exit.
  if (wait_for_completion == true)
    tm->wait ();

  // Explicitly destroy the valuetype adapter
  {
    ACE_GUARD (TAO_SYNCH_MUTEX, monitor, this->lock_);

    delete this->valuetype_adapter_;
    this->valuetype_adapter_ = 0;
  }

  // Explicitly destroy the object reference table since it
  // contains references to objects, which themselves may contain
  // reference to this ORB.
  this->object_ref_table_.destroy ();

  // Release implrepo_service_ if one existed. If everything went
  // fine then this must release reference from implrepo_service_
  // object to this orb core.
  ::CORBA::release (this->implrepo_service_);
  this->implrepo_service_ = CORBA::Object::_nil ();

#if (TAO_HAS_INTERCEPTORS == 1)
  CORBA::release (this->pi_current_);
  this->pi_current_ = CORBA::Object::_nil ();
#endif  /* TAO_HAS_INTERCEPTORS == 1 */
}

TAO_Stub_Factory * TAO_ORB_Core::stub_factory ( void   ) 

Returns a pointer to the Stub factory.

Definition at line 1727 of file ORB_Core.cpp.

{
  // Check if there is a cached reference.
  if (this->stub_factory_ != 0)
    return this->stub_factory_;

  // If not, look in the service repository for an instance.
  const char *stub_factory_name =
    this->orb_params ()->stub_factory_name ();

  this->stub_factory_ =
    ACE_Dynamic_Service<TAO_Stub_Factory>::instance
      (this->configuration (),
       ACE_TEXT_CHAR_TO_TCHAR (stub_factory_name));

  return this->stub_factory_;
}

ACE_Thread_Manager * TAO_ORB_Core::thr_mgr ( void   ) 

Get the ACE_Thread_Manager.

Definition at line 160 of file ORB_Core.inl.

{
  return &this->tm_;
}

TAO_Thread_Lane_Resources_Manager & TAO_ORB_Core::thread_lane_resources_manager ( void   ) 

Returns a pointer to the Thread Lane Resources Manager.

Definition at line 1611 of file ORB_Core.cpp.

{
  // Check if there is a cached reference.
  if (this->thread_lane_resources_manager_ != 0)
    return *this->thread_lane_resources_manager_;

  // If not, lookup the corresponding factory and ask it to make one.
  const char *thread_lane_resources_manager_factory_name =
    this->orb_params ()->thread_lane_resources_manager_factory_name ();

  TAO_Thread_Lane_Resources_Manager_Factory *factory =
    ACE_Dynamic_Service<TAO_Thread_Lane_Resources_Manager_Factory>::instance
      (this->configuration (),
       ACE_TEXT_CHAR_TO_TCHAR (thread_lane_resources_manager_factory_name));

  this->thread_lane_resources_manager_ =
    factory->create_thread_lane_resources_manager (*this);

  return *this->thread_lane_resources_manager_;
}

int TAO_ORB_Core::thread_per_connection_timeout ( ACE_Time_Value timeout  )  const

Returns the timeout value used by the server threads to poll the shutdown flag. If the return value is zero then the server threads block forever.

Definition at line 340 of file ORB_Core.inl.

ACE_Allocator * TAO_ORB_Core::transport_message_buffer_allocator ( void   ) 

This allocator is always global and has no locks. It is intended for allocating the buffers used to queue messages in transports.

Definition at line 2888 of file ORB_Core.cpp.

void TAO_ORB_Core::tss_cleanup ( ACE_Array_Base< void * > &  ts_objects  ) 

Cleans up ts_objects using the underlying TSS cleanup function registry.

Definition at line 328 of file ORB_Core.inl.

{
  this->tss_cleanup_funcs_.cleanup (ts_objects);
}

const char * TAO_ORB_Core::typecodefactory_adapter_name ( void   )  [static]

Gets the value of TAO_ORB_Core::typecodefactory_adapter_name_.

Definition at line 1553 of file ORB_Core.cpp.

void TAO_ORB_Core::typecodefactory_adapter_name ( const char *  name  )  [static]

Sets the value of TAO_ORB_Core::typecodefactory_adapter_name_.

Definition at line 1547 of file ORB_Core.cpp.

void TAO_ORB_Core::unregister_value_factory ( const char *  repository_id  ) 

Definition at line 3540 of file ORB_Core.cpp.

{
  if (this->valuetype_adapter ())
    {
      ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->lock_);

      if (this->valuetype_adapter_ == 0)
        {
          return;
        }

      // Dont care whther it was successful or not!
      (void) this->valuetype_adapter_->vf_map_unbind (repository_id);
    }
}

CORBA::Boolean TAO_ORB_Core::use_global_collocation ( void   )  const

Set/get the collocation flags.

Definition at line 222 of file ORB_Core.inl.

{
  return this->use_global_collocation_;
}

void TAO_ORB_Core::use_global_collocation ( CORBA::Boolean  opt  ) 

Set/get the collocation flags.

Definition at line 216 of file ORB_Core.inl.

{
  this->use_global_collocation_ = opt;
}

CORBA::Boolean TAO_ORB_Core::use_implrepo ( void   ) 

Do we attempt to register with the Implementation Repository.

Definition at line 359 of file ORB_Core.inl.

{
  return use_implrepo_;
}

TAO_Valuetype_Adapter * TAO_ORB_Core::valuetype_adapter ( void   ) 

Return the valuetype adapter.

Definition at line 3462 of file ORB_Core.cpp.

{
  if (this->valuetype_adapter_ == 0)
    {
      ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
                        ace_mon,
                        this->lock_,
                        0);

      if (this->valuetype_adapter_ == 0)
        {
          try
            {
              TAO_Valuetype_Adapter_Factory * vt_ap_factory =
                ACE_Dynamic_Service<TAO_Valuetype_Adapter_Factory>::instance (
                    TAO_ORB_Core::valuetype_adapter_factory_name ()
                  );

              if (vt_ap_factory)
                {
                  this->valuetype_adapter_ = vt_ap_factory->create ();
                }
            }
          catch (const ::CORBA::Exception& ex)
            {
              ex._tao_print_exception (
                "Cannot initialize the valuetype_adapter\n");
            }
        }

      if (this->valuetype_adapter_ == 0)
        {
           throw ::CORBA::INTERNAL ();
        }
    }

  return this->valuetype_adapter_;
}

const char * TAO_ORB_Core::valuetype_adapter_factory_name ( void   )  [static]
void TAO_ORB_Core::valuetype_adapter_factory_name ( const char *  name  )  [static]
TAO_ZIOP_Adapter * TAO_ORB_Core::ziop_adapter (  )  const

Definition at line 446 of file ORB_Core.inl.

{
  return this->ziop_adapter_;
}

void TAO_ORB_Core::ziop_adapter ( TAO_ZIOP_Adapter adapter  ) 

Definition at line 452 of file ORB_Core.inl.

{
  this->ziop_adapter_ = adapter;
}

TAO_ZIOP_Adapter * TAO_ORB_Core::ziop_adapter_i ( void   ) 

Definition at line 1680 of file ORB_Core.cpp.

{
  // Check if there is a cached reference.
  if (this->ziop_adapter_ != 0)
    return this->ziop_adapter_;

  this->ziop_adapter_ =
    ACE_Dynamic_Service<TAO_ZIOP_Adapter>::instance
      (this->configuration (),
       ACE_TEXT ("ZIOP_Loader"));

  return this->ziop_adapter_;
}


Friends And Related Function Documentation

CORBA::ORB_ptr CORBA::ORB_init ( int &  ,
ACE_TCHAR argv[],
const char *   
) [friend]
friend class TAO_ORB_Core_Auto_Ptr [friend]

Definition at line 162 of file ORB_Core.h.


Member Data Documentation

The list of Adapters used in this ORB.

Definition at line 1159 of file ORB_Core.h.

BiDirectional GIOP factory.

Definition at line 1245 of file ORB_Core.h.

Bir Dir GIOP policy value.

Definition at line 1248 of file ORB_Core.h.

Handle to the factory for Client-side strategies.

Definition at line 1106 of file ORB_Core.h.

TAO::ClientRequestInterceptor_Adapter* TAO_ORB_Core::client_request_interceptor_adapter_ [protected]

The adapter for handling client request interceptors.

Definition at line 1228 of file ORB_Core.h.

The cached IOR for the CodecFactory DLL.

Definition at line 1042 of file ORB_Core.h.

Code Set Manager, received from the Resource Factory.

Definition at line 1260 of file ORB_Core.h.

Definition at line 1022 of file ORB_Core.h.

Default collocation policy. This should never be ORB_CONTROL.

Definition at line 1135 of file ORB_Core.h.

The cached IOR for the Compression DLL.

Definition at line 1045 of file ORB_Core.h.

ORB's service configuration.

Definition at line 1263 of file ORB_Core.h.

ACE_Lock_Adapter<TAO_SYNCH_MUTEX> TAO_ORB_Core::data_block_lock_ [protected]

The data block reference counts are locked using this mutex.

Definition at line 1168 of file ORB_Core.h.

The default policies.

Definition at line 1143 of file ORB_Core.h.

TAO::Transport_Queueing_Strategy* TAO_ORB_Core::delayed_transport_queueing_strategy_ [protected]

This strategy will buffer messages.

Definition at line 1197 of file ORB_Core.h.

The cached object reference for the DynAnyFactory.

Definition at line 1048 of file ORB_Core.h.

TAO::Transport_Queueing_Strategy* TAO_ORB_Core::eager_transport_queueing_strategy_ [protected]

This strategy will buffer messages.

Definition at line 1194 of file ORB_Core.h.

Definition at line 1189 of file ORB_Core.h.

TAO::Transport_Queueing_Strategy* TAO_ORB_Core::flush_transport_queueing_strategy_ [protected]

This strategy will not queue by default, but will flush the queue each time

Definition at line 1201 of file ORB_Core.h.

Hold the flushing strategy.

Definition at line 1257 of file ORB_Core.h.

TRUE transmits a full TAG_FT_GROUP component in place of the FT_GROUP_VERSION context on FT requests. This is contrary to the spec but enables more effective fault tolerant stuff.

Todo:
reference to OMG issue. Default false.

Definition at line 1124 of file ORB_Core.h.

Fault Tolerant service hook.

Definition at line 1117 of file ORB_Core.h.

bool TAO_ORB_Core::has_shutdown_ [protected]

Flag which denotes that the ORB has been shutdown.

Definition at line 1178 of file ORB_Core.h.

The cached IOR for the Implementation Repository.

Definition at line 1030 of file ORB_Core.h.

Flag for whether to put the ImR endpoints into our object refs.

Definition at line 1036 of file ORB_Core.h.

Return InitRefMap to find if a particular object id is present.

Definition at line 1086 of file ORB_Core.h.

IORInterceptor adapter.

Definition at line 1236 of file ORB_Core.h.

The cached object reference for the IORManipulataion.

Definition at line 1051 of file ORB_Core.h.

The cached object reference for the IORTable.

Definition at line 1054 of file ORB_Core.h.

TAO_SYNCH_MUTEX TAO_ORB_Core::lock_ [protected]

Synchronize internal state...

Definition at line 1018 of file ORB_Core.h.

The cached object reference for the Monitor.

Definition at line 1057 of file ORB_Core.h.

Handle to the factory for network_priority_protocols_hooks_..

Definition at line 550 of file ORB_Core.h.

TAO::ObjectKey_Table TAO_ORB_Core::object_key_table_ [protected]

Table that stores the object key instead of caching one per-profile.

Definition at line 1094 of file ORB_Core.h.

Table that maps object key/name to (de-stringified) object reference. It is needed for supporting local objects in the resolve_initial_references() mechanism.

Definition at line 1091 of file ORB_Core.h.

TAO_SYNCH_MUTEX TAO_ORB_Core::open_lock_ [protected]

Mutual exclusion for calling open.

Definition at line 1187 of file ORB_Core.h.

TRUE if we want to take advantage of collocation optimization in this ORB.

Definition at line 1128 of file ORB_Core.h.

Note:
Should we keep a single ORB pointer? This is good because multiple calls to ORB_init() with the same ORBid can use the same object, but maybe don't want so much coupling.

Pointer to the ORB.

Definition at line 1075 of file ORB_Core.h.

Parameters used by the ORB.

Definition at line 1083 of file ORB_Core.h.

char* TAO_ORB_Core::orbid_ [protected]

The ORBid for this ORB.

Definition at line 1097 of file ORB_Core.h.

TAO::ORBInitializer_Registry_Adapter* TAO_ORB_Core::orbinitializer_registry_ [protected]

Registry containing all orb initializers.

Definition at line 1212 of file ORB_Core.h.

The IOR parser registry.

Definition at line 1242 of file ORB_Core.h.

Cached pointer/reference to the PICurrent object.

A pointer/reference to the PICurrent object is cached in the ORB Core since it is accessed in the critical path (i.e. the request invocation path). Caching it prevents additional overhead to due object resolution from occurring.

Definition at line 1225 of file ORB_Core.h.

An optimization for the POA.

Definition at line 1162 of file ORB_Core.h.

POA current.

Definition at line 1156 of file ORB_Core.h.

Policy current.

Definition at line 1146 of file ORB_Core.h.

TAO::PolicyFactory_Registry_Adapter* TAO_ORB_Core::policy_factory_registry_ [protected]

Registry containing all registered policy factories.

Definition at line 1209 of file ORB_Core.h.

The Policy_Manager for this ORB.

Definition at line 1140 of file ORB_Core.h.

Definition at line 1026 of file ORB_Core.h.

Handle to the factory for protocols_hooks_..

Definition at line 547 of file ORB_Core.h.

ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> TAO_ORB_Core::refcount_ [protected]

Number of outstanding references to this object.

Definition at line 1206 of file ORB_Core.h.

The request dispatching strategy.

Definition at line 1151 of file ORB_Core.h.

Handle to the factory for resource information..

Definition at line 1100 of file ORB_Core.h.

Object reference to the root POA. It will eventually be the object reference returned by calls to CORBA::ORB::resolve_initial_references ("RootPOA").

Definition at line 1080 of file ORB_Core.h.

The cached object reference for the RTCORBA::Current interface.

Definition at line 1064 of file ORB_Core.h.

The cached object reference for the RTCORBA::RTORB.

Definition at line 1061 of file ORB_Core.h.

Handle to the factory for Server-side strategies.

Definition at line 1109 of file ORB_Core.h.

The server_id_ that was passed via -ORBServerId option.

Definition at line 1103 of file ORB_Core.h.

TAO::ServerRequestInterceptor_Adapter* TAO_ORB_Core::server_request_interceptor_adapter_ [protected]

The adapter for handling server request interceptors.

Definition at line 1231 of file ORB_Core.h.

Registry containing all service context handlers.

Definition at line 1215 of file ORB_Core.h.

Definition at line 1024 of file ORB_Core.h.

The hook to be set for the SyncScopePolicy.

Definition at line 1266 of file ORB_Core.h.

Definition at line 1020 of file ORB_Core.h.

The value of the timeout if the flag above is not zero.

Definition at line 1183 of file ORB_Core.h.

The value of the timeout if the flag above is not zero.

Definition at line 1182 of file ORB_Core.h.

The hook to be set for the RelativeRoundtripTimeoutPolicy.

Definition at line 1269 of file ORB_Core.h.

The Thread Manager.

Definition at line 1165 of file ORB_Core.h.

TSS Object cleanup functions. These correspond to the TSS objects stored in TAO's TSS resources.

Definition at line 1172 of file ORB_Core.h.

The cached IOR for the TypeCodeFactory DLL.

Definition at line 1039 of file ORB_Core.h.

TRUE if we want to consider all ORBs in this address space collocated.

Definition at line 1132 of file ORB_Core.h.

int TAO_ORB_Core::use_implrepo_ [protected]

Flag for whether the implrepo support is enabled or not.

Definition at line 1033 of file ORB_Core.h.

Definition at line 1013 of file ORB_Core.h.

Pointer to the valuetype adapter.

Definition at line 1239 of file ORB_Core.h.

ZIOP Adapter.

Definition at line 1251 of file ORB_Core.h.

ZIOP enabled or not.

Definition at line 1254 of file ORB_Core.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines