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.

Collocation Strategies

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

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
 ORB_CONTROL
 THRU_POA
 Collocated calls will go thru POA.
 DIRECT
 Collocated calls invoke operation on Servant directly.

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_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)
TAO_Cleanup_Func_Registrytss_cleanup_funcs (void)
 Return 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.
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)
int register_handle (ACE_HANDLE handle)
int remove_handle (ACE_HANDLE handle)
TAO_Valuetype_Adaptervaluetype_adapter (void)
 Return the valuetype adapter.
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.
TAO::Transport_Queueing_Strategy * default_transport_queueing_strategy (void)
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_Strategyfragmentation_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)
void service_context_list (TAO_Stub *stub, TAO_Service_Context &service_context, CORBA::Boolean retstart)
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.

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_
TAO::Transport_Queueing_Strategy * default_transport_queueing_strategy_
 This strategy will not queue by default and not flush.
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_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_Gestaltconfig_
 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 ORB_init (int &, char *argv[], const char *)

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 159 of file ORB_Core.h.


Member Typedef Documentation

typedef ACE_Array_Map<ACE_CString, ACE_CString> TAO_ORB_Core::InitRefMap

Definition at line 860 of file ORB_Core.h.

typedef void(*) TAO_ORB_Core::Sync_Scope_Hook(TAO_ORB_Core *, TAO_Stub *, bool &, Messaging::SyncScope &)

Definition at line 529 of file ORB_Core.h.

typedef void(*) TAO_ORB_Core::Timeout_Hook(TAO_ORB_Core *, TAO_Stub *, bool &, ACE_Time_Value &)

Define the Timeout_Hook signature.

Definition at line 470 of file ORB_Core.h.


Member Enumeration Documentation

anonymous enum

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 226 of file ORB_Core.h.

00227   {
00228     /// Indicate object should refer to ORB for either one of the
00229     /// following strategies.
00230     ORB_CONTROL,
00231 
00232     /// Collocated calls will go thru POA.
00233     THRU_POA,
00234 
00235     /// Collocated calls invoke operation on Servant directly.
00236     DIRECT
00237   };


Constructor & Destructor Documentation

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

Constructor.

Definition at line 183 of file ORB_Core.cpp.

References ACE_NEW, and TAO_POLICY_ORB_SCOPE.

00185   : protocols_hooks_ (0),
00186     network_priority_protocols_hooks_ (0),
00187 #if TAO_USE_LOCAL_MEMORY_POOL == 1
00188     use_local_memory_pool_ (true),
00189 #else
00190     use_local_memory_pool_ (false),
00191 #endif
00192     lock_ (),
00193     thread_lane_resources_manager_ (0),
00194     collocation_resolver_ (0),
00195     stub_factory_ (0),
00196     protocol_factories_ (0),
00197     implrepo_service_ (CORBA::Object::_nil ()),
00198     use_implrepo_ (0),
00199     imr_endpoints_in_ior_ (1),
00200     typecode_factory_ (CORBA::Object::_nil ()),
00201     codec_factory_ (CORBA::Object::_nil ()),
00202     compression_manager_ (CORBA::Object::_nil ()),
00203     dynany_factory_ (CORBA::Object::_nil ()),
00204     ior_manip_factory_ (CORBA::Object::_nil ()),
00205     ior_table_ (CORBA::Object::_nil ()),
00206     monitor_ (CORBA::Object::_nil ()),
00207     orb_ (CORBA::ORB::_nil ()),
00208     root_poa_ (),
00209     orb_params_ (),
00210     init_ref_map_ (TAO_DEFAULT_OBJECT_REF_TABLE_SIZE),
00211     object_ref_table_ (),
00212     object_key_table_ (),
00213     orbid_ (ACE_OS::strdup (orbid ? orbid : "")),
00214     resource_factory_ (0),
00215     client_factory_ (0),
00216     server_factory_ (0),
00217     ft_send_extended_sc_ (false),
00218     opt_for_collocation_ (true),
00219     use_global_collocation_ (true),
00220     collocation_strategy_ (THRU_POA),
00221 
00222 #if (TAO_HAS_CORBA_MESSAGING == 1)
00223 
00224     policy_manager_ (0),
00225     default_policies_ (0),
00226     policy_current_ (0),
00227 
00228 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
00229 
00230     poa_current_ (),
00231     adapter_registry_ (this),
00232     poa_adapter_ (0),
00233     tm_ (),
00234     tss_cleanup_funcs_ (),
00235     tss_resources_ (),
00236     has_shutdown_ (true),  // Start the ORB in a  "shutdown" state.  Only
00237                            // after CORBA::ORB_init() is called will the
00238                            // ORB no longer be shutdown.  This does not
00239                            // mean that the ORB can be reinitialized.  It
00240                            // can only be initialized once.
00241     thread_per_connection_use_timeout_ (1),
00242     open_lock_ (),
00243     endpoint_selector_factory_ (0),
00244 #if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)
00245     eager_transport_queueing_strategy_ (0),
00246     delayed_transport_queueing_strategy_ (0),
00247     flush_transport_queueing_strategy_ (0),
00248 #endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */
00249     refcount_ (1),
00250     policy_factory_registry_ (0),
00251     orbinitializer_registry_ (0),
00252 #if (TAO_HAS_INTERCEPTORS == 1)
00253     pi_current_ (CORBA::Object::_nil ()),
00254     client_request_interceptor_adapter_ (0),
00255     server_request_interceptor_adapter_ (0),
00256 #endif  /* TAO_HAS_INTERCEPTORS == 1 */
00257     ior_interceptor_adapter_ (0),
00258     valuetype_adapter_ (0),
00259     parser_registry_ (),
00260     bidir_adapter_ (0),
00261     bidir_giop_policy_ (0),
00262     flushing_strategy_ (0),
00263     codeset_manager_ (0),
00264     config_ (gestalt),
00265     sync_scope_hook_ (0),
00266     timeout_hook_ (0)
00267 {
00268 #if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)
00269 
00270   ACE_NEW (this->flush_transport_queueing_strategy_,
00271            TAO::Flush_Transport_Queueing_Strategy);
00272 
00273 #endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */
00274 
00275 #if (TAO_HAS_CORBA_MESSAGING == 1)
00276 
00277   ACE_NEW (this->policy_manager_,
00278            TAO_Policy_Manager);
00279 
00280   ACE_NEW (this->default_policies_,
00281            TAO_Policy_Set (TAO_POLICY_ORB_SCOPE));
00282 
00283   ACE_NEW (this->policy_current_,
00284            TAO_Policy_Current);
00285 
00286 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
00287 
00288   // Initialize the default request dispatcher.
00289   ACE_NEW (this->request_dispatcher_,
00290            TAO_Request_Dispatcher);
00291 
00292 }

TAO_ORB_Core::~TAO_ORB_Core ( void   )  [protected]

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

Definition at line 294 of file ORB_Core.cpp.

References TAO::ORB::close_services(), codeset_manager_, default_policies_, delayed_transport_queueing_strategy_, eager_transport_queueing_strategy_, flush_transport_queueing_strategy_, flushing_strategy_, ACE_OS::free(), orb_, orbinitializer_registry_, policy_current_, policy_factory_registry_, policy_manager_, CORBA::release(), request_dispatcher_, and thread_lane_resources_manager_.

00295 {
00296   delete this->thread_lane_resources_manager_;
00297 
00298   delete this->flushing_strategy_;
00299 
00300   ACE_OS::free (this->orbid_);
00301 
00302 #if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)
00303 
00304   delete this->eager_transport_queueing_strategy_;
00305   delete this->delayed_transport_queueing_strategy_;
00306   delete this->flush_transport_queueing_strategy_;
00307 
00308 #endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */
00309 
00310 #if (TAO_HAS_CORBA_MESSAGING == 1)
00311 
00312   ::CORBA::release (this->policy_manager_);
00313   delete this->default_policies_;
00314   ::CORBA::release (this->policy_current_);
00315 
00316 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
00317 
00318   delete this->request_dispatcher_;
00319 
00320   delete this->policy_factory_registry_;
00321 
00322   // Don't delete, is a process wide singleton shared by all orbs
00323   orbinitializer_registry_ = 0;
00324 
00325   ::CORBA::release (this->orb_);
00326 
00327   delete this->codeset_manager_;
00328   this->codeset_manager_ = 0;
00329 
00330   // This will destroy the service repository for this core
00331   (void) TAO::ORB::close_services (this->config_);
00332 
00333 }

TAO_ORB_Core::TAO_ORB_Core ( const TAO_ORB_Core  )  [private]

The ORB Core should not be copied.


Member Function Documentation

ACE_INLINE unsigned long TAO_ORB_Core::_decr_refcnt ( void   ) 

Definition at line 23 of file ORB_Core.inl.

References fini(), and refcount_.

00024 {
00025   unsigned long count = --this->refcount_;
00026   if (count != 0)
00027     return count;
00028 
00029   this->fini ();
00030   return 0;
00031 }

ACE_INLINE unsigned long TAO_ORB_Core::_incr_refcnt ( void   ) 

Reference counting...

Definition at line 17 of file ORB_Core.inl.

References refcount_.

Referenced by TAO::ORB_Table::find(), and TAO::Collocated_Invocation::invoke().

00018 {
00019   return this->refcount_++;
00020 }

TAO_ORB_Core::ACE_TSS_TYPE ( TAO_ORB_Core_TSS_Resources   )  [protected]

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

ACE_INLINE TAO_Adapter_Registry * TAO_ORB_Core::adapter_registry ( void   ) 

Get the adapter registry.

Definition at line 166 of file ORB_Core.inl.

References adapter_registry_.

Referenced by create_object(), TAO_Request_Dispatcher::dispatch(), and initialize_object_i().

00167 {
00168   return &this->adapter_registry_;
00169 }

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

Register an IOR interceptor.

Definition at line 3138 of file ORB_Core.cpp.

References ACE_ERROR, ACE_TEXT, and LM_ERROR.

03140 {
03141   if (this->ior_interceptor_adapter ())
03142     {
03143       this->ior_interceptor_adapter_->add_interceptor (interceptor);
03144     }
03145   else
03146     {
03147       ACE_ERROR ((LM_ERROR,
03148                   ACE_TEXT ("TAO (%P|%t) %p\n"),
03149                   ACE_TEXT ("ERROR: ORB Core unable to find the ")
03150                   ACE_TEXT ("IORInterceptor Adapter Factory instance")));
03151 
03152       throw ::CORBA::INTERNAL ();
03153     }
03154 }

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

Register a server request interceptor with policies.

Definition at line 3288 of file ORB_Core.cpp.

References ACE_ERROR, ACE_TEXT, and LM_ERROR.

03291 {
03292   if (this->serverrequestinterceptor_adapter_i ())
03293     {
03294       this->server_request_interceptor_adapter_->add_interceptor (
03295         interceptor,
03296         policies);
03297 
03298     }
03299   else
03300     {
03301       ACE_ERROR ((LM_ERROR,
03302                   ACE_TEXT ("TAO (%P|%t) %p\n"),
03303                   ACE_TEXT ("ERROR: ORB Core unable to find the ")
03304                   ACE_TEXT ("Server Request Interceptor Adapter Factory ")
03305                   ACE_TEXT ("instance")));
03306 
03307       throw ::CORBA::INTERNAL ();
03308     }
03309 }

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

Register a client request interceptor with policies.

Definition at line 3264 of file ORB_Core.cpp.

References ACE_ERROR, ACE_TEXT, and LM_ERROR.

03267 {
03268   if (this->clientrequestinterceptor_adapter_i ())
03269     {
03270       this->client_request_interceptor_adapter_->add_interceptor (
03271         interceptor,
03272         policies);
03273 
03274     }
03275   else
03276     {
03277       ACE_ERROR ((LM_ERROR,
03278                   ACE_TEXT ("TAO (%P|%t) %p\n"),
03279                   ACE_TEXT ("ERROR: ORB Core unable to find the ")
03280                   ACE_TEXT ("Client Request Interceptor Adapter Factory ")
03281                   ACE_TEXT ("instance")));
03282 
03283       throw ::CORBA::INTERNAL ();
03284     }
03285 }

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

Register a server request interceptor.

Definition at line 3243 of file ORB_Core.cpp.

References ACE_ERROR, ACE_TEXT, and LM_ERROR.

03246 {
03247   if (this->serverrequestinterceptor_adapter_i ())
03248     {
03249       this->server_request_interceptor_adapter_->add_interceptor (interceptor);
03250     }
03251   else
03252     {
03253       ACE_ERROR ((LM_ERROR,
03254                   ACE_TEXT ("TAO (%P|%t) %p\n"),
03255                   ACE_TEXT ("ERROR: ORB Core unable to find the ")
03256                   ACE_TEXT ("Server Request Interceptor Adapter Factory ")
03257                   ACE_TEXT ("instance")));
03258 
03259       throw ::CORBA::INTERNAL ();
03260     }
03261 }

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

Register a client request interceptor.

Definition at line 3194 of file ORB_Core.cpp.

References ACE_ERROR, ACE_TEXT, and LM_ERROR.

03197 {
03198   if (this->clientrequestinterceptor_adapter_i ())
03199     {
03200       this->client_request_interceptor_adapter_->add_interceptor (interceptor);
03201     }
03202   else
03203     {
03204       ACE_ERROR ((LM_ERROR,
03205                   ACE_TEXT ("TAO (%P|%t) %p\n"),
03206                   ACE_TEXT ("ERROR: ORB Core unable to find the ")
03207                   ACE_TEXT ("Client Request Interceptor Adapter Factory ")
03208                   ACE_TEXT ("instance")));
03209 
03210       throw ::CORBA::INTERNAL ();
03211     }
03212 }

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 2939 of file ORB_Core.cpp.

References TAO_Cleanup_Func_Registry::register_cleanup_function(), and tss_cleanup_funcs_.

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

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

Definition at line 49 of file ORB_Core.inl.

References bidir_giop_policy_.

00050 {
00051   this->bidir_giop_policy_ = val;
00052 }

ACE_INLINE 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 43 of file ORB_Core.inl.

References bidir_giop_policy_.

00044 {
00045   return this->bidir_giop_policy_;
00046 }

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

Definition at line 2889 of file ORB_Core.cpp.

References sync_scope_hook_.

Referenced by TAO::Invocation_Adapter::set_response_flags().

02892 {
02893   Sync_Scope_Hook sync_scope_hook = this->sync_scope_hook_;
02894 
02895   if (sync_scope_hook == 0)
02896     {
02897       has_synchronization = false;
02898       return;
02899     }
02900 
02901   (*sync_scope_hook) (this, stub, has_synchronization, scope);
02902 }

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 2945 of file ORB_Core.cpp.

References timeout_hook_.

Referenced by TAO::LocateRequest_Invocation_Adapter::get_timeout(), and TAO::Invocation_Adapter::get_timeout().

02948 {
02949   Timeout_Hook timeout_hook = this->timeout_hook_;
02950 
02951   if (timeout_hook == 0)
02952     {
02953       has_timeout = false;
02954       return;
02955     }
02956   (*timeout_hook) (this, stub, has_timeout, time_value);
02957 }

void TAO_ORB_Core::check_shutdown ( void   ) 

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

Definition at line 2278 of file ORB_Core.cpp.

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

02279 {
02280   if (this->has_shutdown ())
02281     {
02282       // As defined by the CORBA 2.3 specification, throw a
02283       // CORBA::BAD_INV_ORDER exception with minor code 4 if the ORB
02284       // has shutdown by the time an ORB function is called.
02285 
02286       throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
02287     }
02288 }

TAO_Client_Strategy_Factory * TAO_ORB_Core::client_factory ( void   ) 

Returns pointer to the client factory.

Definition at line 1733 of file ORB_Core.cpp.

References ACE_TEXT, client_factory_, and ACE_Dynamic_Service< TYPE >::instance().

Referenced by TAO_Connector::create_connect_strategy(), TAO::Transport_Cache_Manager::find_transport(), TAO_Muxed_TMS::TAO_Muxed_TMS(), TAO_Transport::TAO_Transport(), and TAO::Profile_Transport_Resolver::use_parallel_connect().

01734 {
01735   if (this->client_factory_ == 0)
01736     {
01737       // Look in the service repository for an instance.
01738       this->client_factory_ =
01739         ACE_Dynamic_Service<TAO_Client_Strategy_Factory>::instance
01740           (this->configuration (),
01741            ACE_TEXT ("Client_Strategy_Factory"));
01742     }
01743 
01744   return this->client_factory_;
01745 }

ACE_INLINE 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 592 of file ORB_Core.inl.

References client_request_interceptor_adapter_.

00593 {
00594   return this->client_request_interceptor_adapter_;
00595 }

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 3215 of file ORB_Core.cpp.

References ACE_GUARD_RETURN, ACE_TEXT, client_request_interceptor_adapter_, TAO_ClientRequestInterceptor_Adapter_Factory::create(), ACE_Dynamic_Service< TYPE >::instance(), and TAO_SYNCH_MUTEX.

03216 {
03217   if (this->client_request_interceptor_adapter_ == 0)
03218     {
03219       ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
03220                         ace_mon,
03221                         this->lock_,
03222                         0);
03223 
03224       if (this->client_request_interceptor_adapter_ == 0)
03225         {
03226           TAO_ClientRequestInterceptor_Adapter_Factory *factory =
03227             ACE_Dynamic_Service<TAO_ClientRequestInterceptor_Adapter_Factory>::instance
03228               (this->configuration (),
03229                ACE_TEXT ("ClientRequestInterceptor_Adapter_Factory"));
03230 
03231           if (factory)
03232             {
03233               this->client_request_interceptor_adapter_ =
03234                 factory->create ();
03235             }
03236         }
03237     }
03238 
03239   return this->client_request_interceptor_adapter_;
03240 }

ACE_INLINE TAO_Codeset_Manager * TAO_ORB_Core::codeset_manager ( void   ) 

Get Code Set Manager.

Definition at line 423 of file ORB_Core.inl.

References TAO_Resource_Factory::codeset_manager(), codeset_manager_, TAO_ORB_Parameters::negotiate_codesets(), orb_params(), and resource_factory().

Referenced by TAO_Transport::generate_request_header(), and TAO_GIOP_Message_Base::process_request().

00424 {
00425   if (this->orb_params()->negotiate_codesets() == 0)
00426     return 0;
00427   if (this->codeset_manager_ == 0)
00428     {
00429       // This causes a factory to be loaded which will call
00430       // the codeset_manager setter in this thread.
00431       this->codeset_manager_ =
00432         this->resource_factory()->codeset_manager();
00433       if (this->codeset_manager_ == 0)
00434         this->orb_params()->negotiate_codesets(false);
00435     }
00436   return this->codeset_manager_;
00437 }

TAO_Collocation_Resolver & TAO_ORB_Core::collocation_resolver ( void   ) 

Returns a pointer to the Collocation Resolver.

Definition at line 1540 of file ORB_Core.cpp.

References ACE_TEXT_CHAR_TO_TCHAR, collocation_resolver_, and ACE_Dynamic_Service< TYPE >::instance().

01541 {
01542   // Check if there is a cached reference.
01543   if (this->collocation_resolver_ != 0)
01544     return *this->collocation_resolver_;
01545 
01546   // If not, lookup it up.
01547   this->collocation_resolver_ =
01548     ACE_Dynamic_Service<TAO_Collocation_Resolver>::instance
01549       (this->configuration (),
01550        ACE_TEXT_CHAR_TO_TCHAR (this->orb_params ()->collocation_resolver_name ()));
01551 
01552   return *this->collocation_resolver_;
01553 }

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 3421 of file ORB_Core.cpp.

References CORBA::Object::_servant(), CORBA::Object::_stubobj(), ACE_ASSERT, DIRECT, TAO_Pseudo_Var_T< T >::in(), CORBA::is_nil(), TAO_Stub::servant_orb_var(), TAO::TAO_CS_DIRECT_STRATEGY, TAO::TAO_CS_REMOTE_STRATEGY, TAO::TAO_CS_THRU_POA_STRATEGY, and THRU_POA.

Referenced by TAO::Invocation_Adapter::invoke_i().

03422 {
03423   TAO_Stub *stub = object->_stubobj ();
03424   if (!CORBA::is_nil (stub->servant_orb_var ().in ()) &&
03425       stub->servant_orb_var ()->orb_core () != 0)
03426     {
03427       TAO_ORB_Core *orb_core =
03428         stub->servant_orb_var ()->orb_core ();
03429 
03430       const int collocated =
03431         orb_core->collocation_resolver ().is_collocated (object);
03432 
03433       if (collocated)
03434         {
03435           switch (stub->servant_orb_var ()->orb_core ()->get_collocation_strategy ())
03436             {
03437             case THRU_POA:
03438               return TAO::TAO_CS_THRU_POA_STRATEGY;
03439 
03440             case DIRECT:
03441               {
03442                 /////////////////////////////////////////////////////////////
03443                 // If the servant is null and you are collocated this means
03444                 // that the POA policy NON-RETAIN is set, and with that policy
03445                 // using the DIRECT collocation strategy is just insane.
03446                 /////////////////////////////////////////////////////////////
03447                 ACE_ASSERT (object->_servant () != 0);
03448                 return TAO::TAO_CS_DIRECT_STRATEGY;
03449               }
03450             }
03451         }
03452     }
03453 
03454   // In this case the Object is a client.
03455   return TAO::TAO_CS_REMOTE_STRATEGY;
03456 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_Service_Gestalt * TAO_ORB_Core::configuration (  )  const

Configuration accessor method.

Definition at line 11 of file ORB_Core.inl.

References config_, and ACE_Intrusive_Auto_Ptr< X >::get().

Referenced by TAO::LocateRequest_Invocation_Adapter::invoke(), TAO::Invocation_Adapter::invoke_i(), TAO_Parser_Registry::open(), orbinitializer_registry_i(), TAO_DLL_Parser::parse_string(), policy_factory_registry_i(), resolve_codecfactory_i(), resolve_compression_manager_i(), resolve_dynanyfactory_i(), resolve_ior_table_i(), resolve_iormanipulation_i(), resolve_monitor_i(), resolve_picurrent_i(), resolve_poa_current_i(), resolve_typecodefactory_i(), and root_poa().

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

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 2960 of file ORB_Core.cpp.

References TAO_ORB_Core_Static_Resources::alt_connection_timeout_hook_, connection_timeout_hook(), TAO_ORB_Core_Static_Resources::connection_timeout_hook_, TAO_ORB_Core_Static_Resources::instance(), and ACE_Time_Value::zero.

Referenced by TAO::Profile_Transport_Resolver::get_connection_timeout().

02963 {
02964   Timeout_Hook connection_timeout_hook =
02965     TAO_ORB_Core_Static_Resources::instance ()->connection_timeout_hook_;
02966 
02967   if (connection_timeout_hook == 0)
02968     {
02969       has_timeout = false;
02970       return;
02971     }
02972 
02973   (*connection_timeout_hook) (this, stub, has_timeout, time_value);
02974 
02975   Timeout_Hook alt_connection_timeout_hook =
02976     TAO_ORB_Core_Static_Resources::instance ()->alt_connection_timeout_hook_;
02977 
02978   if (alt_connection_timeout_hook == 0)
02979     return;
02980 
02981   if (!has_timeout || time_value == ACE_Time_Value::zero )
02982     {
02983       (*alt_connection_timeout_hook) (this, stub, has_timeout,time_value);
02984       return;
02985     }
02986 
02987   // At this point, both the primary and alternate hooks are defined, and
02988   // the primary did indeed set a value
02989   ACE_Time_Value tv1;
02990   bool ht1;
02991   (*alt_connection_timeout_hook) (this, stub, ht1,tv1);
02992   if (ht1 && tv1 > ACE_Time_Value::zero && tv1 < time_value)
02993     time_value = tv1;
02994 }

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 2997 of file ORB_Core.cpp.

References ACE_DEBUG, ACE_TEXT, LM_DEBUG, TAO_debug_level, and TOCSRi.

Referenced by connection_timeout().

02998 {
02999   // Saving the hook pointer so that we can use it later when needed.
03000   // For now there are only two entry points that may supply a connection
03001   // timeout hook. But there might be future entry points, so this should
03002   // probably be addressed by a more sophisticated mechanism.
03003 
03004 #define TOCSRi TAO_ORB_Core_Static_Resources::instance ()
03005 
03006   // A consern was raised that since this function is called by two
03007   // different initializers there may be a race condition that might
03008   // require a lock. We are not using a lock at this time because of
03009   // two callers, one happens only during service directive processing
03010   // and the other only during ORB Initialization time. The former
03011   // happens when the OC_Endpoint_Selector_Factory is loaded, the
03012   // latter is part of the messaging library. The messaging library
03013   // calls this function as part of pre_init processing, and this call
03014   // happes for every ORB instance. This was the case before these The
03015   // latter call occurs when the messaging library is loaded. The
03016   // redundant calls occured then as well. Second, it isn't clear how
03017   // a lock in this static method would react in the face of windows
03018   // dlls, shared memory segments, etc. Therefore we are continuing to
03019   // keep this code lockless as it always was, assuming no
03020   // simultanious overwrite will occur.
03021 
03022   if (TOCSRi->connection_timeout_hook_ == 0)
03023     {
03024       if (TAO_debug_level > 2)
03025         {
03026           ACE_DEBUG ((LM_DEBUG,
03027                       ACE_TEXT("TAO (%P|%t) setting primary hook\n")));
03028         }
03029       TOCSRi->connection_timeout_hook_ = hook;
03030     }
03031   else if (TOCSRi->connection_timeout_hook_ != hook &&
03032            TOCSRi->alt_connection_timeout_hook_ == 0)
03033     {
03034       if (TAO_debug_level > 2)
03035         {
03036           ACE_DEBUG ((LM_DEBUG,
03037                       ACE_TEXT("TAO (%P|%t) setting alternate hook\n")));
03038         }
03039       TOCSRi->alt_connection_timeout_hook_ = hook;
03040     }
03041   else
03042     if (TAO_debug_level > 2)
03043       {
03044         ACE_DEBUG ((LM_DEBUG,
03045                     ACE_TEXT ("TAO (%P|%t) not overwriting alternate hook.")
03046                     ACE_TEXT (" Is it still null? %d\n"),
03047                     TOCSRi->alt_connection_timeout_hook_ == 0));
03048       }
03049 
03050 #undef TOCSRi
03051 }

TAO_Connector_Registry * TAO_ORB_Core::connector_registry ( void   ) 

Get the connector registry.

Definition at line 2835 of file ORB_Core.cpp.

References TAO_Thread_Lane_Resources::connector_registry(), and lane_resources().

Referenced by operator>>(), TAO_CORBALOC_Parser::parse_string(), resolve_rir(), CORBA::Object::tao_object_initialize(), TAO::Profile_Transport_Resolver::try_connect_i(), and CORBA::ORB::url_ior_string_to_object().

02836 {
02837   TAO_Connector_Registry *conn =
02838     this->lane_resources ().connector_registry ();
02839 
02840   return conn;
02841 }

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 2811 of file ORB_Core.cpp.

References ACE_NEW_MALLOC_RETURN, ACE_Allocator::malloc(), and ACE_Message_Block::MB_DATA.

Referenced by create_input_cdr_data_block().

02815 {
02816   ACE_Data_Block *nb = 0;
02817 
02818   ACE_NEW_MALLOC_RETURN (
02819                          nb,
02820                          static_cast<ACE_Data_Block*> (
02821                            dblock_allocator->malloc (sizeof (ACE_Data_Block))),
02822                          ACE_Data_Block (size,
02823                                          ACE_Message_Block::MB_DATA,
02824                                          0,
02825                                          buffer_allocator,
02826                                          lock_strategy,
02827                                          0,
02828                                          dblock_allocator),
02829                          0);
02830 
02831   return nb;
02832 }

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 2787 of file ORB_Core.cpp.

References create_data_block_i(), input_cdr_buffer_allocator(), and input_cdr_dblock_allocator().

Referenced by TAO_GIOP_Message_Base::make_queued_data().

02788 {
02789 
02790   ACE_Allocator *dblock_allocator = 0;
02791   ACE_Allocator *buffer_allocator = 0;
02792 
02793   dblock_allocator =
02794     this->input_cdr_dblock_allocator ();
02795   buffer_allocator =
02796     this->input_cdr_buffer_allocator ();
02797 
02798   ACE_Lock* lock_strategy = 0;
02799   if (this->resource_factory ()->use_locked_data_blocks ())
02800     {
02801       lock_strategy = &this->data_block_lock_;
02802     }
02803 
02804   return this->create_data_block_i (size,
02805                                     buffer_allocator,
02806                                     dblock_allocator,
02807                                     lock_strategy);
02808 }

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 1900 of file ORB_Core.cpp.

References CORBA::Object::_nil(), ACE_GUARD_RETURN, ACE_NEW_RETURN, adapter_registry(), TAO_Stub::base_profiles(), TAO_ORB_Core_Auto_Ptr::get(), and TAO_SYNCH_MUTEX.

Referenced by TAO_CORBALOC_Parser::make_stub_from_mprofile(), operator>>(), and CORBA::ORB::url_ior_string_to_object().

01901 {
01902   // @@ What about forwarding.  With this approach we are never forwarded
01903   //    when we use collocation!
01904   const TAO_MProfile &mprofile = stub->base_profiles ();
01905 
01906   // @@ We should thow CORBA::NO_MEMORY in platforms with exceptions,
01907   // but we are stuck in platforms without exceptions!
01908   TAO_ORB_Core_Auto_Ptr collocated_orb_core;
01909   CORBA::Object_ptr x = 0;
01910 
01911   {
01912     // Lock the ORB_Table against concurrent modification while we
01913     // iterate through the ORBs.
01914     ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
01915                       guard,
01916                       TAO::ORB_Table::instance()->lock (),
01917                       CORBA::Object::_nil ());
01918 
01919     TAO::ORB_Table * const table = TAO::ORB_Table::instance ();
01920     TAO::ORB_Table::iterator const end = table->end ();
01921     for (TAO::ORB_Table::iterator i = table->begin (); i != end; ++i)
01922       {
01923         ::TAO_ORB_Core * const other_core = (*i).second.core ();
01924 
01925         if (this->is_collocation_enabled (other_core, mprofile))
01926           {
01927             other_core->_incr_refcnt();
01928              TAO_ORB_Core_Auto_Ptr tmp_auto_ptr (other_core);
01929              collocated_orb_core = tmp_auto_ptr;
01930             break;
01931           }
01932       }
01933   }
01934 
01935   if (collocated_orb_core.get ())
01936     {
01937       TAO_Adapter_Registry *ar =
01938         collocated_orb_core.get ()->adapter_registry ();
01939 
01940       x = ar->create_collocated_object (stub, mprofile);
01941     }
01942 
01943 
01944   if (!x)
01945     {
01946       // The constructor sets the proxy broker as the
01947       // Remote one.
01948       ACE_NEW_RETURN (x,
01949                       CORBA::Object (stub, 0),
01950                       0);
01951     }
01952 
01953   return x;
01954 }

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 1833 of file ORB_Core.cpp.

References TAO_Stub_Factory::create_stub(), and stub_factory().

Referenced by create_stub_object(), TAO_CORBALOC_Parser::make_stub_from_mprofile(), operator>>(), CORBA::Object::tao_object_initialize(), and CORBA::ORB::url_ior_string_to_object().

01835 {
01836   TAO_Stub *retval =
01837     this->stub_factory ()->create_stub (repository_id, profiles, this);
01838   return retval;
01839 }

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 1851 of file ORB_Core.cpp.

References TAO_Stub::base_profiles(), create_stub(), TAO_MProfile::get_profile(), TAO_Profile::policies(), TAO_MProfile::policy_list(), and TAO_MProfile::profile_count().

01854 {
01855   // Add the Polices contained in "policy_list" to each profile so
01856   // that those policies will be exposed to the client in the IOR.  In
01857   // particular each CORBA::Policy has to be converted in to
01858   // Messaging::PolicyValue, and then all the Messaging::PolicyValue
01859   // should be embedded inside a Messaging::PolicyValueSeq which
01860   // became in turns the "body" of the IOP::TaggedComponent. This
01861   // conversion is a responsability of the CORBA::Profile class.  (See
01862   // orbos\98-05-05.pdf Section 5.4)
01863   if (policy_list->length () != 0)
01864     {
01865       TAO_Profile * profile = 0;
01866 
01867       CORBA::ULong const count = mprofile.profile_count ();
01868       for (CORBA::ULong i = 0; i < count; ++i)
01869         {
01870           // Get the ith profile
01871           profile = mprofile.get_profile (i);
01872           profile->policies (policy_list);
01873         }
01874     }
01875 
01876   /// Initialize a TAO_Stub object with the mprofile thats passed.
01877   TAO_Stub *stub = this->create_stub (type_id, mprofile);
01878 
01879   stub->base_profiles ().policy_list (policy_list);
01880 
01881   return stub;
01882 }

void TAO_ORB_Core::default_environment ( CORBA::Environment  ) 

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 3132 of file ORB_Core.cpp.

References TAO_TSS_Resources::default_environment_, and TAO_TSS_Resources::instance().

03133 {
03134   TAO_TSS_Resources::instance ()->default_environment_ = env;
03135 }

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 3126 of file ORB_Core.cpp.

References TAO_TSS_Resources::default_environment_, and TAO_TSS_Resources::instance().

Referenced by CORBA::Environment::default_environment(), CORBA::Environment::Environment(), and CORBA::Environment::~Environment().

03127 {
03128   return TAO_TSS_Resources::instance ()->default_environment_;
03129 }

TAO::Transport_Queueing_Strategy* TAO_ORB_Core::default_transport_queueing_strategy ( void   ) 

This strategy is the default, no explicit queueing and no explicit flush

void TAO_ORB_Core::destroy ( void   ) 

Shutdown the ORB and free resources.

Definition at line 2251 of file ORB_Core.cpp.

References destroy_interceptors(), and shutdown().

Referenced by CORBA::ORB::destroy().

02252 {
02253   // All destroy() should do is (a) call shutdown() and (b) unbind()
02254   // from the ORB table.  Nothing else should really be added to this
02255   // method.  Everything else should go to the shutdown() method.
02256   // Remember when the ORB Core is finally removed from the ORB table,
02257   // the reference count goes to zero and fini() is called.  fini()
02258   // calls shutdown() and does not call destroy() since destroy() will
02259   // try to unbind from the ORB table again.  Additional code should
02260   // not be added to destroy() since there is no guarantee that
02261   // orb->destroy() will ever be called by the user.  Since TAO
02262   // guarantees that shutdown() will be called, all cleanup code
02263   // should go there.
02264   //
02265 
02266   // Shutdown the ORB and block until the shutdown is complete.
02267   this->shutdown (1);
02268 
02269   // Invoke Interceptor::destroy() on all registered interceptors.
02270   this->destroy_interceptors ();
02271 
02272   // Now remove it from the ORB table so that it's ORBid may be
02273   // reused.
02274   TAO::ORB_Table::instance ()->unbind (this->orbid_);
02275 }

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 2291 of file ORB_Core.cpp.

References ACE_DEBUG, ACE_GUARD, ACE_TEXT, client_request_interceptor_adapter_, TAO_IORInterceptor_Adapter::destroy_interceptors(), ior_interceptor_adapter_, LM_DEBUG, server_request_interceptor_adapter_, TAO_debug_level, and TAO_SYNCH_MUTEX.

Referenced by destroy().

02292 {
02293   try
02294     {
02295       ACE_GUARD (TAO_SYNCH_MUTEX, monitor, this->lock_);
02296 
02297 #if TAO_HAS_INTERCEPTORS == 1
02298       if (this->client_request_interceptor_adapter_ != 0)
02299         {
02300           this->client_request_interceptor_adapter_->destroy_interceptors ();
02301 
02302           delete this->client_request_interceptor_adapter_;
02303           this->client_request_interceptor_adapter_ = 0;
02304         }
02305 
02306       if (this->server_request_interceptor_adapter_ != 0)
02307         {
02308           this->server_request_interceptor_adapter_->destroy_interceptors ();
02309 
02310           delete this->server_request_interceptor_adapter_;
02311           this->server_request_interceptor_adapter_ = 0;
02312         }
02313 
02314 #endif  /* TAO_HAS_INTERCEPTORS == 1 */
02315 
02316       if (this->ior_interceptor_adapter_ != 0)
02317         {
02318           this->ior_interceptor_adapter_->destroy_interceptors ();
02319 
02320           this->ior_interceptor_adapter_ = 0;
02321         }
02322 
02323     }
02324   catch (...)
02325     {
02326       // .. catch all the exceptions..
02327       if (TAO_debug_level > 3)
02328         {
02329           ACE_DEBUG ((LM_DEBUG,
02330                       ACE_TEXT ("TAO (%P|%t) - Exception in TAO_ORB_Core")
02331                       ACE_TEXT ("::destroy_interceptors () \n")));
02332         }
02333     }
02334 
02335   return;
02336 }

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

Gets the value of TAO_ORB_Core::dynamic_adapter_name_.

Definition at line 1436 of file ORB_Core.cpp.

References ACE_String_Base< CHAR >::c_str(), TAO_ORB_Core_Static_Resources::dynamic_adapter_name_, and TAO_ORB_Core_Static_Resources::instance().

Referenced by CORBA::Object::_create_request(), CORBA::Object::_request(), and CORBA::ORB::create_exception_list().

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

Sets the value of TAO_ORB_Core::dynamic_adapter_name_.

Definition at line 1430 of file ORB_Core.cpp.

References TAO_ORB_Core_Static_Resources::dynamic_adapter_name_, and TAO_ORB_Core_Static_Resources::instance().

TAO_Endpoint_Selector_Factory * TAO_ORB_Core::endpoint_selector_factory ( void   ) 

Returns a pointer to the endpoint selector factory.

Definition at line 1638 of file ORB_Core.cpp.

References ACE_TEXT_CHAR_TO_TCHAR, endpoint_selector_factory_, TAO_ORB_Parameters::endpoint_selector_factory_name(), ACE_Dynamic_Service< TYPE >::instance(), and orb_params().

Referenced by TAO::Profile_Transport_Resolver::resolve().

01639 {
01640   // Check if there is a cached reference.
01641   if (this->endpoint_selector_factory_ != 0)
01642     return this->endpoint_selector_factory_;
01643 
01644   // If not, look in the service repository for an instance.
01645   const char* endpoint_selector_factory_name =
01646     this->orb_params ()->endpoint_selector_factory_name ();
01647 
01648   this->endpoint_selector_factory_ =
01649     ACE_Dynamic_Service<TAO_Endpoint_Selector_Factory>::instance
01650       (this->configuration (),
01651        ACE_TEXT_CHAR_TO_TCHAR (endpoint_selector_factory_name));
01652 
01653   return this->endpoint_selector_factory_;
01654 }

ACE_INLINE TAO_Fault_Tolerance_Service & TAO_ORB_Core::fault_tolerance_service ( void   ) 

Return a reference to the Fault Tolerant service object.

Definition at line 142 of file ORB_Core.inl.

References ft_service_.

00143 {
00144   return this->ft_service_;
00145 }

int TAO_ORB_Core::fini ( void   )  [protected]

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

Definition at line 1345 of file ORB_Core.cpp.

References ACE_DEBUG, ACE_TEXT, ACE_TEXT_CHAR_TO_TCHAR, ACE_String_Base< CHAR >::c_str(), codec_factory_, dynany_factory_, TAO_Thread_Lane_Resources_Manager::finalize(), ior_manip_factory_, ior_table_, LM_DEBUG, monitor_, object_key_table_, orbid_, CORBA::release(), shutdown(), TAO_debug_level, thread_lane_resources_manager_, and typecode_factory_.

Referenced by _decr_refcnt().

01346 {
01347   try
01348     {
01349       // Shutdown the ORB and block until the shutdown is complete.
01350       this->shutdown (1);
01351     }
01352   catch (const ::CORBA::Exception& ex)
01353     {
01354       ACE_CString message =
01355         "Exception caught in trying to shutdown ";
01356       message += this->orbid_;
01357       message += "\n";
01358 
01359       ex._tao_print_exception (message.c_str ());
01360     }
01361 
01362   // Wait for any server threads, ignoring any failures.
01363   (void) this->thr_mgr ()->wait ();
01364 
01365   ::CORBA::release (this->typecode_factory_);
01366 
01367   ::CORBA::release (this->codec_factory_);
01368 
01369   ::CORBA::release (this->dynany_factory_);
01370 
01371   ::CORBA::release (this->ior_manip_factory_);
01372 
01373   ::CORBA::release (this->ior_table_);
01374 
01375   ::CORBA::release (this->monitor_);
01376 
01377   if (TAO_debug_level > 2)
01378     {
01379       ACE_DEBUG ((LM_DEBUG,
01380                   ACE_TEXT ("Destroying ORB <%s>\n"),
01381                   ACE_TEXT_CHAR_TO_TCHAR (this->orbid_)));
01382     }
01383 
01384   // Finalize lane resources.
01385   //
01386   // @@ Do not call this->thread_lane_resources_manager().finalize().
01387   // this->thread_lane_manager_resources() can seg fault if the
01388   // factory method it invokes returns a zero pointer, which can
01389   // easily occur if the ORB is partially initialized due to a Service
01390   // Configurator initialization failure.  Instead check if the
01391   // cached pointer is non-zero and then finalize.
01392   //
01393   // @todo Fix potential seg fault in
01394   //       TAO_ORB_Core::thread_lane_resources_manager().
01395   if (this->thread_lane_resources_manager_ != 0)
01396     this->thread_lane_resources_manager_->finalize ();
01397 
01398   // Destroy the object_key table
01399   this->object_key_table_.destroy ();
01400 
01401   delete this;
01402 
01403   return 0;
01404 }

ACE_INLINE 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 67 of file ORB_Core.inl.

References flushing_strategy_.

Referenced by TAO_Transport::drain_queue(), TAO_Transport::handle_timeout(), TAO_Transport::send_asynchronous_message_i(), TAO_Transport::send_reply_message_i(), and TAO_Transport::send_synchronous_message_i().

00068 {
00069   return this->flushing_strategy_;
00070 }

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

Get outgoing fragmentation strategy.

Definition at line 2844 of file ORB_Core.cpp.

References TAO_Resource_Factory::create_fragmentation_strategy(), and resource_factory().

02845 {
02846   return
02847     this->resource_factory ()->create_fragmentation_strategy (
02848       transport,
02849       this->orb_params_.max_message_size ());
02850 }

ACE_INLINE 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 148 of file ORB_Core.inl.

References ft_send_extended_sc_.

00149 {
00150   return this->ft_send_extended_sc_;
00151 }

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 3090 of file ORB_Core.cpp.

References TAO_Objref_Var_T< T >::_retn(), TAO_Policy_Set::get_cached_policy(), TAO_Policy_Manager::get_cached_policy(), get_default_policies(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), and policy_manager().

Referenced by get_cached_policy_including_current().

03091 {
03092   CORBA::Policy_var result;
03093 
03094   TAO_Policy_Manager *policy_manager = this->policy_manager ();
03095   if (policy_manager != 0)
03096     {
03097       result = policy_manager->get_cached_policy (type);
03098     }
03099 
03100   if (CORBA::is_nil (result.in ()))
03101     {
03102       result = this->get_default_policies ()->get_cached_policy (type);
03103     }
03104 
03105   return result._retn ();
03106 }

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 3109 of file ORB_Core.cpp.

References TAO_Objref_Var_T< T >::_retn(), get_cached_policy(), TAO_Policy_Current::get_cached_policy(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), and policy_current().

03110 {
03111   TAO_Policy_Current &policy_current = this->policy_current ();
03112 
03113   CORBA::Policy_var result = policy_current.get_cached_policy (type);
03114 
03115   if (CORBA::is_nil (result.in ()))
03116     {
03117       result = this->get_cached_policy (type);
03118     }
03119 
03120   return result._retn ();
03121 }

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

Set/get the collocation flags.

Definition at line 222 of file ORB_Core.inl.

References collocation_strategy_.

00223 {
00224   return this->collocation_strategy_;
00225 }

ACE_INLINE TAO_Policy_Set * TAO_ORB_Core::get_default_policies ( void   ) 

Accessor method for the default_policies_.

Definition at line 544 of file ORB_Core.inl.

References default_policies_.

Referenced by get_cached_policy(), and get_policy().

00545 {
00546   return this->default_policies_;
00547 }

ACE_INLINE 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 79 of file ORB_Core.inl.

References network_priority_protocols_hooks_.

00080 {
00081   return this->network_priority_protocols_hooks_;
00082 }

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 3056 of file ORB_Core.cpp.

References TAO_Objref_Var_T< T >::_retn(), get_default_policies(), TAO_Policy_Set::get_policy(), TAO_Policy_Manager::get_policy(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), and policy_manager().

Referenced by get_policy_including_current().

03057 {
03058   CORBA::Policy_var result;
03059 
03060   TAO_Policy_Manager *policy_manager = this->policy_manager ();
03061   if (policy_manager != 0)
03062     {
03063       result = policy_manager->get_policy (type);
03064     }
03065 
03066   if (CORBA::is_nil (result.in ()))
03067     {
03068       result = this->get_default_policies ()->get_policy (type);
03069     }
03070 
03071   return result._retn ();
03072 }

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 3075 of file ORB_Core.cpp.

References TAO_Objref_Var_T< T >::_retn(), get_policy(), TAO_Policy_Current::get_policy(), TAO_Objref_Var_T< T >::in(), CORBA::is_nil(), and policy_current().

03076 {
03077   TAO_Policy_Current &policy_current = this->policy_current ();
03078 
03079   CORBA::Policy_var result = policy_current.get_policy (type);
03080 
03081   if (CORBA::is_nil (result.in ()))
03082     {
03083       result = this->get_policy (type);
03084     }
03085 
03086   return result._retn ();
03087 }

ACE_INLINE TAO_Protocols_Hooks * TAO_ORB_Core::get_protocols_hooks ( void   ) 

Gets the value of TAO_ORB_Core::protocols_hooks__.

Definition at line 73 of file ORB_Core.inl.

References protocols_hooks_.

Referenced by TAO_IIOP_Connection_Handler::open(), TAO::Remote_Invocation::send_message(), and TAO_IIOP_Connection_Handler::set_dscp_codepoint().

00074 {
00075   return this->protocols_hooks_;
00076 }

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

Definition at line 2907 of file ORB_Core.cpp.

References delayed_transport_queueing_strategy_, eager_transport_queueing_strategy_, and flush_transport_queueing_strategy_.

02909 {
02910   switch (scope)
02911   {
02912     case Messaging::SYNC_WITH_TRANSPORT:
02913     case Messaging::SYNC_WITH_SERVER:
02914     case Messaging::SYNC_WITH_TARGET:
02915     {
02916       return this->flush_transport_queueing_strategy_;
02917     }
02918     break;
02919     case Messaging::SYNC_NONE:
02920     {
02921       return this->eager_transport_queueing_strategy_;
02922     }
02923     break;
02924     case TAO::SYNC_DELAYED_BUFFERING:
02925     {
02926       return this->delayed_transport_queueing_strategy_;
02927     }
02928     break;
02929     default:
02930     {
02931       return 0;
02932     }
02933   }
02934 }

ACE_INLINE void * TAO_ORB_Core::get_tss_resource ( size_t  slot_id  ) 

Obtain the TSS resource in the given slot.

Definition at line 269 of file ORB_Core.inl.

References get_tss_resources(), ACE_Array_Base< T >::size(), and TAO_ORB_Core_TSS_Resources::ts_objects_.

00270 {
00271   TAO_ORB_Core_TSS_Resources *tss_resources =
00272     this->get_tss_resources ();
00273 
00274   if (slot_id >= tss_resources->ts_objects_.size ())
00275     return 0;
00276 
00277   return tss_resources->ts_objects_[slot_id];
00278 }

ACE_INLINE TAO_ORB_Core_TSS_Resources * TAO_ORB_Core::get_tss_resources ( void   ) 

Obtain the TSS resources of this orb.

Definition at line 263 of file ORB_Core.inl.

References ACE_TSS_GET.

Referenced by TAO::Wait_On_LF_No_Upcall::can_process_upcalls(), get_tss_resource(), TAO_Leader_Follower::get_tss_resources(), and set_tss_resource().

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

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

Returns pointer to the factory for creating gui resources.

Definition at line 1511 of file ORB_Core.cpp.

References TAO_TSS_Resources::gui_resource_factory_, and TAO_TSS_Resources::instance().

01512 {
01513   return TAO_TSS_Resources::instance ()->gui_resource_factory_;
01514 }

ACE_INLINE bool TAO_ORB_Core::has_shutdown ( void   )  const

Get the shutdown flag value.

Definition at line 328 of file ORB_Core.inl.

References has_shutdown_.

00329 {
00330   return this->has_shutdown_;
00331 }

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

For details on how this is used please see the FT service

Definition at line 131 of file ORB_Core.inl.

Referenced by TAO_Profile::hash_service_i().

00132 {
00133   if (this->ft_service_.service_callback ())
00134     {
00135       return this->ft_service_.service_callback ()->hash_ft (p, m);
00136     }
00137 
00138   return 0;
00139 }

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 1448 of file ORB_Core.cpp.

References ACE_String_Base< CHAR >::c_str(), TAO_ORB_Core_Static_Resources::ifr_client_adapter_name_, and TAO_ORB_Core_Static_Resources::instance().

Referenced by TAO::Remote_Object_Proxy_Broker::_get_interface(), and CORBA::ORB::create_operation_list().

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 1442 of file ORB_Core.cpp.

References TAO_ORB_Core_Static_Resources::ifr_client_adapter_name_, and TAO_ORB_Core_Static_Resources::instance().

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

Set/Get the IOR of the Implementation Repository service.

Definition at line 347 of file ORB_Core.inl.

References implrepo_service_.

00348 {
00349   this->implrepo_service_ = ir;
00350 }

CORBA::Object_ptr TAO_ORB_Core::implrepo_service ( void   ) 

Set/Get the IOR of the Implementation Repository service.

Definition at line 2859 of file ORB_Core.cpp.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), TAO_Pseudo_Var_T< T >::_retn(), ACE_GUARD_RETURN, implrepo_service_, CORBA::is_nil(), orb_, CORBA::ORB::resolve_initial_references(), and TAO_SYNCH_MUTEX.

02860 {
02861   if (!this->use_implrepo_)
02862     return CORBA::Object::_nil ();
02863 
02864   if (CORBA::is_nil (this->implrepo_service_))
02865     {
02866 
02867       try
02868         {
02869           CORBA::Object_var temp =
02870             this->orb_->resolve_initial_references ("ImplRepoService");
02871 
02872           ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, CORBA::Object::_nil ());
02873 
02874           // @@ Worry about assigning a different IOR? (brunsch)
02875           this->implrepo_service_ = temp._retn ();
02876         }
02877       catch (const ::CORBA::Exception&)
02878         {
02879           // Just make sure that we have a null pointer.  Ignore the exception
02880           // anyway.
02881           this->implrepo_service_ = CORBA::Object::_nil ();
02882         }
02883     }
02884 
02885   return CORBA::Object::_duplicate (this->implrepo_service_);
02886 }

ACE_INLINE 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 359 of file ORB_Core.inl.

References imr_endpoints_in_ior_.

00360 {
00361   return imr_endpoints_in_ior_;
00362 }

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 336 of file ORB_Core.cpp.

References CORBA::ORB::_tao_make_ORB(), CORBA::SystemException::_tao_minor_code(), CORBA::ORB::_use_omg_ior_format(), TAO_ORB_Parameters::accept_error_delay(), ACE_DEBUG, ACE_DEFAULT_CDR_MEMCPY_TRADEOFF, ACE_ERROR, ACE_GUARD_RETURN, ACE_LOG_MSG, ACE_NEW_THROW_EX, ACE_TEXT, ACE_TEXT_ALWAYS_CHAR, ACE_TEXT_CHAR_TO_TCHAR, TAO_ORB_Parameters::add_endpoints(), TAO_ORB_Parameters::ami_collication(), ACE_OS::atoi(), ACE_String_Base< CHAR >::c_str(), TAO_ORB_Parameters::cache_incoming_by_dotted_decimal_address(), TAO_ORB_Parameters::cdr_memcpy_tradeoff(), ACE_Log_Msg::clr_flags(), collocation_strategy_, CORBA::COMPLETED_NO, TAO_Resource_Factory::create_flushing_strategy(), TAO_ORB_Parameters::default_init_ref(), DIRECT, TAO_ORB_Parameters::disable_rt_collocation_resolver(), TAO_ORB_Parameters::enforce_pref_interfaces(), flushing_strategy_, ACE_OS::fopen(), ft_send_extended_sc_, ACE_Argv_Type_Converter::get_argc(), TAO_Resource_Factory::get_protocol_factories(), ACE_Argv_Type_Converter::get_TCHAR_argv(), ACE_OS::getenv(), has_shutdown_, imr_endpoints_in_ior_, ACE_Shared_Object::init(), TAO_Network_Priority_Protocols_Hooks::init_hooks(), TAO_Protocols_Hooks::init_hooks(), TAO_Resource_Factory::init_protocol_factories(), TAO_ORB_Core_Static_Resources::instance(), ACE_Dynamic_Service< TYPE >::instance(), TAO_ORB_Parameters::linger(), LM_DEBUG, LM_ERROR, LM_WARNING, ACE_Log_Msg::LOGGER, TAO_ORB_Parameters::max_message_size(), TAO_ORB_Parameters::mcast_discovery_endpoint(), TAO::MCAST_IMPLREPOSERVICE, TAO::MCAST_NAMESERVICE, TAO::MCAST_TRADINGSERVICE, TAO_ORB_Parameters::negotiate_codesets(), negotiate_codesets, network_priority_protocols_hooks_, TAO_ORB_Parameters::nodelay(), TAO_Server_Strategy_Factory::open(), TAO_Parser_Registry::open(), opt_for_collocation_, orb_, orb_params(), orb_params_, ACE_Log_Msg::OSTREAM, TAO_ORB_Parameters::parallel_connect_delay(), parser_registry_, TAO_ORB_Parameters::poa_factory_name(), protocol_factories_, protocols_hooks_, TAO_ORB_Parameters::protocols_hooks_name(), reactor(), resource_factory(), server_factory(), server_id_, TAO_ORB_Parameters::service_port(), services_callbacks_init(), ACE_String_Base< CHAR >::set(), set_endpoint_helper(), ACE_Log_Msg::set_flags(), TAO_ORB_Parameters::shared_profile(), SIG_IGN, ACE_OS::signal(), SIGPIPE, TAO_ORB_Parameters::single_read_optimization(), ACE_OS::snprintf(), TAO_ORB_Parameters::sock_dontroute(), TAO_ORB_Parameters::sock_keepalive(), TAO_ORB_Parameters::sock_rcvbuf_size(), TAO_ORB_Parameters::sock_sndbuf_size(), TAO_ORB_Parameters::std_profile_components(), ACE_Log_Msg::STDERR, ACE_OS::strcasecmp(), ACE_OS::strchr(), TAO_debug_level, TAO_DEFAULT_LANE, TAO_DEFAULT_THREAD_PER_CONNECTION_TIMEOUT, TAO_ORB_CORE_INIT_LOCATION_CODE, TAO_SYNCH_MUTEX, TAO_Server_Strategy_Factory::thread_per_connection_timeout(), thread_per_connection_timeout_, thread_per_connection_use_timeout_, THRU_POA, tm_, TAO_ORB_Parameters::use_dotted_decimal_addresses(), use_global_collocation_, use_implrepo_, TAO_Resource_Factory::use_local_memory_pool(), use_local_memory_pool_, TAO_ORB_Parameters::use_parallel_connects(), ACE_Log_Msg::VERBOSE, ACE_Log_Msg::VERBOSE_LITE, and ACE_Thread_Manager::wait_on_exit().

00337 {
00338   // Right now, this code expects to begin parsing in argv[1] rather
00339   // than argv[0].  I don't think that's wise.  I think we need to
00340   // change that convention to argv[0] and let the initializing code
00341   // make any necessary shifts.
00342   //
00343   // Parse arguments to the ORB.  Typically the ORB is passed
00344   // arguments straight from the command line, so we will simply pass
00345   // through them and respond to the ones we understand and ignore
00346   // those we don't.
00347   //
00348   // In some instances, we may actually build another vector of
00349   // arguments and stash it for use initializing other components such
00350   // as the RootPOA.
00351 
00352   bool use_ior = true;
00353   int cdr_tradeoff = ACE_DEFAULT_CDR_MEMCPY_TRADEOFF;
00354 
00355   // The following things should be changed to use the ACE_Env_Value<>
00356   // template sometime.
00357 
00358   // Name Service port use for Multicast
00359   unsigned short ns_port = 0;
00360 
00361   // Trading Service port used for Multicast
00362   unsigned short ts_port = 0;
00363 
00364   // Implementation Repository Service port #.
00365   unsigned short ir_port = 0;
00366 
00367   // Buffer sizes for kernel socket buffers
00368   // @@ should be a default defined for each protocol implementation?
00369   //    since we may have protocols loaded which use shared memory of
00370   //    some form, fredk
00371   int rcv_sock_size = -1;
00372   int snd_sock_size = -1;
00373 
00374   // Use TCP_NODELAY.
00375   int nodelay = 1;
00376 
00377   // Use SO_KEEPALIVE (default 0).
00378   int so_keepalive = 0;
00379 
00380   // Use SO_DONTROUTE (default 0)
00381   int so_dontroute = 0;
00382 
00383   // Use dotted decimal addresses
00384   // @@ This option will be treated as a suggestion to each loaded
00385   //    protocol to use a character representation for the numeric
00386   //    address, otherwise use a logical name. fredk
00387 #if (TAO_USE_DOTTED_DECIMAL_ADDRESSES == 1)
00388   int dotted_decimal_addresses = 1;
00389 #else
00390   int dotted_decimal_addresses = 0;
00391 #endif /* TAO_USE_DOTTED_DECIMAL_ADDRESSES */
00392 
00393   // Disable looking up the host name for incoming connections.
00394   int no_server_side_name_lookups = 0;
00395 
00396 #if defined (TAO_STD_PROFILE_COMPONENTS)
00397   int std_profile_components = 1;
00398 #else
00399   int std_profile_components = 0;
00400 #endif /* TAO_STD_PROFILE_COMPONENTS */
00401 
00402   int linger = -1;
00403   time_t accept_error_delay = 5;
00404   int use_parallel_connects = 0;
00405 
00406   // Copy command line parameter not to use original.
00407   ACE_Argv_Type_Converter command_line (argc, argv);
00408 
00409   ACE_Arg_Shifter arg_shifter (command_line.get_argc (),
00410                                command_line.get_TCHAR_argv ());
00411 
00412   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
00413                     monitor,
00414                     this->lock_,
00415                     -1);
00416 
00417 #if (TAO_NEGOTIATE_CODESETS == 1)
00418   int negotiate_codesets = 1;
00419 #else
00420   int negotiate_codesets = 0;
00421 #endif /* TAO_NEGOTIATE_CODESETS */
00422 
00423   // Pick up the value of the use_implrepo_ flag from an environment variable
00424   // called "TAO_USE_IMR". Do it here so that it can be overridden by
00425   // the "-ORBUseIMR" command line argument.
00426   //
00427   char* const use_IMR_env_var_value = ACE_OS::getenv  ("TAO_USE_IMR") ;
00428   if  (use_IMR_env_var_value != 0)
00429     {
00430       this->use_implrepo_ = ACE_OS::atoi  (use_IMR_env_var_value) ;
00431     }
00432 
00433 
00434   while (arg_shifter.is_anything_left ())
00435     {
00436       const ACE_TCHAR *current_arg = 0;
00437 
00438       ////////////////////////////////////////////////////////////////
00439       // begin with the 'parameterless' flags                       //
00440       ////////////////////////////////////////////////////////////////
00441       if (0 != (current_arg = arg_shifter.get_the_parameter
00442                 (ACE_TEXT("-ORBDottedDecimalAddresses"))))
00443         {
00444           // Use dotted decimal addresses
00445           // @@ this should be renamed.  See above comment. fredk
00446           dotted_decimal_addresses =
00447             ACE_OS::atoi (current_arg);
00448 
00449           arg_shifter.consume_arg ();
00450         }
00451       else if (0 != (current_arg = arg_shifter.get_the_parameter
00452                 (ACE_TEXT("-ORBNoServerSideNameLookups"))))
00453         {
00454           // Don't look up the host name for incoming connections
00455           no_server_side_name_lookups =
00456             ACE_OS::atoi (current_arg);
00457 
00458           arg_shifter.consume_arg ();
00459         }
00460       else if (0 != (current_arg = arg_shifter.get_the_parameter
00461                 (ACE_TEXT("-ORBNameServicePort"))))
00462         {
00463           // Specify the port number for the NameService.
00464           // Unrelated to ORB Protocols, this is used for multicast.
00465 
00466           ns_port = static_cast <CORBA::UShort> (ACE_OS::atoi (current_arg));
00467 
00468           arg_shifter.consume_arg ();
00469         }
00470       else if (0 != (current_arg = arg_shifter.get_the_parameter
00471                 (ACE_TEXT("-ORBMulticastDiscoveryEndpoint"))))
00472         {
00473           // Specify mcast address:port@network_interface for the
00474           // Naming Service Multicast Discovery Protocol.
00475           // If there is no colon, its only the port no.
00476           // If there is a '@' also, it means that the network
00477           // interface name is specified.
00478           this->orb_params ()->mcast_discovery_endpoint (
00479             ACE_TEXT_ALWAYS_CHAR(current_arg));
00480 
00481           arg_shifter.consume_arg ();
00482         }
00483       else if (0 != (current_arg = arg_shifter.get_the_parameter
00484                 (ACE_TEXT("-ORBNodelay"))))
00485         {
00486           // Use TCP_NODELAY or not.
00487           nodelay =
00488             ACE_OS::atoi (current_arg);
00489 
00490           arg_shifter.consume_arg ();
00491         }
00492       else if (0 != (current_arg = arg_shifter.get_the_parameter
00493                 (ACE_TEXT("-ORBKeepalive"))))
00494         {
00495           // Use SO_KEEPALIVE or not.
00496           so_keepalive =
00497             ACE_OS::atoi (current_arg);
00498 
00499           arg_shifter.consume_arg ();
00500         }
00501       else if (0 != (current_arg = arg_shifter.get_the_parameter
00502                 (ACE_TEXT("-ORBDontRoute"))))
00503         {
00504           // Use SO_DONTROUTE or not.
00505           so_dontroute =
00506             ACE_OS::atoi (current_arg);
00507 
00508           arg_shifter.consume_arg ();
00509         }
00510       else if (0 != (current_arg = arg_shifter.get_the_parameter
00511                 (ACE_TEXT("-ORBTradingServicePort"))))
00512         {
00513           // Specify the port number for the TradingService.
00514 
00515           ts_port = static_cast <CORBA::UShort> (ACE_OS::atoi (current_arg));
00516 
00517           arg_shifter.consume_arg ();
00518         }
00519       else if (0 != (current_arg = arg_shifter.get_the_parameter
00520                 (ACE_TEXT("-ORBImplRepoServicePort"))))
00521         {
00522           // Specify the multicast port number for the Implementation
00523           // Repository.
00524           ir_port = static_cast <CORBA::UShort> (ACE_OS::atoi (current_arg));
00525 
00526           arg_shifter.consume_arg ();
00527         }
00528       else if (0 != (current_arg = arg_shifter.get_the_parameter
00529                 (ACE_TEXT("-ORBRcvSock"))))
00530         {
00531           // @@ All protocol implementation may not use sockets, so
00532           //    this can either be a generic I/O Buffer size or
00533           //    Buffer info can be a per protocol specification, fredk
00534 
00535           // Specify the size of the socket's receive buffer
00536 
00537           rcv_sock_size = ACE_OS::atoi (current_arg);
00538 
00539           arg_shifter.consume_arg ();
00540         }
00541       else if (0 != (current_arg = arg_shifter.get_the_parameter
00542                 (ACE_TEXT("-ORBSndSock"))))
00543         {
00544           // @@ All protocol implementation may not use sockets, so
00545           //    this can either be a generic I/O Buffer size or
00546           //    Buffer info can be a per protocol specification, fredk
00547 
00548           // Specify the size of the socket's send buffer
00549           snd_sock_size = ACE_OS::atoi (current_arg);
00550 
00551           arg_shifter.consume_arg ();
00552         }
00553       else if (0 != (current_arg = arg_shifter.get_the_parameter
00554                 (ACE_TEXT("-ORBObjRefStyle"))))
00555         {
00556           // Specifies the style of printed objrefs: URL or IOR
00557           //
00558           // BEGIN COMMENTS FROM IIOP-1.4 On Win32, we should be
00559           // collecting information from the Registry such as what
00560           // ORBs are configured, specific configuration details like
00561           // whether they generate IOR or URL style stringified
00562           // objrefs and which addresses they listen to (e.g. allowing
00563           // multihomed hosts to implement firewalls), user-meaningful
00564           // orb names (they will normally indicate domains), and
00565           // more.
00566           //
00567           // On UNIX, we should collect that from some private config
00568           // file.
00569           //
00570           // Instead, this just treats the "internet" ORB name
00571           // specially and makes it always use URL-style stringified
00572           // objrefs, where the hostname and TCP port number are
00573           // explicit (and the whole objref is readable by mortals).
00574           // BEGIN COMMENTS FROM IIOP-1.4
00575           const ACE_TCHAR *opt = current_arg;
00576           if (ACE_OS::strcasecmp (opt, ACE_TEXT("URL")) == 0)
00577             use_ior = false;
00578           else if (ACE_OS::strcasecmp (opt, ACE_TEXT("IOR")) == 0)
00579             use_ior = true;
00580 
00581           arg_shifter.consume_arg ();
00582         }
00583       else if (0 != (current_arg = arg_shifter.get_the_parameter
00584                 (ACE_TEXT("-ORBCollocationStrategy"))))
00585         {
00586           // Specify which collocation policy we want to use.
00587           const ACE_TCHAR *opt = current_arg;
00588           if (ACE_OS::strcasecmp (opt, ACE_TEXT("thru_poa")) == 0)
00589             this->collocation_strategy_ = THRU_POA;
00590           else if (ACE_OS::strcasecmp (opt, ACE_TEXT("direct")) == 0)
00591             this->collocation_strategy_ = DIRECT;
00592 
00593           arg_shifter.consume_arg ();
00594         }
00595       else if (0 != (current_arg = arg_shifter.get_the_parameter
00596                 (ACE_TEXT("-ORBCollocation"))))
00597         {
00598           // Specify whether we want to optimize against collocation
00599           // objects.  Valid arguments are: "global", "no", and "per-orb".
00600           // Default is global.
00601 
00602           const ACE_TCHAR *opt = current_arg;
00603           if (ACE_OS::strcasecmp (opt, ACE_TEXT("global")) == 0)
00604             {
00605               this->opt_for_collocation_ = true;
00606               this->use_global_collocation_ = true;
00607             }
00608           else if (ACE_OS::strcasecmp (opt, ACE_TEXT("NO")) == 0)
00609             {
00610               this->opt_for_collocation_ = false;
00611               this->use_global_collocation_ = false;
00612             }
00613           else if (ACE_OS::strcasecmp (opt, ACE_TEXT("per-orb")) == 0)
00614             {
00615               this->opt_for_collocation_ = true;
00616               this->use_global_collocation_ = false;
00617             }
00618           else
00619             {
00620               ACE_DEBUG ((LM_WARNING,
00621                           ACE_TEXT ("WARNING: Unknown option to ")
00622                           ACE_TEXT ("'-ORBCollocation': %s\n"), opt));
00623             }
00624 
00625           arg_shifter.consume_arg ();
00626         }
00627       else if (0 != (current_arg = arg_shifter.get_the_parameter
00628                 (ACE_TEXT("-ORBPreferredInterfaces"))))
00629         {
00630           if (this->orb_params ()->preferred_interfaces (
00631                 ACE_TEXT_ALWAYS_CHAR (current_arg)) == false)
00632             throw ::CORBA::INTERNAL (
00633               CORBA::SystemException::_tao_minor_code (
00634                 TAO_ORB_CORE_INIT_LOCATION_CODE,
00635                 0),
00636               CORBA::COMPLETED_NO);
00637 
00638           arg_shifter.consume_arg ();
00639         }
00640       else if (0 != (current_arg = arg_shifter.get_the_parameter
00641                 (ACE_TEXT("-ORBEnforcePreferredInterfaces"))))
00642         {
00643           int enforce_pref_interfaces = ACE_OS::atoi (current_arg);
00644           if (enforce_pref_interfaces)
00645             this->orb_params ()->enforce_pref_interfaces (false);
00646           else
00647             this->orb_params ()->enforce_pref_interfaces (true);
00648 
00649           arg_shifter.consume_arg ();
00650         }
00651 #if defined (ACE_HAS_IPV6)
00652       else if (0 != (current_arg = arg_shifter.get_the_parameter
00653                 (ACE_TEXT("-ORBPreferIPV6Interfaces"))))
00654         {
00655           int prefer_ipv6_interfaces = ACE_OS::atoi (current_arg);
00656           if (prefer_ipv6_interfaces)
00657             this->orb_params ()->prefer_ipv6_interfaces (true);
00658           else
00659             this->orb_params ()->prefer_ipv6_interfaces (false);
00660 
00661           arg_shifter.consume_arg ();
00662         }
00663       else if (0 != (current_arg = arg_shifter.get_the_parameter
00664                 (ACE_TEXT("-ORBConnectIPV6Only"))))
00665         {
00666           int connect_ipv6_only = ACE_OS::atoi (current_arg);
00667           if (connect_ipv6_only)
00668             this->orb_params ()->connect_ipv6_only (true);
00669           else
00670             this->orb_params ()->connect_ipv6_only (false);
00671 
00672           arg_shifter.consume_arg ();
00673         }
00674       else if ((current_arg = arg_shifter.get_the_parameter
00675                 (ACE_TEXT("-ORBUseIPV6LinkLocal"))))
00676         {
00677           int use_ipv6_link_local = ACE_OS::atoi (current_arg);
00678           if (use_ipv6_link_local)
00679             this->orb_params ()->use_ipv6_link_local (true);
00680           else
00681             this->orb_params ()->use_ipv6_link_local (false);
00682 
00683           arg_shifter.consume_arg ();
00684         }
00685 #endif /* ACE_HAS_IPV6 */
00686       else if (0 != (current_arg = arg_shifter.get_the_parameter
00687                 (ACE_TEXT("-ORBCDRTradeoff"))))
00688         {
00689           cdr_tradeoff = ACE_OS::atoi (current_arg);
00690 
00691           arg_shifter.consume_arg ();
00692         }
00693 
00694       // A new <ObjectID>:<IOR> mapping has been specified. This will be
00695       // used by the resolve_initial_references ().
00696 
00697       else if (0 != (current_arg = arg_shifter.get_the_parameter
00698                 (ACE_TEXT("-ORBInitRef"))))
00699         {
00700           const ACE_TCHAR *pos = ACE_OS::strchr (current_arg, '=');
00701           if (pos == 0)
00702             {
00703               ACE_ERROR ((LM_ERROR,
00704                           ACE_TEXT ("Invalid ORBInitRef argument '%s'")
00705                           ACE_TEXT ("format is ObjectID=IOR\n"),
00706                           current_arg));
00707               throw ::CORBA::INTERNAL (
00708                 CORBA::SystemException::_tao_minor_code (
00709                   TAO_ORB_CORE_INIT_LOCATION_CODE,
00710                   0),
00711                 CORBA::COMPLETED_NO);
00712             }
00713           ACE_CString object_id (ACE_TEXT_ALWAYS_CHAR(current_arg),
00714                                  pos - current_arg);
00715           ACE_CString IOR (ACE_TEXT_ALWAYS_CHAR(pos + 1));
00716           if (!this->init_ref_map_.insert (
00717                  std::make_pair (InitRefMap::key_type (object_id),
00718                                  InitRefMap::data_type (IOR))).second)
00719             {
00720               ACE_ERROR ((LM_ERROR,
00721                           ACE_TEXT ("Duplicate -ORBInitRef ")
00722                           ACE_TEXT ("argument '%s'\n"),
00723                           current_arg));
00724               throw ::CORBA::INTERNAL (
00725                 CORBA::SystemException::_tao_minor_code (
00726                   TAO_ORB_CORE_INIT_LOCATION_CODE,
00727                   0),
00728                 CORBA::COMPLETED_NO);
00729             }
00730           arg_shifter.consume_arg ();
00731         }
00732       else if (0 != (current_arg = arg_shifter.get_the_parameter
00733                 (ACE_TEXT("-ORBDefaultInitRef"))))
00734         {
00735           // Set the list of prefixes from -ORBDefaultInitRef.
00736           this->orb_params ()->default_init_ref
00737             (ACE_TEXT_ALWAYS_CHAR(current_arg));
00738 
00739           arg_shifter.consume_arg ();
00740         }
00741       else if (0 != (current_arg = arg_shifter.get_the_parameter
00742                 (ACE_TEXT("-ORBStdProfileComponents"))))
00743         {
00744           std_profile_components =
00745             ACE_OS::atoi (current_arg);
00746           arg_shifter.consume_arg ();
00747         }
00748       else if (0 != (current_arg = arg_shifter.get_the_parameter
00749                 (ACE_TEXT("-ORBAMICollocation"))))
00750         {
00751           int ami_collocation = ACE_OS::atoi (current_arg);
00752           if (ami_collocation)
00753             this->orb_params ()->ami_collication (true);
00754           else
00755             this->orb_params ()->ami_collication (false);
00756 
00757           arg_shifter.consume_arg ();
00758         }
00759       else if (0 != (current_arg = arg_shifter.get_the_parameter
00760                 (ACE_TEXT("-ORBResources"))))
00761         {
00762           ACE_DEBUG ((LM_WARNING,
00763                       ACE_TEXT ("\"-ORBResources\" has been ")
00764                       ACE_TEXT ("deprecated.\n")));
00765 
00766           arg_shifter.consume_arg ();
00767         }
00768       else if (0 != (current_arg = arg_shifter.get_the_parameter
00769                 (ACE_TEXT("-ORBLogFile"))))
00770         {
00771           // redirect all ACE_DEBUG and ACE_ERROR output to a file
00772           // USAGE: -ORBLogFile <file>
00773           // default: if <file> is present     = append
00774           //          if <file> is not present = create
00775 
00776           const ACE_TCHAR *file_name = current_arg;
00777           arg_shifter.consume_arg ();
00778 
00779           // would rather use ACE_OSTREAM_TYPE out here..
00780           // but need ACE_FSTREAM_TYPE to call ->open(...)
00781           // and haven't found such a macro to rep FILE* and/or fstream*
00782 
00783 #if defined (ACE_LACKS_IOSTREAM_TOTALLY)
00784 
00785           FILE* output_stream = ACE_OS::fopen (file_name, ACE_TEXT ("a"));
00786 
00787           ACE_LOG_MSG->msg_ostream (output_stream, 1);
00788 
00789 #else /* ! ACE_LACKS_IOSTREAM_TOTALLY */
00790 
00791           ofstream* output_stream = 0;
00792 
00793           //
00794           // note: we are allocating dynamic memory here....but
00795           // I assume it will persist for the life of the program
00796           //
00797 
00798           ACE_NEW_THROW_EX (output_stream,
00799                             ofstream (),
00800                             CORBA::NO_MEMORY (
00801                               CORBA::SystemException::_tao_minor_code (
00802                                 TAO_ORB_CORE_INIT_LOCATION_CODE,
00803                                 ENOMEM),
00804                               CORBA::COMPLETED_NO));
00805 
00806           output_stream->open (ACE_TEXT_ALWAYS_CHAR (file_name),
00807                                ios::out | ios::app);
00808 
00809           if (!output_stream->bad ())
00810             {
00811               ACE_LOG_MSG->msg_ostream (output_stream, 1);
00812             }
00813 
00814 #endif /* ACE_LACKS_IOSTREAM_TOTALLY */
00815 
00816           ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER);
00817           ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM);
00818 
00819         }
00820       else if (0 != (current_arg = arg_shifter.get_the_parameter
00821                 (ACE_TEXT("-ORBVerboseLogging"))))
00822         {
00823           unsigned long verbose_logging = ACE_OS::atoi (current_arg);
00824 
00825           arg_shifter.consume_arg ();
00826 
00827           typedef void (ACE_Log_Msg::*PTMF)(u_long);
00828           PTMF flagop = &ACE_Log_Msg::set_flags;
00829           u_long value;
00830 
00831           switch (verbose_logging)
00832             {
00833             case 0:
00834               flagop = &ACE_Log_Msg::clr_flags;
00835               value = ACE_Log_Msg::VERBOSE | ACE_Log_Msg::VERBOSE_LITE;
00836               break;
00837             case 1:
00838               value = ACE_Log_Msg::VERBOSE_LITE; break;
00839             default:
00840               value = ACE_Log_Msg::VERBOSE; break;
00841             }
00842 
00843           (ACE_LOG_MSG->*flagop)(value);
00844         }
00845       else if (0 != (current_arg = arg_shifter.get_the_parameter
00846                 (ACE_TEXT("-ORBUseIMR"))))
00847         {
00848           // Use IR or not.
00849           this->use_implrepo_ = ACE_OS::atoi (current_arg);
00850 
00851           arg_shifter.consume_arg ();
00852         }
00853       else if (0 != (current_arg = arg_shifter.get_the_parameter
00854                 (ACE_TEXT("-ORBIMREndpointsInIOR"))))
00855         {
00856           this->imr_endpoints_in_ior_ = ACE_OS::atoi (current_arg);
00857 
00858           arg_shifter.consume_arg ();
00859         }
00860       else if (0 != (current_arg = arg_shifter.get_the_parameter
00861                 (ACE_TEXT("-ORBid"))))
00862         {
00863           // The ORBid is actually set in ORB_init(), and then passed
00864           // to the TAO_ORB_Core() constructor.  However, in the case
00865           // where the ORBid third argument to ORB_init() is not zero,
00866           // any "-ORBid" arguments in the argv argument list are
00867           // supposed to be ignored, according to the CORBA spec.  As
00868           // such, "-ORBid" must be removed from the argument list
00869           // since ORB_init() must remove all "-ORB" option
00870           // arguments.
00871 
00872           // We obtain a lock on the ORB table when setting the
00873           // ORBid.  For this reason we should *not* set the ORBid
00874           // here.  CORBA::ORB_init() does all of the proper locking
00875           // and setting.
00876 
00877           arg_shifter.consume_arg ();
00878         }
00879       else if (0 != (current_arg = arg_shifter.get_the_parameter
00880                 (ACE_TEXT("-ORBServerId"))))
00881         {
00882           // The this->server_id_ is to uniquely identify a server to
00883           // an IMR.
00884           // Fill in later.
00885           this->server_id_.set(ACE_TEXT_ALWAYS_CHAR(current_arg));
00886 
00887           arg_shifter.consume_arg ();
00888         }
00889       else if (0 != (current_arg = arg_shifter.get_the_parameter
00890                (ACE_TEXT("-ORBLingerTimeout"))))
00891         {
00892           linger = ACE_OS::atoi (current_arg);
00893 
00894           arg_shifter.consume_arg ();
00895         }
00896       else if (0 != (current_arg = arg_shifter.get_the_parameter
00897                (ACE_TEXT("-ORBAcceptErrorDelay"))))
00898         {
00899           accept_error_delay = ACE_OS::atoi (current_arg);
00900 
00901           arg_shifter.consume_arg ();
00902         }
00903       else if (0 != (current_arg = arg_shifter.get_the_parameter
00904                 (ACE_TEXT("-ORBEndpoint"))))
00905         {
00906           // Each "endpoint" is of the form:
00907           //
00908           //   protocol://V.v@addr1,addr2,...,addrN
00909           //
00910           // or:
00911           //
00912           //   protocol://addr1,addr2,...,addrN
00913           //
00914           // where "V.v" is an optional protocol version for each
00915           // addr.  All endpoint strings should be of the above
00916           // form(s).
00917           //
00918           // Multiple sets of endpoint may be seperated by a semi-colon `;'.
00919           // For example:
00920           //
00921           //   corbaloc:space:2001,1.2@odyssey:2010;uiop://foo,bar
00922           //
00923           // All endpoint strings should be of the above form(s).
00924 
00925           this->set_endpoint_helper (TAO_DEFAULT_LANE,
00926                                      ACE_TEXT_ALWAYS_CHAR (current_arg));
00927 
00928           arg_shifter.consume_arg ();
00929         }
00930       else if (0 != (current_arg = arg_shifter.get_the_parameter
00931                 (ACE_TEXT("-ORBListenEndpoints"))))
00932         {
00933           // This option is similar to the -ORBEndPoint option. May be
00934           // ORBEndpoint option will be deprecated in future. But, for
00935           // now, I (Priyanka) am leaving so that both options can be
00936           // used.
00937 
00938           this->set_endpoint_helper (TAO_DEFAULT_LANE,
00939                                      ACE_TEXT_ALWAYS_CHAR (current_arg));
00940 
00941           arg_shifter.consume_arg ();
00942         }
00943       else if ((0 != (current_arg = arg_shifter.get_the_parameter
00944                 (ACE_TEXT("-ORBLaneEndpoint")))) ||
00945                (0 != (current_arg = arg_shifter.get_the_parameter
00946                 (ACE_TEXT("-ORBLaneListenEndpoints")))))
00947         {
00948           // This option is similar to the -ORBEndPoint option but
00949           // specifies endpoints for each lane.
00950 
00951           if (arg_shifter.is_option_next ())
00952             return -1;
00953 
00954           ACE_CString lane (ACE_TEXT_ALWAYS_CHAR (current_arg));
00955           arg_shifter.consume_arg ();
00956 
00957           if (arg_shifter.is_option_next ())
00958             return -1;
00959 
00960           ACE_CString endpoints (ACE_TEXT_ALWAYS_CHAR
00961                                   (arg_shifter.get_current ()));
00962           arg_shifter.consume_arg ();
00963 
00964           this->set_endpoint_helper (lane, endpoints);
00965         }
00966       else if (0 != (current_arg = arg_shifter.get_the_parameter
00967                 (ACE_TEXT("-ORBNoProprietaryActivation"))))
00968         {
00969           // This option can be used to set to not use any proprietary
00970           // activation framework. The only TAO proprietary activation
00971           // framework is IMR. So, by setting this option in TAO, the
00972           // IMR shouldnt be used .. even if the ORBUseIMR option is
00973           // set.
00974           // Fill in later
00975           // @@ To do later: Priyanka.
00976 
00977           throw ::CORBA::NO_IMPLEMENT ();
00978         }
00979        else if (0 != (current_arg = arg_shifter.get_the_parameter
00980                  (ACE_TEXT("-ORBUseSharedProfile"))))
00981          {
00982            this->orb_params ()->shared_profile (ACE_OS::atoi (current_arg));
00983 
00984            arg_shifter.consume_arg ();
00985          }
00986        else if (0 != (current_arg = arg_shifter.get_the_parameter
00987                  (ACE_TEXT("-ORBNegotiateCodesets"))))
00988          {
00989            negotiate_codesets = (ACE_OS::atoi (current_arg));
00990 
00991            arg_shifter.consume_arg ();
00992          }
00993        else if (0 != (current_arg = arg_shifter.get_the_parameter
00994                  (ACE_TEXT("-ORBUseParallelConnects"))))
00995          {
00996            use_parallel_connects = ACE_OS::atoi (current_arg);
00997            arg_shifter.consume_arg ();
00998          }
00999        else if (0 != (current_arg = arg_shifter.get_the_parameter
01000                  (ACE_TEXT("-ORBParallelConnectDelay"))))
01001          {
01002            this->orb_params ()->parallel_connect_delay
01003              (ACE_OS::atoi (current_arg));
01004            arg_shifter.consume_arg ();
01005          }
01006       else if (0 != (current_arg = arg_shifter.get_the_parameter
01007                 (ACE_TEXT("-ORBSingleReadOptimization"))))
01008         {
01009           this->orb_params ()->single_read_optimization
01010             (ACE_OS::atoi (current_arg));
01011 
01012           arg_shifter.consume_arg ();
01013         }
01014       else if (0 != (current_arg = arg_shifter.get_the_parameter
01015                 (ACE_TEXT("-ORBDisableRTCollocation"))))
01016         {
01017           int disable_rt_collocation = ACE_OS::atoi (current_arg);
01018           if (disable_rt_collocation)
01019             this->orb_params ()->disable_rt_collocation_resolver (true);
01020           else
01021             this->orb_params ()->disable_rt_collocation_resolver (false);
01022 
01023           arg_shifter.consume_arg ();
01024         }
01025       else if (0 != (current_arg = arg_shifter.get_the_parameter
01026                 (ACE_TEXT("-ORBUseLocalMemoryPool"))))
01027         {
01028           this->use_local_memory_pool_ = (0 != ACE_OS::atoi (current_arg));
01029 
01030           arg_shifter.consume_arg ();
01031         }
01032       else if (0 != (current_arg = arg_shifter.get_the_parameter
01033                 (ACE_TEXT("-ORBMaxMessageSize"))))
01034         {
01035           this->orb_params_.max_message_size (ACE_OS::atoi (current_arg));
01036 
01037           arg_shifter.consume_arg ();
01038         }
01039       else if (0 != (current_arg = arg_shifter.get_the_parameter
01040                 (ACE_TEXT("-ORBFTSendFullGroupTC"))))
01041         {
01042           this->ft_send_extended_sc_ = ACE_OS::atoi (current_arg);
01043 
01044           arg_shifter.consume_arg ();
01045         }
01046 
01047       ////////////////////////////////////////////////////////////////
01048       // catch any unknown -ORB args                                //
01049       ////////////////////////////////////////////////////////////////
01050       else if (arg_shifter.cur_arg_strncasecmp (ACE_TEXT("-ORB")) != -1)
01051         {
01052           if (TAO_debug_level > 0)
01053             {
01054               current_arg = arg_shifter.get_current ();
01055               ACE_ERROR ((LM_ERROR,
01056                           ACE_TEXT ("ERROR: Unknown \"-ORB\" option ")
01057                           ACE_TEXT ("<%s>.\n"),
01058                           ((current_arg == 0) ? ACE_TEXT("<NULL>")
01059                                               : current_arg)));
01060             }
01061 
01062           throw ::CORBA::BAD_PARAM (
01063             CORBA::SystemException::_tao_minor_code (
01064               TAO_ORB_CORE_INIT_LOCATION_CODE,
01065               EINVAL),
01066             CORBA::COMPLETED_NO);
01067         }
01068 
01069       ////////////////////////////////////////////////////////////////
01070       // ok, we can't interpret this argument, move to next argument//
01071       ////////////////////////////////////////////////////////////////
01072       else
01073         {
01074           // Any arguments that don't match are ignored so that the
01075           // caller can still use them.
01076           arg_shifter.ignore_arg ();
01077         }
01078     }
01079 
01080   const char *env_endpoint =
01081     ACE_OS::getenv ("TAO_ORBENDPOINT");
01082 
01083   if (env_endpoint != 0)
01084     {
01085       int result =
01086         this->orb_params ()->add_endpoints (TAO_DEFAULT_LANE, env_endpoint);
01087 
01088       if (result != 0)
01089         {
01090           if (TAO_debug_level > 0)
01091             {
01092               ACE_ERROR ((LM_ERROR,
01093                           ACE_TEXT ("ERROR: Environment variable ")
01094                           ACE_TEXT ("TAO_ORBENDPOINT set to invalid value ")
01095                           ACE_TEXT ("<%s>.\n"),
01096                           env_endpoint));
01097             }
01098 
01099           throw ::CORBA::BAD_PARAM (
01100             CORBA::SystemException::_tao_minor_code (
01101               TAO_ORB_CORE_INIT_LOCATION_CODE,
01102               EINVAL),
01103             CORBA::COMPLETED_NO);
01104         }
01105     }
01106 
01107 #if defined (SIGPIPE) && !defined (ACE_LACKS_UNIX_SIGNALS)
01108   // There's really no way to deal with this in a portable manner, so
01109   // we just have to suck it up and get preprocessor conditional and
01110   // ugly.
01111   //
01112   // Impractical to have each call to the ORB protect against the
01113   // implementation artifact of potential writes to dead connections,
01114   // as it'd be way expensive.  Do it here; who cares about SIGPIPE in
01115   // these kinds of applications, anyway?
01116   (void) ACE_OS::signal (SIGPIPE, (ACE_SignalHandler) SIG_IGN);
01117 #endif /* SIGPIPE */
01118 
01119   // Calling the open method here so that the svc.conf file is
01120   // opened and TAO_default_resource_factory::init () is called by the
01121   // time this method is called.
01122   this->parser_registry_.open (this);
01123 
01124   // Initialize the pointers to resources in the ORB Core instance,
01125   // e.g., reactor, connector, etc.  Must do this after we open
01126   // services because we'll load the factory from there.
01127   TAO_Resource_Factory *trf = this->resource_factory ();
01128 
01129   if (trf == 0)
01130     {
01131       ACE_ERROR ((LM_ERROR,
01132                   ACE_TEXT ("TAO (%P|%t) %p\n"),
01133                   ACE_TEXT ("ORB Core unable to find a ")
01134                   ACE_TEXT ("Resource Factory instance")));
01135       throw ::CORBA::INTERNAL (
01136         CORBA::SystemException::_tao_minor_code (
01137           TAO_ORB_CORE_INIT_LOCATION_CODE,
01138           0),
01139         CORBA::COMPLETED_NO);
01140     }
01141 
01142   // Set whether or not to use the local memory pool for the cdr allocators.
01143 
01144   trf->use_local_memory_pool (this->use_local_memory_pool_);
01145 
01146   // @@ ????
01147   // Make sure the reactor is initialized...
01148   ACE_Reactor *reactor = this->reactor ();
01149   if (reactor == 0)
01150     {
01151       ACE_ERROR ((LM_ERROR,
01152                   ACE_TEXT ("TAO (%P|%t) %p\n"),
01153                   ACE_TEXT ("ORB Core unable to initialize reactor")));
01154       throw ::CORBA::INITIALIZE (
01155         CORBA::SystemException::_tao_minor_code (
01156           TAO_ORB_CORE_INIT_LOCATION_CODE,
01157           0),
01158         CORBA::COMPLETED_NO);
01159     }
01160 
01161   TAO_Server_Strategy_Factory *ssf = this->server_factory ();
01162 
01163   if (ssf == 0)
01164     {
01165       ACE_ERROR ((LM_ERROR,
01166                   ACE_TEXT ("TAO (%P|%t) %p\n"),
01167                   ACE_TEXT ("ORB Core unable to find a ")
01168                   ACE_TEXT ("Server Strategy Factory instance")));
01169       throw ::CORBA::INTERNAL (
01170         CORBA::SystemException::_tao_minor_code (
01171           TAO_ORB_CORE_INIT_LOCATION_CODE,
01172           0),
01173         CORBA::COMPLETED_NO);
01174     }
01175 
01176   ssf->open (this);
01177 
01178   // Open the ObjectKey_Table
01179   (void) this->object_key_table_.init (this);
01180 
01181   // Obtain the timeout value for the thread-per-connection model
01182   this->thread_per_connection_use_timeout_ =
01183     ssf->thread_per_connection_timeout (this->thread_per_connection_timeout_);
01184 
01185   if (thread_per_connection_use_timeout_ == -1)
01186     {
01187       if (ACE_OS::strcasecmp (TAO_DEFAULT_THREAD_PER_CONNECTION_TIMEOUT,
01188                               "INFINITE") == 0)
01189         {
01190           this->thread_per_connection_use_timeout_ = 0;
01191         }
01192       else
01193         {
01194           this->thread_per_connection_use_timeout_ = 1;
01195           int milliseconds =
01196             ACE_OS::atoi (TAO_DEFAULT_THREAD_PER_CONNECTION_TIMEOUT);
01197           // Use a temporary to obtain automatic normalization.
01198           this->thread_per_connection_timeout_ =
01199             ACE_Time_Value (0, 1000 * milliseconds);
01200         }
01201     }
01202   if (this->thread_per_connection_use_timeout_ == 0)
01203     {
01204       // Do not wait for the server threads because they may block
01205       // forever.
01206       this->tm_.wait_on_exit (0);
01207     }
01208 
01209   // Initialize the "ORB" pseudo-object now.
01210   this->orb_ = CORBA::ORB::_tao_make_ORB (this);
01211 
01212   // This should probably move into the ORB Core someday rather then
01213   // being done at this level.
01214   this->orb_->_use_omg_ior_format (use_ior);
01215 
01216   // Set all kinds of orb parameters whose setting needed to be
01217   // deferred until after the service config entries had been
01218   // determined.
01219 
01220   this->orb_params ()->service_port (TAO::MCAST_NAMESERVICE, ns_port);
01221 
01222   if (ns_port != 0)
01223     {
01224       static char const mcast_fmt[] = "mcast://:%d::";
01225       static size_t const PORT_BUF_SIZE = 256;
01226 
01227       char def_init_ref[PORT_BUF_SIZE] = { 0 };
01228 
01229       ACE_OS::snprintf (def_init_ref,
01230                         PORT_BUF_SIZE,
01231                         mcast_fmt,
01232                         ns_port);
01233 
01234       this->orb_params ()->default_init_ref (def_init_ref);
01235     }
01236 
01237   this->orb_params ()->service_port (TAO::MCAST_TRADINGSERVICE, ts_port);
01238   this->orb_params ()->service_port (TAO::MCAST_IMPLREPOSERVICE, ir_port);
01239 
01240   this->orb_params ()->use_dotted_decimal_addresses (dotted_decimal_addresses);
01241   // When caching incoming transports don't use the host name if
01242   // -ORBDottedDecimalAddresses or -ORBNoServerSideNameLookups is true.
01243   this->orb_params ()->cache_incoming_by_dotted_decimal_address
01244                                             (no_server_side_name_lookups
01245                                              || dotted_decimal_addresses);
01246 
01247   this->orb_params ()->use_parallel_connects
01248     (use_parallel_connects != 0);
01249 
01250   this->orb_params ()->linger (linger);
01251   this->orb_params ()->accept_error_delay (accept_error_delay);
01252   this->orb_params ()->nodelay (nodelay);
01253   this->orb_params ()->sock_keepalive (so_keepalive);
01254   this->orb_params ()->sock_dontroute (so_dontroute);
01255   if (rcv_sock_size >= 0)
01256     this->orb_params ()->sock_rcvbuf_size (rcv_sock_size);
01257   if (snd_sock_size >= 0)
01258     this->orb_params ()->sock_sndbuf_size (snd_sock_size);
01259   if (cdr_tradeoff >= 0)
01260     this->orb_params ()->cdr_memcpy_tradeoff (cdr_tradeoff);
01261 
01262   this->orb_params ()->std_profile_components (std_profile_components);
01263 
01264   this->orb_params ()->negotiate_codesets (negotiate_codesets);
01265 
01266   if (this->codeset_manager())
01267     this->codeset_manager_->open();
01268   else
01269     if  (TAO_debug_level > 0)
01270         ACE_DEBUG ((LM_DEBUG,
01271                     ACE_TEXT("TAO (%P|%t) ORB_Core: ")
01272                     ACE_TEXT("Codeset Manager not available\n")));
01273 
01274   // Set up the pluggable protocol infrastructure.  First get a
01275   // pointer to the protocol factories set, then obtain pointers to
01276   // all factories loaded by the service configurator.
01277   // Load all protocol factories!
01278   if (trf->init_protocol_factories () == -1)
01279     throw ::CORBA::INITIALIZE (
01280       CORBA::SystemException::_tao_minor_code (
01281         TAO_ORB_CORE_INIT_LOCATION_CODE,
01282         0),
01283       CORBA::COMPLETED_NO);
01284 
01285   // init the ORB core's pointer
01286   this->protocol_factories_ = trf->get_protocol_factories ();
01287 
01288   // Initialize the flushing strategy
01289   this->flushing_strategy_ = trf->create_flushing_strategy ();
01290 
01291   // Look in the service repository for an instance of the Protocol Hooks.
01292   const char *protocols_hooks_name = this->orb_params ()->protocols_hooks_name ();
01293 
01294   this->protocols_hooks_ =
01295     ACE_Dynamic_Service<TAO_Protocols_Hooks>::instance
01296     (this->configuration (),
01297      ACE_TEXT_CHAR_TO_TCHAR (protocols_hooks_name));
01298 
01299   if (this->protocols_hooks_ != 0)
01300     {
01301       // Initialize the protocols hooks instance.
01302       this->protocols_hooks_->init_hooks (this);
01303     }
01304 
01305   // If available, allow the Adapter Factory to setup.
01306   ACE_Service_Object *adapter_factory =
01307     ACE_Dynamic_Service<ACE_Service_Object>::instance (
01308       this->configuration (),
01309       this->orb_params ()->poa_factory_name ());
01310 
01311   if (adapter_factory != 0)
01312     {
01313       adapter_factory->init (0, 0);
01314     }
01315 
01316   // Look in the service repository for an instance of the
01317   // Network Priority Protocol Hooks.
01318   const ACE_CString &network_priority_protocols_hooks_name =
01319      TAO_ORB_Core_Static_Resources::instance ()->
01320        network_priority_protocols_hooks_name_;
01321 
01322   this->network_priority_protocols_hooks_ =
01323     ACE_Dynamic_Service<TAO_Network_Priority_Protocols_Hooks>::instance
01324     (this->configuration (),
01325      ACE_TEXT_CHAR_TO_TCHAR (network_priority_protocols_hooks_name.c_str()));
01326 
01327   if (this->network_priority_protocols_hooks_ != 0)
01328     {
01329       // Initialize the protocols hooks instance.
01330       this->network_priority_protocols_hooks_->init_hooks (this);
01331     }
01332 
01333   // As a last step perform initializations of the service callbacks
01334   this->services_callbacks_init ();
01335 
01336   // The ORB has been initialized, meaning that the ORB is no longer
01337   // in the shutdown state.
01338   this->has_shutdown_ = false;
01339 
01340   return 0;
01341 }

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

Return a pointer to the -ORBInitRef map.

Definition at line 178 of file ORB_Core.inl.

References init_ref_map_.

Referenced by CORBA::ORB::resolve_initial_references().

00179 {
00180   return &this->init_ref_map_;
00181 }

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 1957 of file ORB_Core.cpp.

References TAO_Stub::base_profiles(), and initialize_object_i().

Referenced by CORBA::Object::tao_object_initialize().

01958 {
01959   // @@ What about forwarding.  With this approach we are never forwarded
01960   //    when we use collocation!
01961   const TAO_MProfile &mprofile =
01962     stub->base_profiles ();
01963 
01964   return initialize_object_i (stub, mprofile);
01965 }

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 1976 of file ORB_Core.cpp.

References ACE_GUARD_RETURN, adapter_registry(), TAO_ORB_Core_Auto_Ptr::get(), TAO_Adapter_Registry::initialize_collocated_object(), and TAO_SYNCH_MUTEX.

Referenced by initialize_object(), and reinitialize_object().

01978 {
01979   CORBA::Long retval = 0;
01980   TAO_ORB_Core_Auto_Ptr collocated_orb_core;
01981 
01982   {
01983     // Lock the ORB_Table against concurrent modification while we
01984     // iterate through the ORBs.
01985     ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
01986                               guard,
01987                               TAO::ORB_Table::instance()->lock (),
01988                               0));
01989 
01990     TAO::ORB_Table * const table = TAO::ORB_Table::instance ();
01991     TAO::ORB_Table::iterator const end = table->end ();
01992     for (TAO::ORB_Table::iterator i = table->begin (); i != end; ++i)
01993       {
01994         TAO_ORB_Core * const other_core = (*i).second.core ();
01995 
01996         if (this->is_collocation_enabled (other_core,
01997                                           mprofile))
01998           {
01999             other_core->_incr_refcnt ();
02000             TAO_ORB_Core_Auto_Ptr tmp_auto_ptr (other_core);
02001             collocated_orb_core = tmp_auto_ptr;
02002             break;
02003           }
02004       }
02005   }
02006 
02007   if (collocated_orb_core.get ())
02008     {
02009       TAO_Adapter_Registry *ar =
02010         collocated_orb_core.get ()->adapter_registry ();
02011 
02012       retval = ar->initialize_collocated_object (stub);
02013     }
02014 
02015   return retval;
02016 }

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 2747 of file ORB_Core.cpp.

References TAO_Thread_Lane_Resources::input_cdr_buffer_allocator(), and lane_resources().

Referenced by create_input_cdr_data_block(), and CORBA::Object::tao_object_initialize().

02748 {
02749   return this->lane_resources ().input_cdr_buffer_allocator ();
02750 }

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 2741 of file ORB_Core.cpp.

References TAO_Thread_Lane_Resources::input_cdr_dblock_allocator(), and lane_resources().

Referenced by create_input_cdr_data_block(), TAO_Transport::handle_input_parse_data(), TAO_GIOP_Message_Base::process_request_message(), and CORBA::Object::tao_object_initialize().

02742 {
02743   return this->lane_resources ().input_cdr_dblock_allocator ();
02744 }

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 2753 of file ORB_Core.cpp.

References TAO_Thread_Lane_Resources::input_cdr_msgblock_allocator(), and lane_resources().

Referenced by TAO_GIOP_Message_Base::make_queued_data(), and CORBA::Object::tao_object_initialize().

02754 {
02755   return this->lane_resources ().input_cdr_msgblock_allocator ();
02756 }

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 3157 of file ORB_Core.cpp.

References ACE_GUARD_RETURN, ACE_TEXT_CHAR_TO_TCHAR, TAO_IORInterceptor_Adapter_Factory::create(), ACE_Dynamic_Service< TYPE >::instance(), ior_interceptor_adapter_, iorinterceptor_adapter_factory_name(), and TAO_SYNCH_MUTEX.

03158 {
03159   if (this->ior_interceptor_adapter_ == 0)
03160     {
03161       ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
03162                         ace_mon,
03163                         this->lock_,
03164                         0);
03165 
03166       if (this->ior_interceptor_adapter_ == 0)
03167         {
03168           try
03169             {
03170               TAO_IORInterceptor_Adapter_Factory * ior_ap_factory =
03171                 ACE_Dynamic_Service<TAO_IORInterceptor_Adapter_Factory>::instance
03172                   (this->configuration (),
03173                    ACE_TEXT_CHAR_TO_TCHAR (TAO_ORB_Core::iorinterceptor_adapter_factory_name ()));
03174 
03175               if (ior_ap_factory)
03176                 {
03177                   this->ior_interceptor_adapter_ = ior_ap_factory->create ();
03178                 }
03179             }
03180           catch (const ::CORBA::Exception& ex)
03181             {
03182               ex._tao_print_exception (
03183                 "Cannot initialize the ior_interceptor_adapter \n");
03184             }
03185         }
03186     }
03187 
03188   return this->ior_interceptor_adapter_;
03189 }

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 1472 of file ORB_Core.cpp.

References ACE_String_Base< CHAR >::c_str(), TAO_ORB_Core_Static_Resources::instance(), and TAO_ORB_Core_Static_Resources::iorinterceptor_adapter_factory_name_.

Referenced by ior_interceptor_adapter().

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 1466 of file ORB_Core.cpp.

References TAO_ORB_Core_Static_Resources::instance(), and TAO_ORB_Core_Static_Resources::iorinterceptor_adapter_factory_name_.

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 2043 of file ORB_Core.cpp.

References TAO_Thread_Lane_Resources_Manager::is_collocated(), and thread_lane_resources_manager().

Referenced by is_collocation_enabled().

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

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 2019 of file ORB_Core.cpp.

References TAO_MProfile::add_profile(), is_collocated(), optimize_collocation_objects(), and use_global_collocation().

02021 {
02022   TAO_MProfile mp_temp;
02023 
02024   TAO_Profile* profile = 0;
02025   if (this->service_profile_selection(mp, profile) && profile)
02026   {
02027     mp_temp.add_profile(profile);
02028   }
02029 
02030   if (!orb_core->optimize_collocation_objects ())
02031     return 0;
02032 
02033   if (!orb_core->use_global_collocation () && orb_core != this)
02034     return 0;
02035 
02036   if (!orb_core->is_collocated (profile ? mp_temp : mp))
02037     return 0;
02038 
02039   return 1;
02040 }

ACE_INLINE 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 609 of file ORB_Core.inl.

References TAO_Service_Callbacks::is_permanent_forward_condition().

Referenced by TAO::Synch_Twoway_Invocation::check_reply_status(), and TAO_ServerRequest::init_reply().

00611 {
00612   const TAO_Service_Callbacks *service_callback =
00613       this->fault_tolerance_service ().service_callback ();
00614 
00615   // Since forward location is allowed to be nil then check for it.
00616   CORBA::Boolean const permanent_forward_condition =
00617       service_callback && obj &&
00618       service_callback->is_permanent_forward_condition (obj,
00619                                                         service_context);
00620 
00621   return permanent_forward_condition;
00622 }

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

For details on how this is used please see the FT service

Definition at line 114 of file ORB_Core.inl.

References TAO_Service_Callbacks::DONT_KNOW.

Referenced by TAO_Profile::is_equivalent_hook().

00116 {
00117   TAO_Service_Callbacks::Profile_Equivalence retval
00118     = TAO_Service_Callbacks::DONT_KNOW;
00119 
00120   if (this->ft_service_.service_callback ())
00121     {
00122       retval =
00123         this->ft_service_.service_callback ()->is_profile_equivalent (this_p,
00124                                                                       that_p);
00125     }
00126 
00127   return retval;
00128 }

TAO_Thread_Lane_Resources & TAO_ORB_Core::lane_resources ( void   ) 

Get access to the thread lane resources.

Definition at line 2339 of file ORB_Core.cpp.

References TAO_Thread_Lane_Resources_Manager::lane_resources(), and thread_lane_resources_manager().

Referenced by TAO_IIOP_Connection_Handler::add_transport_to_cache(), TAO_Connector::connect(), connector_registry(), TAO::Profile_Transport_Resolver::find_transport(), input_cdr_buffer_allocator(), input_cdr_dblock_allocator(), input_cdr_msgblock_allocator(), leader_follower(), TAO_Creation_Strategy< SVC_HANDLER >::make_svc_handler(), output_cdr_buffer_allocator(), output_cdr_dblock_allocator(), output_cdr_msgblock_allocator(), TAO_Connector::parallel_connect(), TAO_IIOP_Transport::set_bidir_context_info(), TAO_Transport::transport_cache_manager(), and transport_message_buffer_allocator().

02340 {
02341   return this->thread_lane_resources_manager ().lane_resources ();
02342 }

TAO_Leader_Follower & TAO_ORB_Core::leader_follower ( void   ) 

Get access to the leader_follower class.

Definition at line 2062 of file ORB_Core.cpp.

References lane_resources(), and TAO_Thread_Lane_Resources::leader_follower().

Referenced by TAO_Leader_Follower_Flushing_Strategy::flush_message(), reactor(), run(), TAO_Wait_On_Leader_Follower::wait(), and TAO_LF_Connect_Strategy::wait_i().

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

TAO_LF_Strategy & TAO_ORB_Core::lf_strategy ( void   ) 

Get access to the leader follower strategy.

Definition at line 2068 of file ORB_Core.cpp.

References TAO_Thread_Lane_Resources_Manager::lf_strategy(), and thread_lane_resources_manager().

Referenced by TAO_GIOP_Message_Base::process_request_message(), and run().

02069 {
02070   return this->thread_lane_resources_manager ().lf_strategy ();
02071 }

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

List all the service known by the ORB.

Definition at line 2683 of file ORB_Core.cpp.

References TAO_Seq_Var_Base_T< T >::_retn(), ACE_NEW_THROW_EX, ACE_Array_Map< Key, Value, EqualTo >::begin(), TAO_Object_Ref_Table::current_size(), ACE_Array_Map< Key, Value, EqualTo >::end(), TAO_Object_Ref_Table::end(), init_ref_map_, object_ref_table_, ACE_Array_Map< Key, Value, EqualTo >::size(), CORBA::string_dup(), and TAO_LIST_OF_INITIAL_SERVICES.

Referenced by CORBA::ORB::list_initial_services().

02684 {
02685   // Unsupported initial services should NOT be included in the below list!
02686   static const char *initial_services[] = { TAO_LIST_OF_INITIAL_SERVICES };
02687   // Make sure the "terminating" zero is the last array element so
02688   // that there is a stop condition when iterating through the list.
02689 
02690   static const size_t initial_services_size =
02691     sizeof (initial_services) / sizeof (initial_services[0]);
02692 
02693   const size_t total_size =
02694     initial_services_size
02695     + this->init_ref_map_.size ()
02696     + this->object_ref_table_.current_size ();
02697 
02698   CORBA::ORB::ObjectIdList *tmp = 0;
02699 
02700   ACE_NEW_THROW_EX (tmp,
02701                     CORBA::ORB::ObjectIdList (
02702                       static_cast<CORBA::ULong> (total_size)),
02703                     CORBA::NO_MEMORY ());
02704 
02705   CORBA::ORB::ObjectIdList_var list (tmp);
02706   list->length (static_cast<CORBA::ULong> (total_size));
02707 
02708   CORBA::ULong index = 0;
02709   // Index for ObjectIdList members.
02710 
02711   // Iterate over the registered initial references.
02712   for (index = 0; index < initial_services_size; ++index)
02713     list[index] = initial_services[index];
02714 
02715   // Now iterate over the initial references created by the user and
02716   // add them to the sequence.
02717 
02718   // References registered via
02719   // ORBInitInfo::register_initial_reference().
02720   TAO_Object_Ref_Table::iterator const obj_ref_end =
02721     this->object_ref_table_.end ();
02722 
02723   for (TAO_Object_Ref_Table::iterator i = this->object_ref_table_.begin ();
02724        i != obj_ref_end;
02725        ++i, ++index)
02726     list[index] = CORBA::string_dup ((*i).first.in ());
02727 
02728   // References registered via INS.
02729   InitRefMap::iterator const end = this->init_ref_map_.end ();
02730 
02731   for (InitRefMap::iterator j = this-> init_ref_map_.begin ();
02732        j != end;
02733        ++j, ++index)
02734     list[index] = (*j).second.c_str ();
02735 
02736   return list._retn ();
02737 }

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 1885 of file ORB_Core.cpp.

References ACE_TEXT, bidir_adapter_, ACE_Dynamic_Service< TYPE >::instance(), and TAO_BiDir_Adapter::load_policy_validators().

01886 {
01887   if (this->bidir_adapter_ == 0)
01888     {
01889       this->bidir_adapter_ =
01890         ACE_Dynamic_Service<TAO_BiDir_Adapter>::instance
01891           (this->configuration (), ACE_TEXT ("BiDirGIOP_Loader"));
01892     }
01893 
01894   // Call the BiDir library if it has been loaded
01895   if (this->bidir_adapter_)
01896     this->bidir_adapter_->load_policy_validators (validator);
01897 }

ACE_INLINE ACE_Lock * TAO_ORB_Core::locking_strategy ( void   ) 

Return the locking strategy used for the data blocks.

Definition at line 34 of file ORB_Core.inl.

Referenced by TAO_Transport::handle_input_parse_data().

00035 {
00036   if (this->resource_factory ()->use_locked_data_blocks ())
00037     return &this->data_block_lock_;
00038 
00039   return 0;
00040 }

ACE_INLINE 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 191 of file ORB_Core.inl.

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

ACE_INLINE 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 102 of file ORB_Core.inl.

Referenced by CORBA::Object::is_nil_i().

00103 {
00104   CORBA::Boolean retval = false;
00105   if (this->ft_service_.service_callback ())
00106     {
00107       retval = this->ft_service_.service_callback ()->object_is_nil (obj);
00108     }
00109   return retval;
00110 }

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

Acceessor to the table that stores the object_keys.

Definition at line 61 of file ORB_Core.inl.

References object_key_table_.

Referenced by TAO_Profile::decode(), and TAO_Profile::~TAO_Profile().

00062 {
00063   return this->object_key_table_;
00064 }

ACE_INLINE 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 55 of file ORB_Core.inl.

References object_ref_table_.

Referenced by CORBA::ORB::register_initial_reference(), CORBA::ORB::resolve_initial_references(), and resolve_rt_orb().

00056 {
00057   return this->object_ref_table_;
00058 }

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

The ORB Core should not be copied.

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

Set/get the collocation flags.

Definition at line 204 of file ORB_Core.inl.

References opt_for_collocation_.

00205 {
00206   return this->opt_for_collocation_;
00207 }

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

Set/get the collocation flags.

Definition at line 198 of file ORB_Core.inl.

References opt_for_collocation_.

Referenced by is_collocation_enabled().

00199 {
00200   this->opt_for_collocation_ = opt;
00201 }

ACE_INLINE CORBA::ORB_ptr TAO_ORB_Core::orb ( void   ) 

Get pointer to the ORB.

Definition at line 160 of file ORB_Core.inl.

References orb_.

Referenced by TAO_ServerRequest::orb(), resolve_rir(), and TAO_Profile::verify_orb_configuration().

00161 {
00162   return this->orb_;
00163 }

ACE_INLINE TAO_ORB_Parameters * TAO_ORB_Core::orb_params ( void   ) 

Accessor for the ORB parameters.

Definition at line 228 of file ORB_Core.inl.

References orb_params_.

Referenced by TAO_IIOP_Connection_Handler::close_connection(), codeset_manager(), TAO_Profile::create_tagged_profile(), TAO_IIOP_Profile::decode_profile(), TAO_Profile::encode(), endpoint_selector_factory(), TAO_IIOP_Acceptor::hostname(), init(), TAO_IIOP_Connector::make_parallel_connection(), TAO_IIOP_Endpoint::next_filtered(), CORBA::ORB::object_to_string(), TAO_IIOP_Connection_Handler::open(), TAO_Acceptor_Registry::open_default(), TAO_Default_Thread_Lane_Resources_Manager::open_default_resources(), TAO_CORBALOC_Parser::parse_string(), TAO_IIOP_Acceptor::probe_interfaces(), TAO_GIOP_Message_Base::process_request_message(), resolve_rir(), CORBA::ORB::resolve_service(), root_poa(), TAO_ServerRequest::send_cached_reply(), stub_factory(), TAO_ServerRequest::tao_send_reply_exception(), thread_lane_resources_manager(), and TAO::Profile_Transport_Resolver::use_parallel_connect().

00229 {
00230   return &(this->orb_params_);
00231 }

ACE_INLINE const char * TAO_ORB_Core::orbid ( void   )  const

Return ORBid string.

Definition at line 341 of file ORB_Core.inl.

References orbid_.

00342 {
00343   return this->orbid_;
00344 }

ACE_INLINE 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 440 of file ORB_Core.inl.

References ACE_GUARD_RETURN, orbinitializer_registry_, orbinitializer_registry_i(), and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB_init().

00441 {
00442   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00443                     0);
00444   if (orbinitializer_registry_ == 0)
00445     {
00446       return this->orbinitializer_registry_i ();
00447     }
00448   return this->orbinitializer_registry_;
00449 }

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 1587 of file ORB_Core.cpp.

References ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_TEXT, configuration(), ACE_Dynamic_Service< TYPE >::instance(), orbinitializer_registry_, and ACE_Service_Gestalt::process_directive().

Referenced by orbinitializer_registry().

01588 {
01589   // @todo The ORBInitializer_Registry is supposed to be a singleton.
01590 
01591   // If not, lookup it up.
01592   this->orbinitializer_registry_ =
01593     ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance
01594       (this->configuration (),
01595        ACE_TEXT ("ORBInitializer_Registry"));
01596 
01597 #if !defined (TAO_AS_STATIC_LIBS) && !(defined (ACE_VXWORKS) && !defined (__RTP__))
01598       // In case we build shared, try to load the PI Client library, in a
01599       // static build we just can't do this, so don't try it, lower layers
01600       // output an error then.
01601   if (this->orbinitializer_registry_ == 0)
01602     {
01603       this->configuration ()->process_directive (
01604         ACE_DYNAMIC_SERVICE_DIRECTIVE ("ORBInitializer_Registry",
01605                                        "TAO_PI",
01606                                        "_make_ORBInitializer_Registry",
01607                                        ""));
01608       this->orbinitializer_registry_ =
01609         ACE_Dynamic_Service<TAO::ORBInitializer_Registry_Adapter>::instance
01610           (this->configuration (),
01611            ACE_TEXT ("ORBInitializer_Registry"));
01612     }
01613 #endif /* !TAO_AS_STATIC_LIBS && !(ACE_VXWORKS && !__RTP__) */
01614 
01615   return this->orbinitializer_registry_;
01616 }

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 2766 of file ORB_Core.cpp.

References lane_resources(), and TAO_Thread_Lane_Resources::output_cdr_buffer_allocator().

02767 {
02768   return this->lane_resources ().output_cdr_buffer_allocator ();
02769 }

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 2759 of file ORB_Core.cpp.

References lane_resources(), and TAO_Thread_Lane_Resources::output_cdr_dblock_allocator().

Referenced by TAO_Profile::create_tagged_profile(), TAO_Profile::encode(), CORBA::ORB::object_to_string(), TAO_ServerRequest::send_cached_reply(), and TAO_ServerRequest::tao_send_reply_exception().

02760 {
02761 
02762   return this->lane_resources ().output_cdr_dblock_allocator ();
02763 }

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 2773 of file ORB_Core.cpp.

References lane_resources(), and TAO_Thread_Lane_Resources::output_cdr_msgblock_allocator().

Referenced by TAO_Profile::create_tagged_profile(), TAO_Profile::encode(), CORBA::ORB::object_to_string(), TAO_ServerRequest::send_cached_reply(), and TAO_ServerRequest::tao_send_reply_exception().

02774 {
02775   return this->lane_resources ().output_cdr_msgblock_allocator ();
02776 }

ACE_INLINE TAO_Parser_Registry * TAO_ORB_Core::parser_registry ( void   ) 

Get the IOR parser registry.

Definition at line 245 of file ORB_Core.inl.

References parser_registry_.

Referenced by CORBA::ORB::string_to_object().

00246 {
00247   return &this->parser_registry_;
00248 }

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

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

Definition at line 584 of file ORB_Core.inl.

References pi_current_.

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

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

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

Definition at line 574 of file ORB_Core.inl.

References pi_current_.

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

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 1818 of file ORB_Core.cpp.

References ACE_GUARD_RETURN, adapter_registry_, TAO_Adapter_Registry::find_adapter(), poa_adapter_, and TAO_SYNCH_MUTEX.

Referenced by root_poa().

01819 {
01820   if (this->poa_adapter_ == 0)
01821     {
01822       ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0);
01823       if (this->poa_adapter_ == 0)
01824         {
01825           this->poa_adapter_ =
01826             this->adapter_registry_.find_adapter ("RootPOA");
01827         }
01828     }
01829   return this->poa_adapter_;
01830 }

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.

ACE_INLINE 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 522 of file ORB_Core.inl.

References policy_current_.

Referenced by get_cached_policy_including_current(), get_policy_including_current(), and CORBA::ORB::resolve_policy_current().

00523 {
00524   return *this->policy_current_;
00525 }

ACE_INLINE 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 458 of file ORB_Core.inl.

References ACE_GUARD_RETURN, policy_factory_registry_, policy_factory_registry_i(), and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB::_create_policy(), and CORBA::ORB::create_policy().

00459 {
00460   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00461                     0);
00462   if (policy_factory_registry_ == 0)
00463     {
00464       return this->policy_factory_registry_i ();
00465     }
00466   return this->policy_factory_registry_;
00467 }

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 1556 of file ORB_Core.cpp.

References ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_TEXT, configuration(), TAO_PolicyFactory_Registry_Factory::create(), ACE_Dynamic_Service< TYPE >::instance(), policy_factory_registry_, and ACE_Service_Gestalt::process_directive().

Referenced by policy_factory_registry().

01557 {
01558 
01559   TAO_PolicyFactory_Registry_Factory *loader =
01560     ACE_Dynamic_Service<TAO_PolicyFactory_Registry_Factory>::instance
01561       (this->configuration (),
01562        ACE_TEXT ("PolicyFactory_Loader"));
01563 
01564   if (loader == 0)
01565     {
01566       this->configuration ()->process_directive (
01567         ACE_DYNAMIC_SERVICE_DIRECTIVE("PolicyFactory_Loader",
01568                                       "TAO_PI",
01569                                       "_make_TAO_PolicyFactory_Loader",
01570                                       ""));
01571       loader =
01572         ACE_Dynamic_Service<TAO_PolicyFactory_Registry_Factory>::instance
01573           (this->configuration (),
01574            ACE_TEXT ("PolicyFactory_Loader"));
01575     }
01576 
01577   if (loader != 0)
01578     {
01579       this->policy_factory_registry_ =
01580         loader->create ();
01581     }
01582 
01583   return this->policy_factory_registry_;
01584 }

ACE_INLINE TAO_Policy_Manager * TAO_ORB_Core::policy_manager ( void   ) 

Return the Policy_Manager for this ORB.

Definition at line 255 of file ORB_Core.inl.

References policy_manager_.

Referenced by get_cached_policy(), get_policy(), and CORBA::ORB::resolve_policy_manager().

00256 {
00257   return this->policy_manager_;
00258 }

ACE_INLINE TAO_ProtocolFactorySet * TAO_ORB_Core::protocol_factories ( void   ) 

Get the protocol factories.

Definition at line 239 of file ORB_Core.inl.

References TAO_OC_RETRIEVE.

Referenced by TAO_Connector_Registry::open(), TAO_Acceptor_Registry::open(), and TAO_Acceptor_Registry::open_default().

00240 {
00241   return TAO_OC_RETRIEVE (protocol_factories);
00242 }

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 2853 of file ORB_Core.cpp.

References leader_follower(), and TAO_Leader_Follower::reactor().

Referenced by TAO_Connection_Handler::close_connection_eh(), TAO::Transport_Cache_Manager::find_transport(), init(), TAO_Transport::notify_reactor(), TAO_Transport::register_handler(), run(), TAO_Wait_On_Read::wait(), TAO_Wait_On_Reactor::wait(), and CORBA::ORB::work_pending().

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

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::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 1968 of file ORB_Core.cpp.

References TAO_Stub::base_profiles(), TAO_Stub::forward_profiles(), and initialize_object_i().

Referenced by CORBA::Object::_set_policy_overrides().

01969 {
01970   return initialize_object_i (stub, stub->forward_profiles ()
01971                                     ? *(stub->forward_profiles ())
01972                                     : stub->base_profiles ());
01973 }

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.

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 1842 of file ORB_Core.cpp.

References request_dispatcher(), and request_dispatcher_.

01843 {
01844   // Assume ownership of the request dispatcher.
01845   TAO_Request_Dispatcher *tmp = this->request_dispatcher_;
01846   this->request_dispatcher_ = request_dispatcher;
01847   delete tmp;
01848 }

ACE_INLINE TAO_Request_Dispatcher * TAO_ORB_Core::request_dispatcher ( void   ) 

Return the current request dispatcher strategy.

Definition at line 172 of file ORB_Core.inl.

References request_dispatcher_.

Referenced by TAO::Collocated_Invocation::invoke(), TAO_GIOP_Message_Base::process_locate_request(), TAO_GIOP_Message_Base::process_request(), and request_dispatcher().

00173 {
00174   return this->request_dispatcher_;
00175 }

ACE_INLINE CORBA::Object_ptr TAO_ORB_Core::resolve_codecfactory ( void   ) 

Resolve the CodecFactory DLL.

Definition at line 393 of file ORB_Core.inl.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), ACE_GUARD_RETURN, CORBA::is_nil(), resolve_codecfactory_i(), and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB::resolve_initial_references().

00394 {
00395   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00396                     CORBA::Object::_nil ());
00397   if (CORBA::is_nil (this->codec_factory_))
00398     {
00399       this->resolve_codecfactory_i ();
00400     }
00401   return CORBA::Object::_duplicate (this->codec_factory_);
00402 }

void TAO_ORB_Core::resolve_codecfactory_i ( void   )  [protected]

Obtain and cache the codec factory object reference.

Definition at line 2378 of file ORB_Core.cpp.

References ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_TEXT, codec_factory_, configuration(), TAO_Object_Loader::create_object(), ACE_Dynamic_Service< TYPE >::instance(), and ACE_Service_Gestalt::process_directive().

Referenced by resolve_codecfactory().

02379 {
02380   TAO_Object_Loader *loader =
02381     ACE_Dynamic_Service<TAO_Object_Loader>::instance
02382       (this->configuration (),
02383        ACE_TEXT ("CodecFactory_Loader"));
02384 
02385   if (loader == 0)
02386     {
02387       this->configuration()->process_directive
02388         (ACE_DYNAMIC_SERVICE_DIRECTIVE("CodecFactory",
02389                                        "TAO_CodecFactory",
02390                                        "_make_TAO_CodecFactory_Loader",
02391                                        ""));
02392       loader =
02393         ACE_Dynamic_Service<TAO_Object_Loader>::instance
02394           (this->configuration (), ACE_TEXT ("CodecFactory_Loader"));
02395     }
02396 
02397   if (loader != 0)
02398     {
02399       this->codec_factory_ =
02400         loader->create_object (this->orb_, 0, 0);
02401     }
02402 }

ACE_INLINE CORBA::Object_ptr TAO_ORB_Core::resolve_compression_manager ( void   ) 

Resolve the Compression DLL.

Definition at line 405 of file ORB_Core.inl.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), ACE_GUARD_RETURN, CORBA::is_nil(), resolve_compression_manager_i(), and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB::resolve_initial_references().

00406 {
00407   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00408                     CORBA::Object::_nil ());
00409   if (CORBA::is_nil (this->compression_manager_))
00410     {
00411       this->resolve_compression_manager_i ();
00412     }
00413   return CORBA::Object::_duplicate (this->compression_manager_);
00414 }

void TAO_ORB_Core::resolve_compression_manager_i ( void   )  [protected]

Obtain and cache the compression manager object reference.

Definition at line 2405 of file ORB_Core.cpp.

References ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_TEXT, compression_manager_, configuration(), TAO_Object_Loader::create_object(), ACE_Dynamic_Service< TYPE >::instance(), and ACE_Service_Gestalt::process_directive().

Referenced by resolve_compression_manager().

02406 {
02407   TAO_Object_Loader *loader =
02408     ACE_Dynamic_Service<TAO_Object_Loader>::instance
02409       (this->configuration (),
02410        ACE_TEXT ("Compression_Loader"));
02411 
02412   if (loader == 0)
02413     {
02414       this->configuration()->process_directive
02415         (ACE_DYNAMIC_SERVICE_DIRECTIVE("Compression",
02416                                        "TAO_Compression",
02417                                        "_make_TAO_Compression_Loader",
02418                                        ""));
02419       loader =
02420         ACE_Dynamic_Service<TAO_Object_Loader>::instance
02421           (this->configuration (), ACE_TEXT ("Compression_Loader"));
02422     }
02423 
02424   if (loader != 0)
02425     {
02426       this->compression_manager_ = loader->create_object (this->orb_, 0, 0);
02427     }
02428 }

ACE_INLINE CORBA::Object_ptr TAO_ORB_Core::resolve_dynanyfactory ( void   ) 

Resolve the Dynamic Any Factory.

Definition at line 470 of file ORB_Core.inl.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), ACE_GUARD_RETURN, CORBA::is_nil(), resolve_dynanyfactory_i(), and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB::resolve_initial_references().

00471 {
00472   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00473                     CORBA::Object::_nil ());
00474   if (CORBA::is_nil (this->dynany_factory_))
00475     {
00476       this->resolve_dynanyfactory_i ();
00477     }
00478   return CORBA::Object::_duplicate (this->dynany_factory_);
00479 }

void TAO_ORB_Core::resolve_dynanyfactory_i ( void   )  [protected]

Obtain and cache the dynamic any factory object reference.

Definition at line 2491 of file ORB_Core.cpp.

References ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_TEXT, configuration(), TAO_Object_Loader::create_object(), dynany_factory_, ACE_Dynamic_Service< TYPE >::instance(), and ACE_Service_Gestalt::process_directive().

Referenced by resolve_dynanyfactory().

02492 {
02493   TAO_Object_Loader *loader =
02494     ACE_Dynamic_Service<TAO_Object_Loader>::instance
02495       (this->configuration (),
02496        ACE_TEXT ("DynamicAny_Loader"));
02497 
02498   if (loader == 0)
02499     {
02500       this->configuration ()->process_directive
02501         (ACE_DYNAMIC_SERVICE_DIRECTIVE("DynamicAny_Loader",
02502                                        "TAO_DynamicAny",
02503                                        "_make_TAO_DynamicAny_Loader",
02504                                        ""));
02505       loader =
02506         ACE_Dynamic_Service<TAO_Object_Loader>::instance
02507         (this->configuration (),
02508          ACE_TEXT ("DynamicAny_Loader"));
02509     }
02510 
02511   if (loader != 0)
02512     {
02513       this->dynany_factory_ = loader->create_object (this->orb_, 0, 0);
02514     }
02515 }

ACE_INLINE CORBA::Object_ptr TAO_ORB_Core::resolve_ior_manipulation ( void   ) 

Resolve the IOR Manipulation reference for this ORB.

Definition at line 482 of file ORB_Core.inl.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), ACE_GUARD_RETURN, CORBA::is_nil(), resolve_iormanipulation_i(), and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB::resolve_initial_references().

00483 {
00484   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00485                     CORBA::Object::_nil ());
00486   if (CORBA::is_nil (this->ior_manip_factory_))
00487     {
00488       this->resolve_iormanipulation_i ();
00489     }
00490   return CORBA::Object::_duplicate (this->ior_manip_factory_);
00491 }

ACE_INLINE CORBA::Object_ptr TAO_ORB_Core::resolve_ior_table ( void   ) 

Resolve the IOR Table reference for this ORB.

Definition at line 494 of file ORB_Core.inl.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), ACE_GUARD_RETURN, CORBA::is_nil(), resolve_ior_table_i(), and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB::resolve_initial_references().

00495 {
00496   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00497                     CORBA::Object::_nil ());
00498   if (CORBA::is_nil (this->ior_table_))
00499     {
00500       this->resolve_ior_table_i ();
00501     }
00502   return CORBA::Object::_duplicate (this->ior_table_);
00503 }

void TAO_ORB_Core::resolve_ior_table_i ( void   )  [private]

Obtain and cache the dynamic any factory object reference.

Definition at line 2544 of file ORB_Core.cpp.

References TAO_Pseudo_Var_T< T >::_retn(), ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_TEXT, adapter_registry_, configuration(), TAO_Adapter_Factory::create(), TAO_Adapter_Registry::insert(), ACE_Dynamic_Service< TYPE >::instance(), ior_table_, and ACE_Service_Gestalt::process_directive().

Referenced by resolve_ior_table().

02545 {
02546   TAO_Adapter_Factory *factory =
02547     ACE_Dynamic_Service<TAO_Adapter_Factory>::instance
02548       (this->configuration (),
02549        ACE_TEXT ("TAO_IORTable"));
02550 
02551   if (factory == 0)
02552     {
02553       this->configuration ()->process_directive
02554         (ACE_DYNAMIC_SERVICE_DIRECTIVE("TAO_IORTable",
02555                                        "TAO_IORTable",
02556                                        "_make_TAO_Table_Adapter_Factory",
02557                                        ""));
02558       factory =
02559         ACE_Dynamic_Service<TAO_Adapter_Factory>::instance
02560           (this->configuration (), ACE_TEXT ("TAO_IORTable"));
02561     }
02562 
02563   if (factory != 0)
02564     {
02565       ACE_Auto_Ptr <TAO_Adapter> iortable_adapter (factory->create (this));
02566       iortable_adapter->open ();
02567 
02568       CORBA::Object_var tmp_root = iortable_adapter->root ();
02569 
02570       this->adapter_registry_.insert (iortable_adapter.get ());
02571 
02572       // It is now (exception) safe to release ownership from the auto pointers
02573       this->ior_table_= tmp_root._retn ();
02574       iortable_adapter.release ();
02575     }
02576 }

void TAO_ORB_Core::resolve_iormanipulation_i ( void   )  [protected]

Obtain and cache the IORManipulation factory object reference.

Definition at line 2518 of file ORB_Core.cpp.

References ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_TEXT, configuration(), TAO_Object_Loader::create_object(), ACE_Dynamic_Service< TYPE >::instance(), ior_manip_factory_, and ACE_Service_Gestalt::process_directive().

Referenced by resolve_ior_manipulation().

02519 {
02520   TAO_Object_Loader *loader =
02521     ACE_Dynamic_Service<TAO_Object_Loader>::instance
02522       (this->configuration (),
02523        ACE_TEXT ("IORManip_Loader"));
02524 
02525   if (loader == 0)
02526     {
02527       this->configuration()->process_directive
02528         (ACE_DYNAMIC_SERVICE_DIRECTIVE("IORManip_Loader",
02529                                        "TAO_IORManip",
02530                                        "_make_TAO_IORManip_Loader",
02531                                        ""));
02532       loader =
02533         ACE_Dynamic_Service<TAO_Object_Loader>::instance
02534           (this->configuration (), ACE_TEXT ("IORManip_Loader"));
02535     }
02536 
02537   if (loader != 0)
02538     {
02539       this->ior_manip_factory_ = loader->create_object (this->orb_, 0, 0);
02540     }
02541 }

ACE_INLINE CORBA::Object_ptr TAO_ORB_Core::resolve_monitor ( void   ) 

Resolve the Monitor reference for this ORB.

Definition at line 506 of file ORB_Core.inl.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), ACE_GUARD_RETURN, CORBA::is_nil(), resolve_monitor_i(), and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB::resolve_initial_references().

00507 {
00508   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00509                     CORBA::Object::_nil ());
00510   if (CORBA::is_nil (this->monitor_))
00511     {
00512       this->resolve_monitor_i ();
00513     }
00514   return CORBA::Object::_duplicate (this->monitor_);
00515 }

void TAO_ORB_Core::resolve_monitor_i ( void   )  [protected]

Obtain and cache the Monitor object reference.

Definition at line 2579 of file ORB_Core.cpp.

References ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_TEXT, configuration(), TAO_Object_Loader::create_object(), ACE_Dynamic_Service< TYPE >::instance(), monitor_, and ACE_Service_Gestalt::process_directive().

Referenced by resolve_monitor().

02580 {
02581   TAO_Object_Loader *loader =
02582     ACE_Dynamic_Service<TAO_Object_Loader>::instance
02583       (this->configuration (),
02584        ACE_TEXT ("Monitor_Init"));
02585 
02586   if (loader == 0)
02587     {
02588       this->configuration ()->process_directive
02589         (ACE_DYNAMIC_SERVICE_DIRECTIVE("Monitor_Init",
02590                                        "TAO_Monitor",
02591                                        "_make_TAO_Monitor_Init",
02592                                        ""));
02593       loader =
02594         ACE_Dynamic_Service<TAO_Object_Loader>::instance
02595         (this->configuration (),
02596          ACE_TEXT ("Monitor_Init"));
02597     }
02598 
02599   if (loader != 0)
02600     {
02601       this->monitor_ = loader->create_object (this->orb_, 0, 0);
02602     }
02603 }

ACE_INLINE CORBA::Object_ptr TAO_ORB_Core::resolve_picurrent ( void   ) 

Resolve the PICurrent.

Definition at line 379 of file ORB_Core.inl.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), ACE_GUARD_RETURN, CORBA::is_nil(), resolve_picurrent_i(), and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB::resolve_initial_references().

00380 {
00381   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00382                     CORBA::Object::_nil ());
00383   if (CORBA::is_nil (this->pi_current_))
00384     {
00385       this->resolve_picurrent_i ();
00386     }
00387   return CORBA::Object::_duplicate (this->pi_current_);
00388 }

void TAO_ORB_Core::resolve_picurrent_i ( void   )  [protected]

Obtain and cache the picurrent factory object reference.

Definition at line 2460 of file ORB_Core.cpp.

References ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_TEXT, configuration(), TAO_Object_Loader::create_object(), ACE_Dynamic_Service< TYPE >::instance(), pi_current_, and ACE_Service_Gestalt::process_directive().

Referenced by resolve_picurrent().

02461 {
02462   TAO_Object_Loader *loader =
02463     ACE_Dynamic_Service<TAO_Object_Loader>::instance
02464       (this->configuration (),
02465        ACE_TEXT ("PICurrent_Loader"));
02466 
02467   if (loader == 0)
02468     {
02469       this->configuration ()->process_directive
02470         (ACE_DYNAMIC_SERVICE_DIRECTIVE("PICurrent_Loader",
02471                                        "TAO_PI",
02472                                        "_make_TAO_PICurrent_Loader",
02473                                        ""));
02474       loader =
02475         ACE_Dynamic_Service<TAO_Object_Loader>::instance
02476           (this->configuration (), ACE_TEXT ("PICurrent_Loader"));
02477     }
02478 
02479   if (loader != 0)
02480     {
02481       CORBA::Object_ptr pi = loader->create_object (this->orb_, 0, 0);
02482 
02483       this->pi_current_ = pi;
02484     }
02485 }

ACE_INLINE CORBA::Object_ptr TAO_ORB_Core::resolve_poa_current ( void   ) 

Resolve POA Current.

Definition at line 530 of file ORB_Core.inl.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), ACE_GUARD_RETURN, CORBA::is_nil(), resolve_poa_current_i(), and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB::resolve_initial_references().

00531 {
00532   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00533                     CORBA::Object::_nil ());
00534   if (CORBA::is_nil (this->poa_current_.in ()))
00535     {
00536       this->resolve_poa_current_i ();
00537     }
00538   return CORBA::Object::_duplicate (this->poa_current_.in ());
00539 }

void TAO_ORB_Core::resolve_poa_current_i ( void   )  [protected]

Obtain and cache the poa current.

Definition at line 2431 of file ORB_Core.cpp.

References ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_TEXT, configuration(), TAO_Object_Loader::create_object(), ACE_Dynamic_Service< TYPE >::instance(), poa_current_, and ACE_Service_Gestalt::process_directive().

Referenced by resolve_poa_current().

02432 {
02433   TAO_Object_Loader *loader =
02434     ACE_Dynamic_Service<TAO_Object_Loader>::instance
02435       (this->configuration(),
02436        ACE_TEXT ("TAO_POA_Current_Factory"));
02437 
02438   if (loader == 0)
02439     {
02440       this->configuration()->process_directive
02441         (ACE_DYNAMIC_SERVICE_DIRECTIVE("TAO_POA_Current_Factory",
02442                                        "TAO_PortableServer",
02443                                        "_make_TAO_POA_Current_Factory",
02444                                        ""));
02445       loader =
02446         ACE_Dynamic_Service<TAO_Object_Loader>::instance
02447           (this->configuration(), ACE_TEXT ("TAO_POA_Current_Factory"));
02448     }
02449 
02450   if (loader != 0)
02451     {
02452       this->poa_current_ = loader->create_object (this->orb_, 0, 0);
02453     }
02454 }

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

Resolve an initial reference via the -ORBInitRef and.

Definition at line 2626 of file ORB_Core.cpp.

References CORBA::Object::_nil(), connector_registry(), TAO_ORB_Parameters::default_init_ref(), TAO_Connector_Registry::object_key_delimiter(), orb(), orb_params(), CORBA::ORB::string_to_object(), ACE_OS::strlen(), and ACE_OS::strncmp().

Referenced by CORBA::ORB::resolve_initial_references().

02627 {
02628   // Get the table of initial references specified through
02629   // -ORBInitRef.
02630   ACE_CString ior;
02631   ACE_CString object_id ((const char *) name);
02632 
02633   // Get the list of initial reference prefixes specified through
02634   // -ORBDefaultInitRef.
02635   CORBA::String_var default_init_ref =
02636     this->orb_params ()->default_init_ref ();
02637 
02638   // Check if a DefaultInitRef was specified.
02639   if (ACE_OS::strlen (default_init_ref.in ()) != 0)
02640     {
02641       static const char corbaloc_prefix[] = "corbaloc:";
02642       static const char mcast_prefix[] = "mcast:";
02643       char object_key_delimiter = 0;
02644 
02645       ACE_CString list_of_profiles (default_init_ref.in ());
02646 
02647       // Check if the protocol is corbaloc: or mcast:.
02648       // If it is, set the object_key_delimiter.
02649       if ((ACE_OS::strncmp (default_init_ref.in (),
02650                             corbaloc_prefix,
02651                             sizeof corbaloc_prefix -1) == 0) ||
02652           (ACE_OS::strncmp (default_init_ref.in (),
02653                             mcast_prefix,
02654                             sizeof mcast_prefix -1) == 0))
02655         {
02656           object_key_delimiter = '/';
02657         }
02658       else
02659         {
02660           TAO_Connector_Registry *conn_reg = this->connector_registry ();
02661 
02662           // Obtain the appropriate object key delimiter for the
02663           // specified protocol.
02664           object_key_delimiter =
02665             conn_reg->object_key_delimiter (list_of_profiles.c_str ());
02666         }
02667 
02668       // Make sure that the default initial reference doesn't end
02669       // with the object key delimiter character.
02670       if (list_of_profiles[list_of_profiles.length() - 1] !=
02671           object_key_delimiter)
02672             list_of_profiles += ACE_CString (object_key_delimiter);
02673 
02674       list_of_profiles += object_id;
02675 
02676       return this->orb ()->string_to_object (list_of_profiles.c_str ());
02677     }
02678 
02679   return CORBA::Object::_nil ();
02680 }

ACE_INLINE CORBA::Object_ptr TAO_ORB_Core::resolve_rt_orb ( void   ) 

Resolve the RT ORB reference for this ORB.

Definition at line 553 of file ORB_Core.inl.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), ACE_GUARD_RETURN, CORBA::is_nil(), object_ref_table(), TAO_Object_Ref_Table::resolve_initial_reference(), rt_orb_, TAO_OBJID_RTORB, and TAO_SYNCH_MUTEX.

00554 {
00555   if (CORBA::is_nil (this->rt_orb_.in ()))
00556     {
00557       ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00558                         CORBA::Object::_nil ());
00559       if (CORBA::is_nil (this->rt_orb_.in ()))
00560         {
00561           // Save a reference to the priority mapping manager.
00562           this->rt_orb_ =
00563               this->object_ref_table ().resolve_initial_reference (
00564               TAO_OBJID_RTORB);
00565         }
00566     }
00567 
00568   return CORBA::Object::_duplicate (this->rt_orb_.in ());
00569 }

ACE_INLINE CORBA::Object_ptr TAO_ORB_Core::resolve_typecodefactory ( void   ) 

Resolve the TypeCodeFactory DLL.

Definition at line 365 of file ORB_Core.inl.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), ACE_GUARD_RETURN, CORBA::is_nil(), resolve_typecodefactory_i(), and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB::resolve_initial_references().

00366 {
00367   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, mon, this->lock_,
00368                     CORBA::Object::_nil ());
00369   if (CORBA::is_nil (this->typecode_factory_))
00370     {
00371       this->resolve_typecodefactory_i ();
00372     }
00373   return CORBA::Object::_duplicate (this->typecode_factory_);
00374 }

void TAO_ORB_Core::resolve_typecodefactory_i ( void   )  [protected]

Obtain and cache the typecode factory object reference.

Definition at line 2345 of file ORB_Core.cpp.

References ACE_DYNAMIC_SERVICE_DIRECTIVE, ACE_ERROR, ACE_TEXT, configuration(), TAO_Object_Loader::create_object(), ACE_Dynamic_Service< TYPE >::instance(), LM_ERROR, ACE_Service_Gestalt::process_directive(), and typecode_factory_.

Referenced by resolve_typecodefactory().

02346 {
02347   TAO_Object_Loader *loader =
02348     ACE_Dynamic_Service<TAO_Object_Loader>::instance
02349       (this->configuration (),
02350        ACE_TEXT ("TypeCodeFactory_Loader"));
02351 
02352   if (loader == 0)
02353     {
02354       this->configuration ()->process_directive
02355         (ACE_DYNAMIC_SERVICE_DIRECTIVE("TypeCodeFactory",
02356                                        "TAO_TypeCodeFactory",
02357                                        "_make_TAO_TypeCodeFactory_Loader",
02358                                        ""));
02359       loader =
02360         ACE_Dynamic_Service<TAO_Object_Loader>::instance
02361         (this->configuration (),
02362          ACE_TEXT ("TypeCodeFactory_Loader"));
02363 
02364       if (loader == 0)
02365         {
02366           ACE_ERROR ((LM_ERROR,
02367                       ACE_TEXT ("(%P|%t) Unable to instantiate ")
02368                       ACE_TEXT ("a TypeCodeFactory_Loader\n")));
02369           throw ::CORBA::ORB::InvalidName ();
02370         }
02371     }
02372 
02373   this->typecode_factory_ =
02374     loader->create_object (this->orb_, 0, 0);
02375 }

TAO_Resource_Factory * TAO_ORB_Core::resource_factory ( void   ) 

Returns pointer to the resource factory.

Definition at line 1490 of file ORB_Core.cpp.

References ACE_TEXT_CHAR_TO_TCHAR, ACE_String_Base< CHAR >::c_str(), ACE_Dynamic_Service< TYPE >::instance(), TAO_ORB_Core_Static_Resources::instance(), resource_factory_, and TAO_ORB_Core_Static_Resources::resource_factory_name_.

Referenced by TAO_Thread_Lane_Resources::acceptor_registry(), codeset_manager(), TAO_Thread_Lane_Resources::connector_registry(), TAO::demarshal_sequence(), fragmentation_strategy(), init(), TAO::ObjectKey_Table::init(), CORBA::Object::Object(), TAO_Parser_Registry::open(), operator>>(), TAO_Leader_Follower::reactor(), TAO_Thread_Lane_Resources::resource_factory(), TAO_Leader_Follower::set_client_thread(), and TAO::Transport_Cache_Manager::Transport_Cache_Manager().

01491 {
01492   // Check if there is a cached reference.
01493   if (this->resource_factory_ != 0)
01494     {
01495       return this->resource_factory_;
01496     }
01497 
01498   // Look in the service repository for an instance.
01499   ACE_CString &resource_factory_name =
01500     TAO_ORB_Core_Static_Resources::instance ()->resource_factory_name_;
01501 
01502   this->resource_factory_ =
01503     ACE_Dynamic_Service<TAO_Resource_Factory>::instance
01504       (this->configuration (),
01505        ACE_TEXT_CHAR_TO_TCHAR (resource_factory_name.c_str()));
01506 
01507   return this->resource_factory_;
01508 }

CORBA::Object_ptr TAO_ORB_Core::root_poa ( void   ) 

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

Definition at line 1763 of file ORB_Core.cpp.

References CORBA::Object::_duplicate(), CORBA::Object::_nil(), ACE_GUARD_RETURN, ACE_TEXT_CHAR_TO_TCHAR, adapter_registry_, configuration(), TAO_Adapter_Registry::insert(), ACE_Dynamic_Service< TYPE >::instance(), CORBA::is_nil(), TAO_Adapter::open(), orb_params(), poa_adapter(), TAO_ORB_Parameters::poa_factory_name(), ACE_Service_Gestalt::process_directive(), TAO_Adapter::root(), root_poa_, and TAO_SYNCH_MUTEX.

Referenced by CORBA::ORB::resolve_initial_references().

01764 {
01765   // DCL ..
01766   if (CORBA::is_nil (this->root_poa_.in ()))
01767     {
01768       // Making sure the initialization process in the current thread uses
01769       // the correct service repository (ours), instead of the global one.
01770       ACE_Service_Config_Guard scg (this->configuration ());
01771 
01772       TAO_Adapter_Factory *factory =
01773         ACE_Dynamic_Service<TAO_Adapter_Factory>::instance
01774           (this->configuration (),
01775           this->orb_params ()->poa_factory_name ());
01776 
01777       if (factory == 0)
01778         {
01779           this->configuration()->process_directive (
01780            ACE_TEXT_CHAR_TO_TCHAR (
01781              this->orb_params ()->poa_factory_directive ()));
01782 
01783           factory =
01784             ACE_Dynamic_Service<TAO_Adapter_Factory>::instance
01785               (this->configuration (),
01786               this->orb_params ()->poa_factory_name ());
01787         }
01788 
01789       if (factory == 0)
01790         {
01791           return CORBA::Object::_nil ();
01792         }
01793 
01794       ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
01795                         monitor,
01796                         this->open_lock_,
01797                         0);
01798 
01799       if (CORBA::is_nil (this->root_poa_.in ()))
01800         {
01801           auto_ptr<TAO_Adapter> poa_adapter (factory->create (this));
01802 
01803           poa_adapter->open ();
01804 
01805           // @@ Not exception safe
01806           this->root_poa_ = poa_adapter->root ();
01807 
01808           this->adapter_registry_.insert (poa_adapter.get ());
01809 
01810           poa_adapter.release ();
01811         }
01812     }
01813 
01814   return CORBA::Object::_duplicate (this->root_poa_.in ());
01815 }

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

Run the event loop.

Definition at line 2074 of file ORB_Core.cpp.

References ACE_DEBUG, ACE_TEXT, TAO_Server_Strategy_Factory::activate_server_connections(), TAO_LF_Event_Loop_Thread_Helper::event_loop_return(), ACE_Reactor::handle_events(), leader_follower(), lf_strategy(), LM_DEBUG, ACE_Reactor::owner(), reactor(), ACE_Thread::self(), server_factory_, TAO_debug_level, and ACE_Time_Value::zero.

Referenced by TAO_Reactive_Flushing_Strategy::flush_message(), TAO_Reactive_Flushing_Strategy::flush_transport(), TAO_Leader_Follower_Flushing_Strategy::flush_transport(), CORBA::ORB::perform_work(), and CORBA::ORB::run().

02075 {
02076   // ORB::run may be called from a thread, different from the one that
02077   // did the ORB_init, consequently we must establish the Service
02078   // Gestalt, this thread will consider "global"
02079 
02080   ACE_Service_Config_Guard use_orbs (this->configuration());
02081 
02082   if (TAO_debug_level > 2)
02083     {
02084       ACE_DEBUG ((LM_DEBUG,
02085                   ACE_TEXT ("TAO (%P|%t) - ORB_Core::run, ")
02086                   ACE_TEXT ("start [%s]\n"),
02087                   perform_work?ACE_TEXT("perform_work"):ACE_TEXT("run")));
02088     }
02089 
02090   // Fetch the Reactor
02091   ACE_Reactor *r = this->reactor ();
02092 
02093   int result = 1;
02094   // 1 to detect that nothing went wrong
02095 
02096   // Loop handling client requests until the ORB is shutdown.
02097 
02098   // We could use the leader-follower lock to check for the state
02099   // if this variable or use the lock <create_event_loop_lock> in
02100   // the server strategy factory.
02101   // We don't need to do this because we use the Reactor
02102   // mechanisms to shutdown in a thread-safe way.
02103 
02104   while (this->has_shutdown () == false)
02105     {
02106       // Every time we perform an interation we have to become the
02107       // leader again, because it is possible that a client has
02108       // acquired the leader role...
02109       TAO_Leader_Follower &leader_follower = this->leader_follower ();
02110       TAO_LF_Strategy &lf_strategy = this->lf_strategy ();
02111 
02112       TAO_LF_Event_Loop_Thread_Helper helper (leader_follower, lf_strategy, tv);
02113 
02114       result = helper.event_loop_return ();
02115       if (result != 0)
02116         {
02117           if (errno == ETIME)
02118             return 0;
02119           else
02120             return result;
02121         }
02122 
02123       // Set the owning thread of the Reactor to the one which we're
02124       // currently in.  This is necessary b/c it's possible that the
02125       // application is calling us from a thread other than that in which
02126       // the Reactor's CTOR (which sets the owner) was called.
02127       //
02128       // We need to do this on every iteration because the reactor may be
02129       // acquired by one of the client threads in the LF waiting
02130       // strategy
02131       r->owner (ACE_Thread::self ());
02132 
02133       if (TAO_debug_level > 2)
02134         {
02135           ACE_DEBUG ((LM_DEBUG,
02136                       ACE_TEXT ("TAO (%P|%t) - ORB_Core::run, ")
02137                       ACE_TEXT ( "calling handle_events()\n")));
02138         }
02139 
02140       result = r->handle_events (tv);
02141 
02142       if (TAO_debug_level > 2)
02143         {
02144           ACE_DEBUG ((LM_DEBUG,
02145                       ACE_TEXT ("TAO (%P|%t) - ORB_Core::run, ")
02146                       ACE_TEXT ("handle_events() returns %d\n"),
02147                       result));
02148         }
02149 
02150       if (result == -1)
02151         {
02152           // An error, terminate the loop
02153           break;
02154         }
02155       if (result == 0
02156           && tv != 0
02157           && *tv == ACE_Time_Value::zero)
02158         {
02159           // A timeout, terminate the loop...
02160           break;
02161         }
02162 
02163       if (perform_work)
02164         {
02165           // This is running on behalf of a perform_work() call,
02166           // The loop should run only once.
02167           break;
02168         }
02169       // Otherwise just continue..
02170     }
02171 
02172   if (this->has_shutdown () == true &&
02173       this->server_factory_->activate_server_connections ())
02174       this->tm_.wait ();
02175 
02176   if (TAO_debug_level > 2)
02177     {
02178       ACE_DEBUG ((LM_DEBUG,
02179                   ACE_TEXT ("TAO (%P|%t) - ORB_Core::run, ")
02180                   ACE_TEXT ("ends with result = %d\n"),
02181                   result));
02182     }
02183 
02184   return result;
02185 }

TAO_Server_Strategy_Factory * TAO_ORB_Core::server_factory ( void   ) 

Returns pointer to the server factory.

Definition at line 1748 of file ORB_Core.cpp.

References ACE_TEXT, ACE_Dynamic_Service< TYPE >::instance(), and server_factory_.

Referenced by TAO_Concurrency_Strategy< SVC_HANDLER >::activate_svc_handler(), and init().

01749 {
01750   if (this->server_factory_ == 0)
01751     {
01752       // Look in the service repository for an instance.
01753       this->server_factory_ =
01754         ACE_Dynamic_Service<TAO_Server_Strategy_Factory>::instance
01755           (this->configuration (),
01756            ACE_TEXT ("Server_Strategy_Factory"));
01757     }
01758 
01759   return this->server_factory_;
01760 }

ACE_INLINE const char * TAO_ORB_Core::server_id ( void   )  const

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

Definition at line 417 of file ORB_Core.inl.

References ACE_String_Base< CHAR >::c_str(), and server_id_.

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

ACE_INLINE 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 598 of file ORB_Core.inl.

References server_request_interceptor_adapter_.

Referenced by TAO_ServerRequest::rs_pi_current(), and TAO_ServerRequest::~TAO_ServerRequest().

00599 {
00600   return this->server_request_interceptor_adapter_;
00601 }

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 3312 of file ORB_Core.cpp.

References ACE_GUARD_RETURN, ACE_TEXT, TAO_ServerRequestInterceptor_Adapter_Factory::create(), ACE_Dynamic_Service< TYPE >::instance(), server_request_interceptor_adapter_, and TAO_SYNCH_MUTEX.

03313 {
03314   if (this->server_request_interceptor_adapter_ == 0)
03315     {
03316       ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
03317                         ace_mon,
03318                         this->lock_,
03319                         0);
03320 
03321       if (this->server_request_interceptor_adapter_ == 0)
03322         {
03323           TAO_ServerRequestInterceptor_Adapter_Factory *factory =
03324             ACE_Dynamic_Service<TAO_ServerRequestInterceptor_Adapter_Factory>::instance
03325               (this->configuration (),
03326                ACE_TEXT ("ServerRequestInterceptor_Adapter_Factory"));
03327 
03328           if (factory)
03329             {
03330               this->server_request_interceptor_adapter_ =
03331                 factory->create ();
03332             }
03333         }
03334     }
03335 
03336   return this->server_request_interceptor_adapter_;
03337 }

void TAO_ORB_Core::service_context_list ( TAO_Stub stub,
TAO_Service_Context service_context,
CORBA::Boolean  retstart 
)

Call the service layers with the Service Context to check whether they would like to add something to the list.

Definition at line 1712 of file ORB_Core.cpp.

References network_priority_protocols_hooks_, TAO_Network_Priority_Protocols_Hooks::np_service_context(), protocols_hooks_, and TAO_Protocols_Hooks::rt_service_context().

Referenced by TAO::Remote_Invocation::init_target_spec().

01716 {
01717   // @NOTE: Can use Interceptors instead..
01718   if (this->protocols_hooks_ != 0)
01719     {
01720       this->protocols_hooks_->rt_service_context (stub, service_context, restart);
01721     }
01722 
01723   // call the network priority protocols hooks that has been
01724   // registered.
01725   if (network_priority_protocols_hooks_ != 0)
01726     {
01727       this->network_priority_protocols_hooks_->np_service_context (stub,
01728         service_context, restart);
01729     }
01730 }

ACE_INLINE TAO_Service_Context_Registry & TAO_ORB_Core::service_context_registry ( void   ) 

Definition at line 452 of file ORB_Core.inl.

References service_context_registry_.

Referenced by TAO_GIOP_Message_Generator_Parser_12::parse_request_header().

00453 {
00454   return this->service_context_registry_;
00455 }

ACE_INLINE 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 85 of file ORB_Core.inl.

00087 {
00088   CORBA::Boolean retval = false;
00089   // @@ If different services have the same feature we may want to
00090   // prioritise them here. We need to decide here whose selection of
00091   // profile is more important.
00092   if (this->ft_service_.service_callback ())
00093     {
00094       retval =
00095         this->ft_service_.service_callback ()->select_profile (mprofile,
00096                                                                 profile);
00097     }
00098   return retval;
00099 }

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 1678 of file ORB_Core.cpp.

References CORBA::SystemException::_tao_minor_code(), CORBA::COMPLETED_MAYBE, and TAO_INVOCATION_RECV_REQUEST_MINOR_CODE.

Referenced by TAO::Synch_Twoway_Invocation::wait_for_reply().

01681 {
01682   if (this->ft_service_.service_callback ())
01683     {
01684       return this->ft_service_.service_callback ()->
01685                  raise_comm_failure (clist, profile);
01686     }
01687 
01688   throw ::CORBA::COMM_FAILURE (
01689     CORBA::SystemException::_tao_minor_code (
01690       TAO_INVOCATION_RECV_REQUEST_MINOR_CODE,
01691       errno),
01692     CORBA::COMPLETED_MAYBE);
01693 }

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 1697 of file ORB_Core.cpp.

References TAO::TAO_INVOKE_FAILURE.

Referenced by TAO::Synch_Twoway_Invocation::handle_system_exception().

01700 {
01701   if (this->ft_service_.service_callback ())
01702     {
01703       return
01704         this->ft_service_.service_callback ()->raise_transient_failure (clist,
01705                                  profile);
01706     }
01707 
01708   return TAO::TAO_INVOKE_FAILURE;
01709 }

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 1667 of file ORB_Core.cpp.

References ft_service_, and TAO_Fault_Tolerance_Service::init().

Referenced by init().

01668 {
01669   // We (should) know what are the services that would need
01670   // callbacks. So, what we do is go through the Service Configurator
01671   // list for looking at the services that we want to load.
01672   this->ft_service_.init (this);
01673 
01674   // @@ Other service callbacks can be added here
01675 }

ACE_INLINE 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 184 of file ORB_Core.inl.

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

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

Definition at line 651 of file ORB_Core.inl.

References delayed_transport_queueing_strategy_.

00653 {
00654   this->delayed_transport_queueing_strategy_ = strategy;
00655 }

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

Definition at line 643 of file ORB_Core.inl.

References eager_transport_queueing_strategy_.

00645 {
00646   this->eager_transport_queueing_strategy_ = strategy;
00647 }

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 2606 of file ORB_Core.cpp.

References CORBA::SystemException::_tao_minor_code(), ACE_ERROR, ACE_TEXT, ACE_TEXT_CHAR_TO_TCHAR, ACE_String_Base< CHAR >::c_str(), CORBA::COMPLETED_NO, LM_ERROR, and TAO_ORB_CORE_INIT_LOCATION_CODE.

Referenced by init().

02608 {
02609   if (this->orb_params ()->add_endpoints (lane, endpoints) != 0)
02610     {
02611       ACE_ERROR ((LM_ERROR,
02612                   ACE_TEXT ("(%P|%t)\n")
02613                   ACE_TEXT ("Invalid endpoint(s) specified:\n%s\n"),
02614                   ACE_TEXT_CHAR_TO_TCHAR(endpoints.c_str ())));
02615       throw ::CORBA::BAD_PARAM (
02616         CORBA::SystemException::_tao_minor_code (
02617           TAO_ORB_CORE_INIT_LOCATION_CODE,
02618           EINVAL),
02619         CORBA::COMPLETED_NO);
02620     }
02621 
02622   return 0;
02623 }

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 1414 of file ORB_Core.cpp.

References ACE_DEBUG, TAO_TSS_Resources::gui_resource_factory_, TAO_TSS_Resources::instance(), LM_DEBUG, and TAO_debug_level.

01415 {
01416   if (TAO_TSS_Resources::instance ()->gui_resource_factory_ != 0)
01417     {
01418       if (TAO_debug_level > 2)
01419         {
01420           ACE_DEBUG ((LM_DEBUG,
01421                       "TAO (%P|%t) - Deleting old gui_resource_factory.\n"));
01422         }
01423       delete TAO_TSS_Resources::instance ()->gui_resource_factory_;
01424     }
01425 
01426   TAO_TSS_Resources::instance ()->gui_resource_factory_ = gui_resource_factory;
01427 }

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 1657 of file ORB_Core.cpp.

References TAO_ORB_Core_Static_Resources::instance().

01659 {
01660   // Is synchronization necessary?
01661   TAO_ORB_Core_Static_Resources::instance ()->
01662     network_priority_protocols_hooks_name_ =
01663       network_priority_protocols_hooks_name;
01664 }

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 1407 of file ORB_Core.cpp.

References TAO_ORB_Core_Static_Resources::instance(), and TAO_ORB_Core_Static_Resources::resource_factory_name_.

01408 {
01409   TAO_ORB_Core_Static_Resources::instance ()->resource_factory_name_ =
01410     resource_factory_name;
01411 }

ACE_INLINE void TAO_ORB_Core::set_sync_scope_hook ( Sync_Scope_Hook  hook  ) 

Definition at line 626 of file ORB_Core.inl.

References sync_scope_hook_.

00627 {
00628   this->sync_scope_hook_ = hook;
00629 }

ACE_INLINE void TAO_ORB_Core::set_timeout_hook ( Timeout_Hook  hook  ) 

Definition at line 633 of file ORB_Core.inl.

References timeout_hook_.

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

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

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

Definition at line 281 of file ORB_Core.inl.

References get_tss_resources(), TAO_ORB_Core_TSS_Resources::orb_core_, ACE_Array_Base< T >::size(), and TAO_ORB_Core_TSS_Resources::ts_objects_.

00282 {
00283   TAO_ORB_Core_TSS_Resources *tss_resources =
00284     this->get_tss_resources ();
00285 
00286   // The number of allocated slots is equal to the number of
00287   // registered TSS cleanup functions, *not* the size of the array in
00288   // the ORB core TSS resources.
00289   if (slot_id >= this->tss_cleanup_funcs_.size ())
00290     {
00291       errno = EINVAL;
00292       return -1;
00293     }
00294 
00295   // If the TSS array isn't large enough, then increase its size.
00296   // We're guaranteed not to exceed the number of allocated slots by
00297   // the above check.
00298   const size_t old_size = tss_resources->ts_objects_.size ();
00299   const size_t new_size = slot_id + 1;
00300   if (slot_id >= old_size
00301       && tss_resources->ts_objects_.size (new_size) != 0)
00302     return -1;
00303 
00304   // Initialize intermediate array elements to zero, since they
00305   // haven't been initialized yet.  This ensures that garbage is not
00306   // returned when accessing any of those elements at a later point in
00307   // time.
00308   for (size_t i = old_size; i < slot_id; ++i)
00309     tss_resources->ts_objects_[i] = 0;
00310 
00311   tss_resources->ts_objects_[slot_id] = ts_object;
00312 
00313   // Make sure the ORB core pointer is set in the ORB core's TSS
00314   // resources so that the TSS cleanup functions stored in the ORB
00315   // core can be invoked.
00316   tss_resources->orb_core_ = this;
00317 
00318   return 0;
00319 }

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

End the event loop.

Definition at line 2189 of file ORB_Core.cpp.

References CORBA::Object::_nil(), ACE_GUARD, adapter_registry_, ACE_Thread_Manager::cancel_all(), TAO_Adapter_Registry::check_close(), TAO_Thread_Lane_Resources_Manager::cleanup_rw_transports(), TAO_Adapter_Registry::close(), TAO_Object_Ref_Table::destroy(), has_shutdown_, implrepo_service_, object_ref_table_, pi_current_, CORBA::release(), TAO_Thread_Lane_Resources_Manager::shutdown_reactor(), TAO_SYNCH_MUTEX, thr_mgr(), thread_lane_resources_manager(), valuetype_adapter_, and ACE_Thread_Manager::wait().

Referenced by destroy(), fini(), and CORBA::ORB::shutdown().

02190 {
02191   {
02192     ACE_GUARD (TAO_SYNCH_MUTEX, monitor, this->lock_);
02193 
02194     if (this->has_shutdown () == true)
02195       return;
02196 
02197     // Check if we are on the right state, i.e. do not accept
02198     // shutdowns with the 'wait_for_completion' flag set in the middle
02199     // of an upcall (because those deadlock).
02200     this->adapter_registry_.check_close (wait_for_completion);
02201 
02202     // Set the 'has_shutdown' flag, so any further attempt to shutdown
02203     // becomes a noop.
02204     this->has_shutdown_ = true;
02205 
02206     // need to release the mutex, because some of the shutdown
02207     // operations invoke application code, that could (and in practice
02208     // does!) callback into ORB Core code.
02209   }
02210 
02211   this->adapter_registry_.close (wait_for_completion);
02212 
02213   // Shutdown reactor.
02214   this->thread_lane_resources_manager ().shutdown_reactor ();
02215 
02216   // Cleanup transports that use the RW strategies
02217   this->thread_lane_resources_manager ().cleanup_rw_transports ();
02218 
02219   // Grab the thread manager
02220   ACE_Thread_Manager *tm = this->thr_mgr ();
02221 
02222   // Try to cancel all the threads in the ORB.
02223   tm->cancel_all ();
02224 
02225   // If <wait_for_completion> is set, wait for all threads to exit.
02226   if (wait_for_completion == true)
02227     tm->wait ();
02228 
02229   // Explicitly destroy the valuetype adapter
02230   delete this->valuetype_adapter_;
02231   this->valuetype_adapter_ = 0;
02232 
02233   // Explicitly destroy the object reference table since it
02234   // contains references to objects, which themselves may contain
02235   // reference to this ORB.
02236   this->object_ref_table_.destroy ();
02237 
02238   // Release implrepo_service_ if one existed. If everything went
02239   // fine then this must release reference from implrepo_service_
02240   // object to this orb core.
02241   ::CORBA::release (this->implrepo_service_);
02242   this->implrepo_service_ = CORBA::Object::_nil ();
02243 
02244 #if (TAO_HAS_INTERCEPTORS == 1)
02245   CORBA::release (this->pi_current_);
02246   this->pi_current_ = CORBA::Object::_nil ();
02247 #endif  /* TAO_HAS_INTERCEPTORS == 1 */
02248 }

TAO_Stub_Factory * TAO_ORB_Core::stub_factory ( void   ) 

Returns a pointer to the Stub factory.

Definition at line 1619 of file ORB_Core.cpp.

References ACE_TEXT_CHAR_TO_TCHAR, ACE_Dynamic_Service< TYPE >::instance(), orb_params(), stub_factory_, and TAO_ORB_Parameters::stub_factory_name().

Referenced by create_stub().

01620 {
01621   // Check if there is a cached reference.
01622   if (this->stub_factory_ != 0)
01623     return this->stub_factory_;
01624 
01625   // If not, look in the service repository for an instance.
01626   const char *stub_factory_name =
01627     this->orb_params ()->stub_factory_name ();
01628 
01629   this->stub_factory_ =
01630     ACE_Dynamic_Service<TAO_Stub_Factory>::instance
01631       (this->configuration (),
01632        ACE_TEXT_CHAR_TO_TCHAR (stub_factory_name));
01633 
01634   return this->stub_factory_;
01635 }

ACE_INLINE ACE_Thread_Manager * TAO_ORB_Core::thr_mgr ( void   ) 

Get the ACE_Thread_Manager.

Definition at line 154 of file ORB_Core.inl.

References tm_.

Referenced by TAO_IIOP_Connector::open(), and shutdown().

00155 {
00156   return &this->tm_;
00157 }

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 1518 of file ORB_Core.cpp.

References ACE_TEXT_CHAR_TO_TCHAR, TAO_Thread_Lane_Resources_Manager_Factory::create_thread_lane_resources_manager(), ACE_Dynamic_Service< TYPE >::instance(), orb_params(), thread_lane_resources_manager_, and TAO_ORB_Parameters::thread_lane_resources_manager_factory_name().

Referenced by is_collocated(), lane_resources(), lf_strategy(), and shutdown().

01519 {
01520   // Check if there is a cached reference.
01521   if (this->thread_lane_resources_manager_ != 0)
01522     return *this->thread_lane_resources_manager_;
01523 
01524   // If not, lookup the corresponding factory and ask it to make one.
01525   const char *thread_lane_resources_manager_factory_name =
01526     this->orb_params ()->thread_lane_resources_manager_factory_name ();
01527 
01528   TAO_Thread_Lane_Resources_Manager_Factory *factory =
01529     ACE_Dynamic_Service<TAO_Thread_Lane_Resources_Manager_Factory>::instance
01530       (this->configuration (),
01531        ACE_TEXT_CHAR_TO_TCHAR (thread_lane_resources_manager_factory_name));
01532 
01533   this->thread_lane_resources_manager_ =
01534     factory->create_thread_lane_resources_manager (*this);
01535 
01536   return *this->thread_lane_resources_manager_;
01537 }

ACE_INLINE 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 334 of file ORB_Core.inl.

References thread_per_connection_timeout_, and thread_per_connection_use_timeout_.

00335 {
00336   timeout = this->thread_per_connection_timeout_;
00337   return this->thread_per_connection_use_timeout_;
00338 }

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 2780 of file ORB_Core.cpp.

References lane_resources(), and TAO_Thread_Lane_Resources::transport_message_buffer_allocator().

02781 {
02782   return this->lane_resources ().transport_message_buffer_allocator ();
02783 }

ACE_INLINE TAO_Cleanup_Func_Registry * TAO_ORB_Core::tss_cleanup_funcs ( void   ) 

Return the underlying TSS cleanup function registry.

Definition at line 322 of file ORB_Core.inl.

References tss_cleanup_funcs_.

00323 {
00324   return &(this->tss_cleanup_funcs_);
00325 }

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

Gets the value of TAO_ORB_Core::typecodefactory_adapter_name_.

Definition at line 1460 of file ORB_Core.cpp.

References ACE_String_Base< CHAR >::c_str(), TAO_ORB_Core_Static_Resources::instance(), and TAO_ORB_Core_Static_Resources::typecodefactory_adapter_name_.

Referenced by CORBA::ORB::create_abstract_interface_tc(), CORBA::ORB::create_alias_tc(), CORBA::ORB::create_array_tc(), CORBA::ORB::create_component_tc(), CORBA::ORB::create_enum_tc(), CORBA::ORB::create_event_tc(), CORBA::ORB::create_exception_tc(), CORBA::ORB::create_fixed_tc(), CORBA::ORB::create_home_tc(), CORBA::ORB::create_interface_tc(), CORBA::ORB::create_local_interface_tc(), CORBA::ORB::create_native_tc(), CORBA::ORB::create_recursive_tc(), CORBA::ORB::create_sequence_tc(), CORBA::ORB::create_string_tc(), CORBA::ORB::create_struct_tc(), CORBA::ORB::create_union_tc(), CORBA::ORB::create_value_box_tc(), CORBA::ORB::create_value_tc(), and CORBA::ORB::create_wstring_tc().

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

Sets the value of TAO_ORB_Core::typecodefactory_adapter_name_.

Definition at line 1454 of file ORB_Core.cpp.

References TAO_ORB_Core_Static_Resources::instance(), and TAO_ORB_Core_Static_Resources::typecodefactory_adapter_name_.

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

Set/get the collocation flags.

Definition at line 216 of file ORB_Core.inl.

References use_global_collocation_.

00217 {
00218   return this->use_global_collocation_;
00219 }

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

Set/get the collocation flags.

Definition at line 210 of file ORB_Core.inl.

References use_global_collocation_.

Referenced by is_collocation_enabled().

00211 {
00212   this->use_global_collocation_ = opt;
00213 }

ACE_INLINE CORBA::Boolean TAO_ORB_Core::use_implrepo ( void   ) 

Do we attempt to register with the Implementation Repository.

Definition at line 353 of file ORB_Core.inl.

References use_implrepo_.

00354 {
00355   return use_implrepo_;
00356 }

TAO_Valuetype_Adapter * TAO_ORB_Core::valuetype_adapter ( void   ) 

Return the valuetype adapter.

Definition at line 3342 of file ORB_Core.cpp.

References ACE_GUARD_RETURN, TAO_Valuetype_Adapter_Factory::create(), ACE_Dynamic_Service< TYPE >::instance(), TAO_SYNCH_MUTEX, valuetype_adapter_, and valuetype_adapter_factory_name().

Referenced by CORBA::ORB::lookup_value_factory(), CORBA::ORB::register_value_factory(), and CORBA::ORB::unregister_value_factory().

03343 {
03344   if (this->valuetype_adapter_ == 0)
03345     {
03346       ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
03347                         ace_mon,
03348                         this->lock_,
03349                         0);
03350 
03351       if (this->valuetype_adapter_ == 0)
03352         {
03353           try
03354             {
03355               TAO_Valuetype_Adapter_Factory * vt_ap_factory =
03356                 ACE_Dynamic_Service<TAO_Valuetype_Adapter_Factory>::instance (
03357                     TAO_ORB_Core::valuetype_adapter_factory_name ()
03358                   );
03359 
03360               if (vt_ap_factory)
03361                 {
03362                   this->valuetype_adapter_ = vt_ap_factory->create ();
03363                 }
03364             }
03365           catch (const ::CORBA::Exception& ex)
03366             {
03367               ex._tao_print_exception (
03368                 "Cannot initialize the valuetype_adapter \n");
03369             }
03370         }
03371 
03372       if (this->valuetype_adapter_ == 0)
03373         {
03374            throw ::CORBA::INTERNAL ();
03375         }
03376     }
03377 
03378   return this->valuetype_adapter_;
03379 }

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

Gets the value of TAO_ORB_Core::valuetype_adapter_factory_name.

Definition at line 1484 of file ORB_Core.cpp.

References ACE_String_Base< CHAR >::c_str(), TAO_ORB_Core_Static_Resources::instance(), and TAO_ORB_Core_Static_Resources::valuetype_adapter_factory_name_.

Referenced by valuetype_adapter().

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

Sets the value of TAO_ORB_Core::valuetype_adapter_factory_name.

Definition at line 1478 of file ORB_Core.cpp.

References TAO_ORB_Core_Static_Resources::instance(), and TAO_ORB_Core_Static_Resources::valuetype_adapter_factory_name_.


Friends And Related Function Documentation

CORBA::ORB_ptr ORB_init ( int &  argc,
char *  argv[],
const char *  orb_name = 0 
) [friend]

ORB Initialization

Definition at line 1187 of file ORB.cpp.

01188 {
01189   // It doesn't make sense for argc to be zero and argv to be
01190   // non-empty/zero, or for argc to be greater than zero and argv be
01191   // zero.
01192   size_t const argv0_len = (argv ? (*argv
01193                                         ? ACE_OS::strlen (*argv)
01194                                         : 0)
01195                                      : 0);
01196 
01197   if ((argc == 0 && argv0_len != 0)
01198       || (argc != 0  && (argv == 0 || argv[0] == 0)))
01199     {
01200       throw ::CORBA::BAD_PARAM (
01201         CORBA::SystemException::_tao_minor_code (
01202           0,
01203           EINVAL),
01204         CORBA::COMPLETED_NO);
01205     }
01206 
01207   // Copy command line parameter not to corrupt the original.
01208   ACE_Argv_Type_Converter command_line(argc, argv);
01209   int tmpargc = command_line.get_argc ();
01210   ACE_TCHAR **tmpargv = command_line.get_TCHAR_argv ();
01211 
01212   // Scan the parameters to find any we could interpret to
01213   // use for initializing the global context. Note that if
01214   // the global context has been initialized already, the
01215   // parameters may either be ignored, or later used to initialize
01216   // a local configuration context. The chosen action depends on
01217   // weather we want the ORB to share the global context or
01218   // have its own, private (or local) context.
01219   if (TAO::ORB::open_global_services (tmpargc, tmpargv) == -1)
01220     {
01221         return CORBA::ORB::_nil ();
01222     }
01223 
01224   // Make sure the following is done after the global ORB
01225   // initialization since we need to have exceptions initialized.
01226 
01227   // Use this string variable to hold the orbid
01228   ACE_CString orbid_string (orbid);
01229   TAO::parse_orb_opt (command_line, ACE_TEXT("-ORBid"), orbid_string);
01230 
01231   // Get ORB Core
01232   TAO_ORB_Core_Auto_Ptr oc (TAO::ORB_Table::instance ()->find (orbid_string.c_str ()));
01233 
01234     // The ORB was already initialized.  Just return that one.
01235   if (oc.get () != 0)
01236     {
01237       return CORBA::ORB::_duplicate (oc->orb ());
01238     }
01239 
01240 
01241   // Determine the service object registry this ORB will use. The choises
01242   // are: (a) the legacy (global); (b) its own, local, or (c) share somebody
01243   // else's configuration. By default use the process-wide (global) context
01244     // Use this string variable to hold the configuration identity key
01245   ACE_CString orbconfig_string;
01246   TAO::parse_orb_opt (command_line, ACE_TEXT("-ORBGestalt"), orbconfig_string);
01247   ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt> gestalt = TAO::find_orb_context (orbconfig_string);
01248 
01249   // An ORB corresponding to the desired ORBid doesn't exist so create
01250   // a new one.
01251   TAO_ORB_Core * tmp = 0;
01252   ACE_NEW_THROW_EX (tmp,
01253                     TAO_ORB_Core (orbid_string.c_str (), gestalt),
01254                     CORBA::NO_MEMORY (
01255                       CORBA::SystemException::_tao_minor_code (0,
01256                                                                ENOMEM),
01257                       CORBA::COMPLETED_NO));
01258 
01259   // The ORB table increases the reference count on the ORB Core
01260   // so do not release it here.  Allow the TAO_ORB_Core_Auto_Ptr
01261   // to decrease the reference count on the ORB Core when it goes
01262   // out of scope.
01263   oc.reset (tmp);
01264 
01265   // Having the ORB's default static services be shared among all ORBs
01266   // is tempting from the point of view of reducing the dynamic
01267   // footprint. However, if the ORB in a DLL and the rest of that
01268   // application most likely neither cares, nor wishes to know about
01269   // them. Furthermore, if the ORB DLL gets unloaded, the static
01270   // services it had registered globaly will no longer be accesible,
01271   // which will have disastrous consequences at the process
01272   // shutdown. Hence, the ACE_Service_Config_Guard ensures that for
01273   // the current thread, any references to the global
01274   // ACE_Service_Config will be re-routed to this ORB's service gestalt.
01275 
01276   ACE_Service_Config_Guard scg (oc->configuration ());
01277 
01278   // Initialize the Service Configurator.  This must occur before the
01279   // ORBInitializer::pre_init() method is invoked on each registered
01280   // ORB initializer.
01281   int result = TAO::ORB::open_services (oc->configuration (),
01282                                         command_line.get_argc (),
01283                                         command_line.get_TCHAR_argv ());
01284 
01285   // Check for errors returned from <TAO_Internal::open_services>.
01286   if (result != 0 && errno != ENOENT)
01287     {
01288       ACE_ERROR ((LM_ERROR,
01289                   ACE_TEXT ("(%P|%t) %p\n"),
01290                   ACE_TEXT ("Unable to initialize the ")
01291                   ACE_TEXT ("Service Configurator")));
01292       throw ::CORBA::INITIALIZE (
01293         CORBA::SystemException::_tao_minor_code (
01294           TAO_ORB_CORE_INIT_LOCATION_CODE,
01295           0),
01296         CORBA::COMPLETED_NO);
01297     }
01298 
01299   TAO::ORBInitializer_Registry_Adapter * orbinitializer_registry =
01300     oc.get ()->orbinitializer_registry ();
01301 
01302   PortableInterceptor::SlotId slotid = 0;
01303   size_t pre_init_count = 0;
01304 
01305   if (orbinitializer_registry != 0)
01306     {
01307       pre_init_count =
01308         orbinitializer_registry->pre_init (oc.get (),
01309                                            command_line.get_argc(),
01310                                            command_line.get_ASCII_argv(),
01311                                            slotid);
01312     }
01313 
01314   // Initialize the ORB Core instance.
01315   result = oc->init (command_line.get_argc(),
01316                      command_line.get_ASCII_argv());
01317 
01318   if (orbinitializer_registry != 0)
01319     {
01320       orbinitializer_registry->post_init (pre_init_count,
01321                                           oc.get (),
01322                                           command_line.get_argc(),
01323                                           command_line.get_ASCII_argv(),
01324                                           slotid);
01325     }
01326 
01327   if (TAO_debug_level > 2)
01328     {
01329       ACE_DEBUG ((LM_DEBUG,
01330                   ACE_TEXT("TAO (%P|%t) created new ORB <%s>\n"),
01331                   ACE_TEXT_CHAR_TO_TCHAR (orbid_string.c_str ())));
01332     }
01333 
01334   // Before returning remember to store the ORB into the table...
01335   if (TAO::ORB_Table::instance ()->bind (orbid_string.c_str (),
01336                                          oc.get ()) != 0)
01337     throw ::CORBA::INTERNAL (0, CORBA::COMPLETED_NO);
01338 
01339   // Return a duplicate since the ORB_Core should release the last
01340   // reference to the ORB.
01341   return CORBA::ORB::_duplicate (oc->orb ());
01342 }

friend class TAO_ORB_Core_Auto_Ptr [friend]

Definition at line 161 of file ORB_Core.h.


Member Data Documentation

TAO_Adapter_Registry TAO_ORB_Core::adapter_registry_ [protected]

The list of Adapters used in this ORB.

Definition at line 1141 of file ORB_Core.h.

Referenced by adapter_registry(), poa_adapter(), resolve_ior_table_i(), root_poa(), and shutdown().

TAO_BiDir_Adapter* TAO_ORB_Core::bidir_adapter_ [protected]

BiDirectional GIOP factory.

Definition at line 1230 of file ORB_Core.h.

Referenced by load_policy_validators().

CORBA::Boolean TAO_ORB_Core::bidir_giop_policy_ [protected]

Bir Dir GIOP policy value.

Definition at line 1233 of file ORB_Core.h.

Referenced by bidir_giop_policy().

TAO_Client_Strategy_Factory* TAO_ORB_Core::client_factory_ [protected]

Handle to the factory for Client-side strategies.

Definition at line 1088 of file ORB_Core.h.

Referenced by client_factory().

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

The adapter for handling client request interceptors.

Definition at line 1213 of file ORB_Core.h.

Referenced by clientrequestinterceptor_adapter(), clientrequestinterceptor_adapter_i(), and destroy_interceptors().

CORBA::Object_ptr TAO_ORB_Core::codec_factory_ [protected]

The cached IOR for the CodecFactory DLL.

Definition at line 1024 of file ORB_Core.h.

Referenced by fini(), and resolve_codecfactory_i().

TAO_Codeset_Manager* TAO_ORB_Core::codeset_manager_ [protected]

Code Set Manager, received from the Resource Factory.

Definition at line 1239 of file ORB_Core.h.

Referenced by codeset_manager(), and ~TAO_ORB_Core().

TAO_Collocation_Resolver* TAO_ORB_Core::collocation_resolver_ [protected]

Definition at line 1004 of file ORB_Core.h.

Referenced by collocation_resolver().

CORBA::ULong TAO_ORB_Core::collocation_strategy_ [protected]

Default collocation policy. This should never be ORB_CONTROL.

Definition at line 1117 of file ORB_Core.h.

Referenced by get_collocation_strategy(), and init().

CORBA::Object_ptr TAO_ORB_Core::compression_manager_ [protected]

The cached IOR for the Compression DLL.

Definition at line 1027 of file ORB_Core.h.

Referenced by resolve_compression_manager_i().

ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt> TAO_ORB_Core::config_ [protected]

ORB's service configuration.

Definition at line 1242 of file ORB_Core.h.

Referenced by configuration().

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 1150 of file ORB_Core.h.

TAO_Policy_Set* TAO_ORB_Core::default_policies_ [protected]

The default policies.

Definition at line 1125 of file ORB_Core.h.

Referenced by get_default_policies(), and ~TAO_ORB_Core().

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

This strategy will not queue by default and not flush.

Definition at line 1188 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 1179 of file ORB_Core.h.

Referenced by get_transport_queueing_strategy(), set_delayed_transport_queueing_strategy(), and ~TAO_ORB_Core().

CORBA::Object_ptr TAO_ORB_Core::dynany_factory_ [protected]

The cached object reference for the DynAnyFactory.

Definition at line 1030 of file ORB_Core.h.

Referenced by fini(), and resolve_dynanyfactory_i().

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

This strategy will buffer messages.

Definition at line 1176 of file ORB_Core.h.

Referenced by get_transport_queueing_strategy(), set_eager_transport_queueing_strategy(), and ~TAO_ORB_Core().

TAO_Endpoint_Selector_Factory* TAO_ORB_Core::endpoint_selector_factory_ [protected]

Definition at line 1171 of file ORB_Core.h.

Referenced by endpoint_selector_factory().

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 1183 of file ORB_Core.h.

Referenced by get_transport_queueing_strategy(), and ~TAO_ORB_Core().

TAO_Flushing_Strategy* TAO_ORB_Core::flushing_strategy_ [protected]

Hold the flushing strategy.

Definition at line 1236 of file ORB_Core.h.

Referenced by flushing_strategy(), init(), and ~TAO_ORB_Core().

CORBA::Boolean TAO_ORB_Core::ft_send_extended_sc_ [protected]

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 1106 of file ORB_Core.h.

Referenced by ft_send_extended_sc(), and init().

TAO_Fault_Tolerance_Service TAO_ORB_Core::ft_service_ [protected]

Fault Tolerant service hook.

Definition at line 1099 of file ORB_Core.h.

Referenced by fault_tolerance_service(), and services_callbacks_init().

bool TAO_ORB_Core::has_shutdown_ [protected]

Flag which denotes that the ORB has been shutdown.

Definition at line 1160 of file ORB_Core.h.

Referenced by has_shutdown(), init(), and shutdown().

CORBA::Object_ptr TAO_ORB_Core::implrepo_service_ [protected]

The cached IOR for the Implementation Repository.

Definition at line 1012 of file ORB_Core.h.

Referenced by implrepo_service(), and shutdown().

int TAO_ORB_Core::imr_endpoints_in_ior_ [protected]

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

Definition at line 1018 of file ORB_Core.h.

Referenced by imr_endpoints_in_ior(), and init().

InitRefMap TAO_ORB_Core::init_ref_map_ [protected]

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

Definition at line 1068 of file ORB_Core.h.

Referenced by init_ref_map(), and list_initial_references().

TAO_IORInterceptor_Adapter* TAO_ORB_Core::ior_interceptor_adapter_ [protected]

IORInterceptor adapter.

Definition at line 1221 of file ORB_Core.h.

Referenced by destroy_interceptors(), and ior_interceptor_adapter().

CORBA::Object_ptr TAO_ORB_Core::ior_manip_factory_ [protected]

The cached object reference for the IORManipulataion.

Definition at line 1033 of file ORB_Core.h.

Referenced by fini(), and resolve_iormanipulation_i().

CORBA::Object_ptr TAO_ORB_Core::ior_table_ [protected]

The cached object reference for the IORTable.

Definition at line 1036 of file ORB_Core.h.

Referenced by fini(), and resolve_ior_table_i().

TAO_SYNCH_MUTEX TAO_ORB_Core::lock_ [protected]

Synchronize internal state...

Definition at line 1000 of file ORB_Core.h.

CORBA::Object_ptr TAO_ORB_Core::monitor_ [protected]

The cached object reference for the Monitor.

Definition at line 1039 of file ORB_Core.h.

Referenced by fini(), and resolve_monitor_i().

TAO_Network_Priority_Protocols_Hooks* TAO_ORB_Core::network_priority_protocols_hooks_

Handle to the factory for network_priority_protocols_hooks_..

Definition at line 540 of file ORB_Core.h.

Referenced by get_network_priority_protocols_hooks(), init(), and service_context_list().

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 1076 of file ORB_Core.h.

Referenced by fini(), and object_key_table().

TAO_Object_Ref_Table TAO_ORB_Core::object_ref_table_ [protected]

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 1073 of file ORB_Core.h.

Referenced by list_initial_references(), object_ref_table(), and shutdown().

TAO_SYNCH_MUTEX TAO_ORB_Core::open_lock_ [protected]

Mutual exclusion for calling open.

Definition at line 1169 of file ORB_Core.h.

CORBA::Boolean TAO_ORB_Core::opt_for_collocation_ [protected]

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

Definition at line 1110 of file ORB_Core.h.

Referenced by init(), and optimize_collocation_objects().

CORBA::ORB_ptr TAO_ORB_Core::orb_ [protected]

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 1057 of file ORB_Core.h.

Referenced by implrepo_service(), init(), orb(), and ~TAO_ORB_Core().

TAO_ORB_Parameters TAO_ORB_Core::orb_params_ [protected]

Parameters used by the ORB.

Definition at line 1065 of file ORB_Core.h.

Referenced by init(), and orb_params().

char* TAO_ORB_Core::orbid_ [protected]

The ORBid for this ORB.

Definition at line 1079 of file ORB_Core.h.

Referenced by fini(), and orbid().

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

Registry containing all orb initializers.

Definition at line 1197 of file ORB_Core.h.

Referenced by orbinitializer_registry(), orbinitializer_registry_i(), and ~TAO_ORB_Core().

TAO_Parser_Registry TAO_ORB_Core::parser_registry_ [protected]

The IOR parser registry.

Definition at line 1227 of file ORB_Core.h.

Referenced by init(), and parser_registry().

CORBA::Object_ptr TAO_ORB_Core::pi_current_ [protected]

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 1210 of file ORB_Core.h.

Referenced by pi_current(), resolve_picurrent_i(), and shutdown().

TAO_Adapter* TAO_ORB_Core::poa_adapter_ [protected]

An optimization for the POA.

Definition at line 1144 of file ORB_Core.h.

Referenced by poa_adapter().

CORBA::Object_var TAO_ORB_Core::poa_current_ [protected]

POA current.

Definition at line 1138 of file ORB_Core.h.

Referenced by resolve_poa_current_i().

TAO_Policy_Current* TAO_ORB_Core::policy_current_ [protected]

Policy current.

Definition at line 1128 of file ORB_Core.h.

Referenced by policy_current(), and ~TAO_ORB_Core().

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

Registry containing all registered policy factories.

Definition at line 1194 of file ORB_Core.h.

Referenced by policy_factory_registry(), policy_factory_registry_i(), and ~TAO_ORB_Core().

TAO_Policy_Manager* TAO_ORB_Core::policy_manager_ [protected]

The Policy_Manager for this ORB.

Definition at line 1122 of file ORB_Core.h.

Referenced by policy_manager(), and ~TAO_ORB_Core().

TAO_ProtocolFactorySet* TAO_ORB_Core::protocol_factories_ [protected]

Definition at line 1008 of file ORB_Core.h.

Referenced by init().

TAO_Protocols_Hooks* TAO_ORB_Core::protocols_hooks_

Handle to the factory for protocols_hooks_..

Definition at line 537 of file ORB_Core.h.

Referenced by get_protocols_hooks(), init(), and service_context_list().

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

Number of outstanding references to this object.

Definition at line 1191 of file ORB_Core.h.

Referenced by _decr_refcnt(), and _incr_refcnt().

TAO_Request_Dispatcher* TAO_ORB_Core::request_dispatcher_ [protected]

The request dispatching strategy.

Definition at line 1133 of file ORB_Core.h.

Referenced by request_dispatcher(), and ~TAO_ORB_Core().

TAO_Resource_Factory* TAO_ORB_Core::resource_factory_ [protected]

Handle to the factory for resource information..

Definition at line 1082 of file ORB_Core.h.

Referenced by resource_factory().

CORBA::Object_var TAO_ORB_Core::root_poa_ [protected]

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 1062 of file ORB_Core.h.

Referenced by root_poa().

CORBA::Object_var TAO_ORB_Core::rt_current_ [protected]

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

Definition at line 1046 of file ORB_Core.h.

CORBA::Object_var TAO_ORB_Core::rt_orb_ [protected]

The cached object reference for the RTCORBA::RTORB.

Definition at line 1043 of file ORB_Core.h.

Referenced by resolve_rt_orb().

TAO_Server_Strategy_Factory* TAO_ORB_Core::server_factory_ [protected]

Handle to the factory for Server-side strategies.

Definition at line 1091 of file ORB_Core.h.

Referenced by run(), and server_factory().

ACE_CString TAO_ORB_Core::server_id_ [protected]

The server_id_ that was passed via -ORBServerId option.

Definition at line 1085 of file ORB_Core.h.

Referenced by init(), and server_id().

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

The adapter for handling server request interceptors.

Definition at line 1216 of file ORB_Core.h.

Referenced by destroy_interceptors(), serverrequestinterceptor_adapter(), and serverrequestinterceptor_adapter_i().

TAO_Service_Context_Registry TAO_ORB_Core::service_context_registry_ [protected]

Registry containing all service context handlers.

Definition at line 1200 of file ORB_Core.h.

Referenced by service_context_registry().

TAO_Stub_Factory* TAO_ORB_Core::stub_factory_ [protected]

Definition at line 1006 of file ORB_Core.h.

Referenced by stub_factory().

Sync_Scope_Hook TAO_ORB_Core::sync_scope_hook_ [protected]

The hook to be set for the SyncScopePolicy.

Definition at line 1245 of file ORB_Core.h.

Referenced by call_sync_scope_hook(), and set_sync_scope_hook().

TAO_Thread_Lane_Resources_Manager* TAO_ORB_Core::thread_lane_resources_manager_ [protected]

Definition at line 1002 of file ORB_Core.h.

Referenced by fini(), thread_lane_resources_manager(), and ~TAO_ORB_Core().

ACE_Time_Value TAO_ORB_Core::thread_per_connection_timeout_ [protected]

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

Definition at line 1165 of file ORB_Core.h.

Referenced by init(), and thread_per_connection_timeout().

int TAO_ORB_Core::thread_per_connection_use_timeout_ [protected]

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

Definition at line 1164 of file ORB_Core.h.

Referenced by init(), and thread_per_connection_timeout().

Timeout_Hook TAO_ORB_Core::timeout_hook_ [protected]

The hook to be set for the RelativeRoundtripTimeoutPolicy.

Definition at line 1248 of file ORB_Core.h.

Referenced by call_timeout_hook(), and set_timeout_hook().

ACE_Thread_Manager TAO_ORB_Core::tm_ [protected]

The Thread Manager.

Definition at line 1147 of file ORB_Core.h.

Referenced by init(), and thr_mgr().

TAO_Cleanup_Func_Registry TAO_ORB_Core::tss_cleanup_funcs_ [protected]

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

Definition at line 1154 of file ORB_Core.h.

Referenced by add_tss_cleanup_func(), and tss_cleanup_funcs().

CORBA::Object_ptr TAO_ORB_Core::typecode_factory_ [protected]

The cached IOR for the TypeCodeFactory DLL.

Definition at line 1021 of file ORB_Core.h.

Referenced by fini(), and resolve_typecodefactory_i().

CORBA::Boolean TAO_ORB_Core::use_global_collocation_ [protected]

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

Definition at line 1114 of file ORB_Core.h.

Referenced by init(), and use_global_collocation().

int TAO_ORB_Core::use_implrepo_ [protected]

Flag for whether the implrepo support is enabled or not.

Definition at line 1015 of file ORB_Core.h.

Referenced by init(), and use_implrepo().

bool TAO_ORB_Core::use_local_memory_pool_ [private]

Definition at line 995 of file ORB_Core.h.

Referenced by init().

TAO_Valuetype_Adapter* TAO_ORB_Core::valuetype_adapter_ [protected]

Pointer to the valuetype adapter.

Definition at line 1224 of file ORB_Core.h.

Referenced by shutdown(), and valuetype_adapter().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:39:39 2010 for TAO by  doxygen 1.4.7