Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / ORB_Core.h
blob4802fd6e5fb614b2eb660a7b4e224a26f61d076a
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file ORB_Core.h
7 * @author DOC Center - Washington University at St. Louis
8 * @author DOC Laboratory - University of California at Irvine
9 */
10 // ===================================================================
12 #ifndef TAO_ORB_CORE_H
13 #define TAO_ORB_CORE_H
15 #include /**/ "ace/pre.h"
17 #include "tao/Resource_Factory.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/Collocation_Strategy.h"
24 #include "tao/params.h"
25 #include "tao/ORB_Constants.h"
26 #include "tao/Parser_Registry.h"
27 #include "tao/Service_Callbacks.h"
28 #include "tao/Fault_Tolerance_Service.h"
29 #include "tao/Cleanup_Func_Registry.h"
30 #include "tao/Object_Ref_Table.h"
31 #include "tao/ObjectKey_Table.h"
32 #include "tao/Messaging_SyncScopeC.h"
33 #include "tao/Object.h"
34 #include "tao/Invocation_Utils.h"
35 #include "tao/Adapter_Registry.h"
36 #include "tao/ORB_Core_TSS_Resources.h"
37 #include "tao/Service_Context_Handler_Registry.h"
39 #include "ace/Array_Map.h"
40 #include "ace/Thread_Manager.h"
41 #include "ace/Lock_Adapter_T.h"
42 #include "ace/TSS_T.h"
43 #include "ace/Service_Config.h"
44 #include <atomic>
46 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
47 class ACE_Data_Block;
48 ACE_END_VERSIONED_NAMESPACE_DECL
50 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
52 #if TAO_HAS_INTERCEPTORS == 1
54 namespace TAO
56 class ClientRequestInterceptor_Adapter;
57 class ServerRequestInterceptor_Adapter;
60 #endif /* TAO_HAS_INTERCEPTORS == 1 */
62 class TAO_Adapter;
63 class TAO_Acceptor;
64 class TAO_Connector;
65 class TAO_Connector_Registry;
67 class TAO_Resource_Factory;
68 class TAO_Client_Strategy_Factory;
69 class TAO_Server_Strategy_Factory;
71 class TAO_TSS_Resources;
72 class TAO_Leader_Follower;
73 class TAO_LF_Strategy;
74 class TAO_RT_ORB;
75 class TAO_MProfile;
76 class TAO_Profile;
78 class TAO_Endpoint_Selector_Factory;
79 class TAO_Message_State_Factory;
80 class TAO_Protocols_Hooks;
81 class TAO_Network_Priority_Protocols_Hooks;
82 class TAO_BiDir_Adapter;
83 class TAO_ZIOP_Adapter;
85 class TAO_Flushing_Strategy;
87 class TAO_Thread_Lane_Resources_Manager;
88 class TAO_Collocation_Resolver;
89 class TAO_Thread_Lane_Resources;
90 class TAO_Stub_Factory;
91 class TAO_Endpoint_Selector_Factory;
92 class TAO_Service_Context;
93 class TAO_Request_Dispatcher;
94 class TAO_Policy_Set;
95 class TAO_Policy_Manager;
96 class TAO_Policy_Current;
98 class TAO_Codeset_Manager;
99 class TAO_IORInterceptor_Adapter;
100 class TAO_Valuetype_Adapter;
102 class TAO_Policy_Validator;
104 namespace TAO
106 class GUIResource_Factory;
107 class PolicyFactory_Registry_Adapter;
108 class ORBInitializer_Registry_Adapter;
109 class Transport_Queueing_Strategy;
112 namespace CORBA
114 class ORB_ObjectIdList; // CORBA::ORB::ObjectIdList
115 class ORB;
116 typedef ORB *ORB_ptr;
118 class PolicyList;
121 namespace IOP
123 class ServiceContextList;
126 namespace PortableInterceptor
128 class IORInterceptor;
129 typedef IORInterceptor *IORInterceptor_ptr;
131 #if TAO_HAS_INTERCEPTORS == 1
133 class ClientRequestInterceptor;
134 typedef ClientRequestInterceptor *ClientRequestInterceptor_ptr;
136 class ServerRequestInterceptor;
137 typedef ServerRequestInterceptor *ServerRequestInterceptor_ptr;
139 #endif /* TAO_HAS_INTERCEPTORS == 1 */
142 // ****************************************************************
144 * @class TAO_ORB_Core
146 * @brief Encapsulates the state of an ORB.
148 * This is the implementation class for the CORBA::ORB interface. The
149 * class also encapsulates the access to the ORB resources and its
150 * state.
151 * @par
152 * Some resources can be TSS or global, those resources are always
153 * accessed through a TSS interface, but are allocated using the
154 * Resource_Factory. If the resource is really global the
155 * Resource_Factory will simply return a pointer to the global
156 * instance.
158 class TAO_Export TAO_ORB_Core
160 friend struct TAO_ORB_Core_Decr_Refcnt;
161 friend TAO_Export CORBA::ORB_ptr CORBA::ORB_init (int &,
162 ACE_TCHAR *argv[],
163 const char *);
164 public:
165 /// Constructor.
166 TAO_ORB_Core (const char* id, ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt> g);
168 /// Accessor for the ORB parameters.
169 TAO_ORB_Parameters *orb_params ();
172 * @todo
173 * In the future this hook should change, instead of hardcoding the
174 * object we should add a "Resolver" to the ORB, so the "POACurrent"
175 * object returns a per-ORB object.
176 * @par
177 * Similarly, each ORB should implement the TSS pattern to put the
178 * POA_Current_Impl in a void* slot. The current approach *does*
179 * decouple the POA from the ORB, but it cannot add new adapters or
180 * other components transparently.
182 /// Accessor to the POA current.
183 //@{
184 CORBA::Object_ptr poa_current();
185 //@}
187 /// Get the connector registry
188 TAO_Connector_Registry *connector_registry ();
190 /// Get the IOR parser registry
191 TAO_Parser_Registry *parser_registry ();
193 /// Return pointer to the policy factory registry associated with
194 /// this ORB core.
195 TAO::PolicyFactory_Registry_Adapter *policy_factory_registry ();
197 /// Return pointer to the orb initializer registry associated with
198 /// this ORB core. Tries to load the PI library if it is not loaded
199 /// yet
200 TAO::ORBInitializer_Registry_Adapter *orbinitializer_registry ();
202 TAO_ZIOP_Adapter *ziop_adapter () const;
203 void ziop_adapter (TAO_ZIOP_Adapter *adapter);
205 TAO_Service_Context_Registry &service_context_registry ();
207 /// Get the protocol factories
208 TAO_ProtocolFactorySet *protocol_factories ();
210 /// Get pointer to the ORB.
211 CORBA::ORB_ptr orb ();
213 /// Wrappers that forward the request to the concurrency strategy.
214 ACE_Reactor *reactor ();
216 /// Get the ACE_Thread_Manager
217 ACE_Thread_Manager *thr_mgr ();
219 /// Return the RootPOA, or try to load it if not initialized already.
220 CORBA::Object_ptr root_poa ();
222 /// Get the adapter registry
223 TAO_Adapter_Registry &adapter_registry ();
225 /// @name Collocation Strategies as configured by the user
226 //@{
227 enum
229 /// Indicate object should refer to ORB for either one of the
230 /// following strategies.
231 ORB_CONTROL,
233 /// Collocated calls will go thru POA.
234 TAO_COLLOCATION_THRU_POA,
236 /// Collocated calls invoke operation on Servant directly.
237 TAO_COLLOCATION_DIRECT,
239 /// Collocated calls invoke operation on Servant directly if possible,
240 /// else Collocated calls will go thru POA if possible, else
241 /// use REMOTE_STRATEGY
242 TAO_COLLOCATION_BEST
245 /// Set/get the collocation flags
246 //@{
247 void optimize_collocation_objects (CORBA::Boolean opt);
248 CORBA::Boolean optimize_collocation_objects () const;
250 void use_global_collocation (CORBA::Boolean opt);
251 CORBA::Boolean use_global_collocation () const;
253 CORBA::ULong get_collocation_strategy () const;
254 //@}
256 /// Get the adapter named "RootPOA" and cache the result, this is an
257 /// optimization for the POA.
258 TAO_Adapter *poa_adapter ();
261 * @name Access to Factories
263 * These factories are not thread-specific, and are presented here
264 * in order to have one place to get useful information. Often, the
265 * instances to which the return pointers are stored in the Service
266 * Repository.
268 //@{
269 /// Returns pointer to the resource factory.
270 TAO_Resource_Factory *resource_factory ();
272 /// Returns pointer to the factory for creating gui resources
273 TAO::GUIResource_Factory *gui_resource_factory ();
275 /// Returns pointer to the client factory.
276 TAO_Client_Strategy_Factory *client_factory ();
278 /// Returns pointer to the server factory.
279 TAO_Server_Strategy_Factory *server_factory ();
281 /// Returns pointer to the Protocols_Hooks.
282 TAO_Protocols_Hooks *protocols_hooks ();
284 /// Returns a pointer to the Thread Lane Resources Manager.
285 TAO_Thread_Lane_Resources_Manager &thread_lane_resources_manager ();
287 /// Returns a pointer to the Collocation Resolver.
288 TAO_Collocation_Resolver &collocation_resolver ();
290 /// Returns a pointer to the Stub factory.
291 TAO_Stub_Factory *stub_factory ();
293 /// Returns a pointer to the endpoint selector factory.
294 TAO_Endpoint_Selector_Factory *endpoint_selector_factory ();
296 //@}
298 /// Sets the value of TAO_ORB_Core::resource_factory_
299 static void set_resource_factory (const char *resource_factory_name);
301 /** Sets the value of TAO_ORB_Core::gui_resource_factory_.
303 * Sets the value of gui_resource_factory in TSS. ORB_Core is responsible
304 * for releasing this factory if needed.
306 static void set_gui_resource_factory (TAO::GUIResource_Factory *gui_factory);
308 /// Sets the value of TAO_ORB_Core::network_priority_protocols_hooks_
309 static void set_network_priority_protocols_hooks (
310 const char *network_priority_protocols_hooks_name);
312 /// Gets the value of TAO_ORB_Core::protocols_hooks__
313 TAO_Protocols_Hooks * get_protocols_hooks ();
315 /// Gets the value of TAO_ORB_Core::network_priority_protocols_hooks__
316 TAO_Network_Priority_Protocols_Hooks *
317 get_network_priority_protocols_hooks ();
319 /// Sets the value of TAO_ORB_Core::dynamic_adapter_name_.
320 static void dynamic_adapter_name (const char *name);
322 /// Gets the value of TAO_ORB_Core::dynamic_adapter_name_.
323 static const char *dynamic_adapter_name ();
325 /// Sets the value of TAO_ORB_Core::ifr_client_adapter_name_.
326 static void ifr_client_adapter_name (const char *name);
328 /// Gets the value of TAO_ORB_Core::ifr_client_adapter_name_.
329 static const char *ifr_client_adapter_name ();
331 /// Sets the value of TAO_ORB_Core::typecodefactory_adapter_name_.
332 static void typecodefactory_adapter_name (const char *name);
334 /// Gets the value of TAO_ORB_Core::typecodefactory_adapter_name_.
335 static const char *typecodefactory_adapter_name ();
337 /// Sets the value of TAO_ORB_Core::iorinterceptor_adapter_factory_name_.
338 static void iorinterceptor_adapter_factory_name (const char *name);
340 /// Gets the value of TAO_ORB_Core::iorinterceptor_adapter_factory_name_.
341 static const char *iorinterceptor_adapter_factory_name ();
343 /// Sets the value of TAO_ORB_Core::valuetype_adapter_factory_name.
344 static void valuetype_adapter_factory_name (const char *name);
346 /// Gets the value of TAO_ORB_Core::valuetype_adapter_factory_name.
347 static const char *valuetype_adapter_factory_name ();
349 /// See if we have a collocated address, if yes, return the POA
350 /// associated with the address.
351 int is_collocated (const TAO_MProfile& mprofile);
353 /// This allocator is always TSS and has no locks. It is intended
354 /// for allocating the ACE_Data_Blocks used in *outgoing* CDR
355 /// streams.
356 ACE_Allocator *output_cdr_dblock_allocator ();
358 /// This allocator is always TSS and has no locks. It is intended
359 /// for allocating the buffers used in *outgoing* CDR streams.
360 ACE_Allocator *output_cdr_buffer_allocator ();
362 /// This allocator is always TSS and has no locks. It is intended
363 /// for allocating the ACE_Data_Blocks used in *outgoing* CDR
364 /// streams.
365 ACE_Allocator *output_cdr_msgblock_allocator ();
367 /// This allocator is global, may or may not have locks. It is
368 /// intended for allocating the ACE_Data_Blocks used in *incoming*
369 /// CDR streams.
370 ACE_Allocator *input_cdr_dblock_allocator ();
372 /// This allocator is always global and has no locks. It is intended
373 /// for allocating the buffers used in *incoming* CDR streams.
374 ACE_Allocator *input_cdr_buffer_allocator ();
376 /// This allocator is always global and has no locks. It is intended
377 /// for allocating the buffers used in *incoming* CDR streams.
378 ACE_Allocator *input_cdr_msgblock_allocator ();
380 /// This allocator is always global and has no locks. It is intended
381 /// for allocating the buffers used to queue messages in
382 /// transports.
383 ACE_Allocator *transport_message_buffer_allocator ();
385 /// The Message Blocks used for input CDRs must have appropriate
386 /// locking strategies.
387 ACE_Data_Block *create_input_cdr_data_block (size_t size);
389 /// Return the locking strategy used for the data blocks.
390 ACE_Lock *locking_strategy ();
392 #if (TAO_HAS_CORBA_MESSAGING == 1)
394 /// Accessor method for the default_policies_
395 TAO_Policy_Set *get_default_policies ();
397 /// Get a policy. First, check the ORB-level Policy Manager, then
398 /// check the ORB defaults.
399 CORBA::Policy_ptr get_policy (CORBA::PolicyType type);
401 /// Get a policy. First, check the thread current, then check the
402 /// ORB-level Policy Manager, then check the ORB defaults.
403 CORBA::Policy_ptr get_policy_including_current (CORBA::PolicyType type);
405 /// Get a cached policy. First, check the ORB-level Policy Manager,
406 /// then check the ORB defaults.
407 CORBA::Policy_ptr get_cached_policy (TAO_Cached_Policy_Type type);
409 /// Get a cached policy. First, check the thread current, then
410 /// check the ORB-level Policy Manager, then check the ORB defaults.
411 CORBA::Policy_ptr get_cached_policy_including_current (
412 TAO_Cached_Policy_Type type);
414 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
417 * The thread has a default environment to simplify porting between
418 * platforms that support native C++ exceptions and those that
419 * don't. This is a TSS resource (always), but with a twist: if the
420 * user creates a new environment the old one is "pushed" (actually
421 * the new one remembers it), eventually the new environment
422 * destructor pops itself from the stack and we recover the old
423 * environment.
424 * @par
425 * This means that if the user create a new environment and somebody
426 * calls a function using the default one the exception will still
427 * be received in the environment created by the user.
428 * The only drawback is that environments life time must nest
429 * properly, this shouldn't be a problem because environments are
430 * usually created on the stack, but, the spec allows their creation
431 * on the heap and/or as class members; we need to investigate the
432 * tradeoffs and take a decision.
434 //@{
435 CORBA::Environment *default_environment () const;
436 void default_environment (CORBA::Environment*);
437 //@}
439 #if (TAO_HAS_CORBA_MESSAGING == 1)
441 /// Return the Policy_Manager for this ORB.
442 TAO_Policy_Manager *policy_manager ();
444 /// Accesors to the policy current, this object should be kept in
445 /// TSS storage. The POA has to reset the policy current object on
446 /// every upcall.
447 TAO_Policy_Current &policy_current ();
449 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
451 /// Invoke the timeout hook if present.
453 * The timeout hook is used to determine if the timeout policy is
454 * set and with what value. If the ORB is compiled without support
455 * for Messaging this feature does not take effect
456 * \param has_timeout returns 0 if there is no timeout policy set.
457 * \param time_value returns the timeout value in effect for the object,
458 * thread and current ORB.
460 void call_timeout_hook (TAO_Stub *stub,
461 bool &has_timeout,
462 ACE_Time_Value &time_value);
464 /// Define the Timeout_Hook signature
465 typedef void (*Timeout_Hook) (TAO_ORB_Core *,
466 TAO_Stub *,
467 bool&,
468 ACE_Time_Value&);
470 void set_timeout_hook (Timeout_Hook hook);
472 /// Invoke the timeout hook if present.
474 * The timeout hook is used to determine if the timeout policy is
475 * set and with what value. If the ORB is compiled without support
476 * for Messaging this feature does not take effect
477 * \param has_timeout returns 0 if there is no timeout policy set.
478 * \param time_value returns the timeout value in effect for the object,
479 * thread and current ORB.
481 void connection_timeout (TAO_Stub *stub,
482 bool &has_timeout,
483 ACE_Time_Value &time_value);
485 /// Define the Timeout_Hook signature
487 * The connection timeout hook was originally defined to allow the
488 * TAO Messaging code to be factored out of the core TAO library and
489 * placed in to an optional library. Since then, a new invocation
490 * endpoint selector, the optimised connection endpoint selector
491 * (see Strategies/OC_Endpoint_Selector.h) reused this connection
492 * timeout hook. However, this set up a problem when both the
493 * Messaging library and OCES are being used in the same
494 * application.
496 * The solution was to add a new connection timeout hook attribute
497 * (see alt_connection_timeout_hook_ below). This method now checks
498 * to see if the connection timeout hook is already set, and if so
499 * assigns the supplied hook value to the alternate connection
500 * timeout hook. This functionality has a side-effect of assuming
501 * that hooks are NEVER unloaded or actively replaced. IOW, no one
502 * will call this method with a 0 or some other pointer value to
503 * replace an existing hook.
505 * If such functionality as unloading a hook pointer is required,
506 * then this method must be extended to give some kind of identity
507 * for the hook. Additional changes to the definition of the hook
508 * will also be necessary to support such identity and manipulation.
510 static void connection_timeout_hook (Timeout_Hook hook);
512 void call_sync_scope_hook (TAO_Stub *stub,
513 bool &has_synchronization,
514 Messaging::SyncScope &scope);
516 #if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)
518 TAO::Transport_Queueing_Strategy *get_transport_queueing_strategy (
519 TAO_Stub *stub,
520 Messaging::SyncScope &scope);
522 #endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */
524 typedef void (*Sync_Scope_Hook) (TAO_ORB_Core *,
525 TAO_Stub *,
526 bool &,
527 Messaging::SyncScope &);
529 void set_sync_scope_hook (Sync_Scope_Hook hook);
531 /// Default Sync_Scope_Hook.
532 static void default_sync_scope_hook (TAO_ORB_Core *,
533 TAO_Stub *,
534 bool &has_synchronization,
535 Messaging::SyncScope &scope);
537 /// Return the default sync scope configured for this ORB
538 Messaging::SyncScope default_sync_scope ();
540 /// Handle to the factory for protocols_hooks_..
541 TAO_Protocols_Hooks *protocols_hooks_;
543 /// Handle to the factory for network_priority_protocols_hooks_..
544 TAO_Network_Priority_Protocols_Hooks *network_priority_protocols_hooks_;
546 /// Obtain the TSS resources of this orb.
547 TAO_ORB_Core_TSS_Resources* get_tss_resources ();
549 /// Obtain the TSS resource in the given slot.
550 void* get_tss_resource (size_t slot_id);
552 /// Set the TSS resource at the given slot.
553 /// Returns 0 on success, and -1 on failure.
554 int set_tss_resource (size_t slot_id, void *);
556 /// Register a TSS cleanup function. The slot ID for the
557 /// corresponding ORB core TSS resource is returned by the reference
558 /// argument. This method return 0 on success, and -1 on failure.
559 int add_tss_cleanup_func (ACE_CLEANUP_FUNC cleanup, size_t &slot_id);
561 /// Cleans up ts_objects using the underlying TSS cleanup function registry.
562 void tss_cleanup (ACE_Array_Base<void *> &ts_objects);
564 /// Get access to the leader_follower class.
565 TAO_Leader_Follower &leader_follower ();
567 /// Get access to the leader follower strategy.
568 TAO_LF_Strategy &lf_strategy ();
570 /// Get access to the thread lane resources.
571 TAO_Thread_Lane_Resources &lane_resources ();
573 /// Run the event loop.
574 int run (ACE_Time_Value *tv, int perform_work);
576 /// End the event loop
577 void shutdown (CORBA::Boolean wait_for_completion);
579 /// Get the shutdown flag value
580 bool has_shutdown () const;
582 /// Shutdown the ORB and free resources
583 void destroy ();
585 /// Check if ORB has shutdown. If it has, throw an exception.
586 void check_shutdown ();
588 /// Returns the @a timeout value used by the server threads to poll
589 /// the shutdown flag. If the return value is zero then the server
590 /// threads block forever.
591 int thread_per_connection_timeout (ACE_Time_Value &timeout) const;
593 /// Makes sure that the ORB is open and then creates a TAO_Stub
594 /// based on the endpoint.
595 TAO_Stub *create_stub_object (TAO_MProfile &mprofile,
596 const char *type_id,
597 CORBA::PolicyList *policy_list);
599 /// Factory method that create the "right" Stub depending on
600 /// whether RTCORBA is loaded or not. The factory used to create
601 /// the stub, is loaded at ORB initialization, and its type depends
602 /// on the fact that RTCORBA is being used or not.
603 TAO_Stub *create_stub (const char *repository_id,
604 const TAO_MProfile &profiles);
606 /// Create a new object, use the adapter registry to create a
607 /// collocated object, if not possible then create a regular
608 /// object.
609 CORBA::Object_ptr create_object (TAO_Stub *the_stub);
611 /// Initialize a new object, use the adapter registry to initialize a
612 /// collocated object, if not possible then initialize a regular
613 /// object.
614 /// NOTE: Why would this method be required? The answer is if the
615 /// user decides to use lazy initialization of CORBA object, then
616 /// this is the route that we have to take to do the
617 /// initialization.
618 CORBA::Long initialize_object (TAO_Stub *the_stub, CORBA::Object_ptr obj);
620 /// Reinitialise a stub after the effective profile has changed.
621 /// This will happen after a location forward has been received
622 /// or if a location forward supplied new target subsequently fails.
623 CORBA::Long reinitialize_object (TAO_Stub *stub);
625 /// Return ORBid string.
626 const char *orbid () const;
628 /// Set/Get the IOR of the Implementation Repository service.
629 //@{
630 CORBA::Object_ptr implrepo_service ();
631 void implrepo_service (const CORBA::Object_ptr ir);
632 //@}
634 /// Do we attempt to register with the Implementation Repository
635 CORBA::Boolean use_implrepo ();
637 /// Do we put the ImR's endpoints into persistent object references we create
638 CORBA::Boolean imr_endpoints_in_ior ();
640 /// Resolve the TypeCodeFactory DLL.
641 CORBA::Object_ptr resolve_typecodefactory ();
643 #if TAO_HAS_INTERCEPTORS == 1
644 /// Resolve the PICurrent.
645 CORBA::Object_ptr resolve_picurrent ();
646 #endif /* TAO_HAS_INTERCEPTORS == 1 */
648 /// Resolve POA Current.
649 CORBA::Object_ptr resolve_poa_current ();
651 /// Resolve the CodecFactory DLL.
652 CORBA::Object_ptr resolve_codecfactory ();
654 /// Resolve the Compression DLL.
655 CORBA::Object_ptr resolve_compression_manager ();
657 /// Resolve the Dynamic Any Factory
658 CORBA::Object_ptr resolve_dynanyfactory ();
660 /// Resolve the IOR Manipulation reference for this ORB.
661 CORBA::Object_ptr resolve_ior_manipulation ();
663 TAO_ZIOP_Adapter* ziop_adapter_i ();
665 /// Resolve the IOR Table reference for this ORB.
666 CORBA::Object_ptr resolve_ior_table ();
668 /// Resolve the Async IOR Table reference for this ORB.
669 CORBA::Object_ptr resolve_async_ior_table ();
671 /// Resolve the Monitor reference for this ORB.
672 CORBA::Object_ptr resolve_monitor ();
674 /// Resolve an initial reference via the -ORBInitRef and
675 // -ORBDefaultInitRef options.
676 CORBA::Object_ptr resolve_rir (const char *name);
678 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
679 /// Resolve the RT ORB reference for this ORB.
680 CORBA::Object_ptr resolve_rt_orb ();
681 #endif
683 /// Resolve the RT Current flyweight for this ORB.
684 /// Return server_id string.
685 const char *server_id () const;
687 /// List all the service known by the ORB
688 CORBA::ORB_ObjectIdList *list_initial_references ();
690 /// Reference counting...
691 unsigned long _incr_refcnt ();
692 unsigned long _decr_refcnt ();
693 unsigned long _refcnt () const;
695 /// Register the handle of an open connection with the ORB Core
696 /// handle set. This handle set will be used to explicitly remove
697 /// corresponding event handlers from the reactor.
698 int register_handle (ACE_HANDLE handle);
700 /// Remove @a handle from the ORB Core's handle set so that it
701 /// isn't included in the set that is passed to the reactor upon ORB
702 /// destruction.
703 int remove_handle (ACE_HANDLE handle);
706 * @name ORB Core Service Hooks
708 * These methods would represent the hooks in the ORB Core. These
709 * hooks would be used to call back on the services or other
710 * features that are dynamically loaded.
712 //@{
714 * The loaded service in the ORB_Core would determine if the profile
715 * selection is going to be made by the services or not. If the
716 * services do make the selection they would return the selected
717 * profile through <profile>.
719 CORBA::Boolean service_profile_selection (const TAO_MProfile &mprofile,
720 TAO_Profile *&profile);
723 * The loaded service would determine if the CORBA::Object_ptr is
724 * actually nil or not. This would be useful to accomodate new
725 * enhanced definitions as defined by the service specification.
727 CORBA::Boolean object_is_nil (CORBA::Object_ptr object);
729 /// Hook for the services to determine whether the profiles are
730 /// equivalent or not.
732 * For details on how this is used please see the FT service
734 TAO_Service_Callbacks::Profile_Equivalence is_profile_equivalent (
735 const TAO_Profile *this_p,
736 const TAO_Profile *that_p);
738 /// Hook for the services to determine the <hash> value of a
739 /// profile.
741 * For details on how this is used please see the FT service
743 CORBA::ULong hash_service (TAO_Profile *this_p, CORBA::ULong max);
745 /// Return a reference to the Fault Tolerant service object.
746 TAO_Fault_Tolerance_Service &fault_tolerance_service ();
748 /// Transmit the entire TAG_FT_GROUP component data from a server IOGR as
749 /// a FT_GROUP_VERSION tagged service context on requests to that IOGR instead
750 /// of just the group version.
751 CORBA::Boolean ft_send_extended_sc ();
753 /// Raise a comm failure exception if a service is not loaded, else
754 /// delegate to the service to see what the service has to do for
755 /// this case.
756 TAO::Invocation_Status service_raise_comm_failure (
757 IOP::ServiceContextList &clist,
758 TAO_Profile *profile);
760 /// Raise a transient failure exception if a service is not loaded,
761 /// else delegate to the service to see what the service has to do
762 /// for this case.
763 TAO::Invocation_Status service_raise_transient_failure (
764 IOP::ServiceContextList &clist,
765 TAO_Profile *profile);
767 //@}
770 * @name Portable Interceptor Related Methods
772 * These are support methods for interceptor registration and
773 * interceptor set (an array) access, in addition to PICurrent
774 * access.
776 //@{
777 #if TAO_HAS_INTERCEPTORS == 1
779 /// Return a pointer to the cached TAO::PICurrent object.
780 CORBA::Object_ptr pi_current ();
782 /// Set the pointer to the cached TAO::PICurrent object.
783 void pi_current (CORBA::Object_ptr current);
785 /// Register a client request interceptor.
786 void add_interceptor (
787 PortableInterceptor::ClientRequestInterceptor_ptr interceptor);
789 /// Register a server request interceptor.
790 void add_interceptor (
791 PortableInterceptor::ServerRequestInterceptor_ptr interceptor);
793 /// Register a client request interceptor with policies.
794 void add_interceptor (
795 PortableInterceptor::ClientRequestInterceptor_ptr interceptor,
796 const CORBA::PolicyList& policies);
798 /// Register a server request interceptor with policies.
799 void add_interceptor (
800 PortableInterceptor::ServerRequestInterceptor_ptr interceptor,
801 const CORBA::PolicyList& policies);
803 /// Get the Client Request Interceptor adapter.
804 /// Will not create a new one if not available yet.
805 TAO::ClientRequestInterceptor_Adapter *clientrequestinterceptor_adapter ();
807 /// Get the Server Request Interceptor adapter.
808 /// Will not create a new one if not available yet.
809 TAO::ServerRequestInterceptor_Adapter *serverrequestinterceptor_adapter ();
811 #endif /* TAO_HAS_INTERCEPTORS */
813 /// Register an IOR interceptor.
814 void add_interceptor (PortableInterceptor::IORInterceptor_ptr interceptor);
815 //@}
817 /// Return the valuetype adapter
818 TAO_Valuetype_Adapter *valuetype_adapter ();
820 #if !defined(CORBA_E_MICRO)
821 /// Value factory operations (CORBA 2.3 ptc/98-10-05 Ch. 4.2 p.4-7)
822 CORBA::ValueFactory register_value_factory (
823 const char *repository_id,
824 CORBA::ValueFactory factory);
825 #endif
827 #if !defined(CORBA_E_MICRO)
828 void unregister_value_factory (const char * repository_id);
829 #endif
831 #if !defined(CORBA_E_MICRO)
832 CORBA::ValueFactory lookup_value_factory (const char *repository_id);
833 #endif
835 /// Get the IOR Interceptor adapter. If not created, this method will try
836 /// to create one.
837 TAO_IORInterceptor_Adapter *ior_interceptor_adapter ();
839 /// Set and Get methods to indicate whether a BiDir IIOP policy has
840 /// been set in the POA.
841 /// @note At present, the value will be true even if one of the POA's
842 /// is set with the Bi Dir GIOP policy.
843 CORBA::Boolean bidir_giop_policy ();
844 void bidir_giop_policy (CORBA::Boolean);
846 /// Return the table that maps object key/name to de-stringified
847 /// object reference. It is needed for supporting local objects in
848 /// the resolve_initial_references() mechanism.
849 TAO_Object_Ref_Table &object_ref_table ();
851 /// Acceessor to the table that stores the object_keys.
852 TAO::ObjectKey_Table &object_key_table ();
854 /// Return the current request dispatcher strategy.
855 TAO_Request_Dispatcher *request_dispatcher ();
857 /// Set a new request dispatcher. The ORB Core retains ownership
858 /// of the request dispatcher once it gets it. Currently, this only
859 /// gets called at initialization.
860 void request_dispatcher (TAO_Request_Dispatcher *rd);
862 /// Call the libraries to handover the validators if they haven't
863 /// registered yet with the list of validators.
864 void load_policy_validators (TAO_Policy_Validator &validator);
866 /// Return the flushing strategy
868 * The flushing strategy is created by the resource factory, and it
869 * is used by the ORB to control the mechanism used to flush the
870 * outgoing data queues.
871 * The flushing strategies are stateless, therefore, there is only
872 * one per ORB.
874 TAO_Flushing_Strategy *flushing_strategy ();
876 /// Get Code Set Manager
877 TAO_Codeset_Manager *codeset_manager ();
879 typedef ACE_Array_Map<ACE_CString, ACE_CString> InitRefMap;
881 /// Return a pointer to the -ORBInitRef map.
882 InitRefMap * init_ref_map ();
884 /// Set the ORB related to the orb_id as the default ORB and not the
885 /// ORB that is first binded in the ORB Table
886 void set_default (const char * orb_id);
888 /// Choose to be not a default ORB when there is more than one ORB.
889 void not_default (const char * orb_id);
891 /// Verify condition for permanent forward is given,
892 /// both parameters must provide group attributes.
893 CORBA::Boolean is_permanent_forward_condition
894 (const CORBA::Object_ptr obj,
895 const TAO_Service_Context &service_context);
897 /// Configuration accessor method
898 ACE_Service_Gestalt* configuration () const;
900 /// Get outgoing fragmentation strategy.
901 TAO_GIOP_Fragmentation_Strategy*
902 fragmentation_strategy (TAO_Transport * transport);
904 #if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)
905 void set_eager_transport_queueing_strategy (
906 TAO::Transport_Queueing_Strategy* strategy);
908 void set_delayed_transport_queueing_strategy (
909 TAO::Transport_Queueing_Strategy* strategy);
910 #endif
912 protected:
913 /// Destructor is protected since the ORB Core is a reference
914 /// counted object.
915 ~TAO_ORB_Core ();
917 /// Initialize the guts of the ORB Core. It is intended that this be
918 /// called by CORBA::ORB_init().
919 int init (int &argc, char *argv[]);
921 /// Final termination hook, typically called by CORBA::ORB's
922 /// destructor.
923 int fini ();
925 /// Routine that creates a ACE_Data_Block given the lock and allocators.
926 ACE_Data_Block *create_data_block_i (size_t size,
927 ACE_Allocator *buffer_allocator,
928 ACE_Allocator *dblock_allocator,
929 ACE_Lock *lock);
931 /// Obtain and cache the typecode factory object reference.
932 void resolve_typecodefactory_i ();
934 /// Obtain and cache the poa current.
935 void resolve_poa_current_i ();
937 #if TAO_HAS_INTERCEPTORS == 1
938 /// Obtain and cache the picurrent factory object reference.
939 void resolve_picurrent_i ();
941 /// Get the Client Request Interceptor adapter.
942 /// If not created, this method will try to create one if needed.
943 TAO::ClientRequestInterceptor_Adapter *clientrequestinterceptor_adapter_i ();
945 /// Get the Server Request Interceptor adapter.
946 /// If not created, this method will try to create one if needed.
947 TAO::ServerRequestInterceptor_Adapter *serverrequestinterceptor_adapter_i ();
949 #endif /* TAO_HAS_INTERCEPTORS */
951 /// Obtain and cache the codec factory object reference.
952 void resolve_codecfactory_i ();
954 /// Obtain and cache the compression manager object reference.
955 void resolve_compression_manager_i ();
957 /// Obtain and cache the dynamic any factory object reference.
958 void resolve_dynanyfactory_i ();
960 /// Obtain and cache the IORManipulation factory object reference.
961 void resolve_iormanipulation_i ();
963 /// Obtain and cache the Monitor object reference.
964 void resolve_monitor_i ();
966 /// Search the Dynamic service list for well known services that has
967 /// callbacks which can be dynamically loaded.
968 void services_callbacks_init ();
970 /// Helper method that invokes Interceptor::destroy() on all
971 /// registered interceptors when ORB::destroy() is called. Prevents
972 /// exceptions from propagating up the call chain.
973 void destroy_interceptors ();
975 /// Pointer to the list of protocol loaded into this ORB instance.
976 /// Helper method to hold the common code part for -ORBEndpoint and
977 /// -ORBListenEndpoints options.
978 int set_endpoint_helper (const ACE_CString &lane,
979 const ACE_CString &endpoints);
981 /// Return pointer to the policy factory registry associated with
982 /// this ORB core.
983 TAO::PolicyFactory_Registry_Adapter *policy_factory_registry_i ();
985 /// Return pointer to the orb initializer registry associated with
986 /// this ORB core.
987 TAO::ORBInitializer_Registry_Adapter *orbinitializer_registry_i ();
989 /// Common code from ::initialize_object and ::reinitialize_object
990 CORBA::Long initialize_object_i (TAO_Stub *the_stub,
991 const TAO_MProfile& mprofile);
993 private:
994 /// The ORB Core should not be copied.
995 //@{
996 TAO_ORB_Core(const TAO_ORB_Core&);
997 void operator=(const TAO_ORB_Core&);
998 //@}
1000 /// Obtain and cache the ior table object reference.
1001 void resolve_ior_table_i ();
1003 /// Obtain and cache the async ior table object reference.
1004 void resolve_async_ior_table_i ();
1006 /// Checks to see whether collocation optimizations have to be
1007 /// applied on objects in the @a other_orb
1008 CORBA::Boolean is_collocation_enabled (TAO_ORB_Core *other_orb,
1009 const TAO_MProfile &mp);
1011 bool use_local_memory_pool_;
1013 protected:
1014 /// Synchronize internal state...
1015 TAO_SYNCH_MUTEX lock_;
1017 TAO_Thread_Lane_Resources_Manager *thread_lane_resources_manager_;
1019 TAO_Collocation_Resolver *collocation_resolver_;
1021 TAO_Stub_Factory *stub_factory_;
1023 TAO_ProtocolFactorySet *protocol_factories_;
1025 /// The cached IOR for the Implementation Repository.
1026 // @@ If this is a _var, where should it get deleted? (brunsch)
1027 CORBA::Object_ptr implrepo_service_;
1029 /// Flag for whether the implrepo support is enabled or not.
1030 int use_implrepo_;
1032 /// Flag for whether to put the ImR endpoints into our object refs.
1033 int imr_endpoints_in_ior_;
1035 /// The cached IOR for the TypeCodeFactory DLL.
1036 CORBA::Object_ptr typecode_factory_;
1038 /// The cached IOR for the CodecFactory DLL.
1039 CORBA::Object_ptr codec_factory_;
1041 /// The cached IOR for the Compression DLL.
1042 CORBA::Object_ptr compression_manager_;
1044 /// The cached object reference for the DynAnyFactory.
1045 CORBA::Object_ptr dynany_factory_;
1047 /// The cached object reference for the IORManipulataion.
1048 CORBA::Object_ptr ior_manip_factory_;
1050 /// The cached object reference for the IORTable.
1051 CORBA::Object_ptr ior_table_;
1053 /// The cached object reference for the Async_IORTable.
1054 CORBA::Object_ptr async_ior_table_;
1056 /// The cached object reference for the Monitor.
1057 CORBA::Object_ptr monitor_;
1059 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
1060 /// The cached object reference for the RTCORBA::RTORB.
1061 CORBA::Object_var rt_orb_;
1063 /// The cached object reference for the RTCORBA::Current interface.
1064 CORBA::Object_var rt_current_;
1065 #endif
1068 * @note
1069 * Should we keep a single ORB pointer? This is good because
1070 * multiple calls to ORB_init() with the same ORBid can use the same
1071 * object, but maybe don't want so much coupling.
1073 * Pointer to the ORB.
1075 CORBA::ORB_ptr orb_;
1077 /// Object reference to the root POA. It will eventually be the
1078 /// object reference returned by calls to
1079 /// CORBA::ORB::resolve_initial_references ("RootPOA").
1080 CORBA::Object_var root_poa_;
1082 /// Parameters used by the ORB.
1083 TAO_ORB_Parameters orb_params_;
1085 /// Return InitRefMap to find if a particular object id is present.
1086 InitRefMap init_ref_map_;
1088 /// Table that maps object key/name to (de-stringified) object
1089 /// reference. It is needed for supporting local objects in the
1090 /// resolve_initial_references() mechanism.
1091 TAO_Object_Ref_Table object_ref_table_;
1093 /// Table that stores the object key instead of caching one per-profile.
1094 TAO::ObjectKey_Table object_key_table_;
1096 /// The ORBid for this ORB.
1097 char *orbid_;
1099 /// Handle to the factory for resource information..
1100 TAO_Resource_Factory *resource_factory_;
1102 /// The server_id_ that was passed via -ORBServerId option
1103 ACE_CString server_id_;
1105 /// Handle to the factory for Client-side strategies.
1106 TAO_Client_Strategy_Factory *client_factory_;
1108 /// Handle to the factory for Server-side strategies.
1109 TAO_Server_Strategy_Factory *server_factory_;
1112 * @name Service Level Hooks
1114 //@{
1115 /// Fault Tolerant service hook.
1116 TAO_Fault_Tolerance_Service ft_service_;
1118 //@}
1120 /// TRUE transmits a full TAG_FT_GROUP component in place of the FT_GROUP_VERSION
1121 /// context on FT requests. This is contrary to the spec but enables more effective
1122 /// fault tolerant stuff. @todo reference to OMG issue. Default false.
1123 CORBA::Boolean ft_send_extended_sc_;
1125 /// TRUE if we want to take advantage of collocation optimization in
1126 /// this ORB.
1127 CORBA::Boolean opt_for_collocation_;
1129 /// TRUE if we want to consider all ORBs in this address space
1130 /// collocated.
1131 CORBA::Boolean use_global_collocation_;
1133 /// Default collocation policy. This should never be ORB_CONTROL.
1134 CORBA::ULong collocation_strategy_;
1136 #if (TAO_HAS_CORBA_MESSAGING == 1)
1138 /// The Policy_Manager for this ORB.
1139 TAO_Policy_Manager *policy_manager_;
1141 /// The default policies.
1142 TAO_Policy_Set *default_policies_;
1144 /// Policy current.
1145 TAO_Policy_Current *policy_current_;
1147 #endif /* TAO_HAS_CORBA_MESSAGING == 1 */
1149 /// The request dispatching strategy.
1150 TAO_Request_Dispatcher *request_dispatcher_;
1153 * POA current.
1155 CORBA::Object_var poa_current_;
1157 /// The list of Adapters used in this ORB.
1158 TAO_Adapter_Registry adapter_registry_;
1160 /// An optimization for the POA.
1161 TAO_Adapter *poa_adapter_;
1163 /// The Thread Manager
1164 ACE_Thread_Manager tm_;
1166 /// The data block reference counts are locked using this mutex
1167 ACE_Lock_Adapter<TAO_SYNCH_MUTEX> data_block_lock_;
1169 /// TSS Object cleanup functions. These correspond to the TSS
1170 /// objects stored in TAO's TSS resources.
1171 TAO_Cleanup_Func_Registry tss_cleanup_funcs_;
1173 /// This is where the tss resources for this ORB are stored.
1174 ACE_TSS_TYPE (TAO_ORB_Core_TSS_Resources) tss_resources_;
1176 /// Flag which denotes that the ORB has been shutdown.
1177 bool has_shutdown_;
1179 /// The value of the timeout if the flag above is not zero.
1180 //@{
1181 int thread_per_connection_use_timeout_;
1182 ACE_Time_Value thread_per_connection_timeout_;
1183 //@}
1185 /// Mutual exclusion for calling open.
1186 TAO_SYNCH_MUTEX open_lock_;
1188 TAO_Endpoint_Selector_Factory *endpoint_selector_factory_;
1190 #if (TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1)
1192 /// This strategy will buffer messages.
1193 TAO::Transport_Queueing_Strategy *eager_transport_queueing_strategy_;
1195 /// This strategy will buffer messages.
1196 TAO::Transport_Queueing_Strategy *delayed_transport_queueing_strategy_;
1198 /// This strategy will not queue by default, but will flush the queue
1199 /// each time
1200 TAO::Transport_Queueing_Strategy *flush_transport_queueing_strategy_;
1202 #endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */
1204 /// Number of outstanding references to this object.
1205 std::atomic<uint32_t> refcount_;
1207 /// Registry containing all registered policy factories.
1208 TAO::PolicyFactory_Registry_Adapter *policy_factory_registry_;
1210 /// Registry containing all orb initializers
1211 TAO::ORBInitializer_Registry_Adapter *orbinitializer_registry_;
1213 /// Registry containing all service context handlers
1214 TAO_Service_Context_Registry service_context_registry_;
1216 #if (TAO_HAS_INTERCEPTORS == 1)
1217 /// Cached pointer/reference to the PICurrent object.
1219 * A pointer/reference to the PICurrent object is cached in the ORB
1220 * Core since it is accessed in the critical path (i.e. the request
1221 * invocation path). Caching it prevents additional overhead to due
1222 * object resolution from occurring.
1224 CORBA::Object_ptr pi_current_;
1226 /// The adapter for handling client request interceptors
1227 TAO::ClientRequestInterceptor_Adapter *client_request_interceptor_adapter_;
1229 /// The adapter for handling server request interceptors
1230 TAO::ServerRequestInterceptor_Adapter *server_request_interceptor_adapter_;
1232 #endif /* TAO_HAS_INTERCEPTORS */
1234 /// IORInterceptor adapter.
1235 TAO_IORInterceptor_Adapter *ior_interceptor_adapter_;
1237 /// Pointer to the valuetype adapter.
1238 TAO_Valuetype_Adapter *valuetype_adapter_;
1240 /// The IOR parser registry.
1241 TAO_Parser_Registry parser_registry_;
1243 /// BiDirectional GIOP factory
1244 TAO_BiDir_Adapter *bidir_adapter_;
1246 /// Bir Dir GIOP policy value
1247 CORBA::Boolean bidir_giop_policy_;
1249 /// ZIOP Adapter
1250 TAO_ZIOP_Adapter *ziop_adapter_;
1252 /// ZIOP enabled or not
1253 CORBA::Boolean ziop_enabled_;
1255 /// Hold the flushing strategy
1256 TAO_Flushing_Strategy *flushing_strategy_;
1258 /// Code Set Manager, received from the Resource Factory
1259 TAO_Codeset_Manager *codeset_manager_;
1261 /// ORB's service configuration
1262 ACE_Intrusive_Auto_Ptr<ACE_Service_Gestalt> config_;
1264 /// The hook to be set for the SyncScopePolicy
1265 Sync_Scope_Hook sync_scope_hook_;
1267 /// The configured value used as the default sync scope
1268 Messaging::SyncScope default_sync_scope_;
1270 /// The hook to be set for the RelativeRoundtripTimeoutPolicy.
1271 Timeout_Hook timeout_hook_;
1274 // ****************************************************************
1277 * @class TAO_ORB_Core_Static_Resources
1279 * @brief The static (global) resoures of all ORB cores.
1281 * This class is used by the ORB_Core to store the resources global to
1282 * all ORB_Cores. All instance variables that would have been
1283 * declared "static" in TAO_ORB_Core, should be declared in this class
1284 * to avoid the "static initialization order fiasco" as described in
1285 * http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.11.
1286 * Briefly, this is the problem that occurs if any static initializers
1287 * in any other code call into set static members of TAO_ORB_Core.
1288 * Since the order in which these initializers execute is unspecified,
1289 * uninitialized members can be accessed.
1291 class TAO_Export TAO_ORB_Core_Static_Resources : public ACE_Service_Object
1293 public:
1294 /// Return the context-specific singleton instance.
1295 static TAO_ORB_Core_Static_Resources* instance ();
1297 public:
1299 * Name of the network_priority_protocols_hooks that needs to be instantiated.
1301 ACE_CString network_priority_protocols_hooks_name_;
1303 /// The hook to be set for the ConnectionTimeoutPolicy
1304 TAO_ORB_Core::Timeout_Hook connection_timeout_hook_;
1307 * Name of the resource factory that needs to be instantiated.
1308 * The default value is "Resource_Factory". If TAO_Strategies is
1309 * linked, the set_resource_factory will be called to set the value
1310 * to be "Advanced_Resource_Factory".
1312 ACE_CString resource_factory_name_;
1315 * Name of the service object for DII request creation that needs
1316 * to be instantiated. The default value is "Dynamic_Adaper". If
1317 * TAO_DynamicInterface is linked, dynamic_adapter_name() will be
1318 * called to set the value to "Concrete_Dynamic_Adapter".
1320 ACE_CString dynamic_adapter_name_;
1323 * Name of the service object for functions that make calls on
1324 * the Interface Repository. The default value is "IFR_Client_Adaper".
1325 * If TAO_IFR_CLient is linked, ifr_client_adapter_name() will be
1326 * called to set the value to "Concrete_IFR_Client_Adapter".
1328 ACE_CString ifr_client_adapter_name_;
1331 * Name of the service object used by the ORB create_*_tc functions.
1332 * The default value is "TypeCodeFactory_Adapter". If the
1333 * TypeCodeFactory library is linked, the corresponding accessor
1334 * function typecodefactory_adapter_name() will be called to set
1335 * the value to "Concrete_TypeCodeFactory_Adapter".
1337 ACE_CString typecodefactory_adapter_name_;
1340 * Name of the factory object used to adapt function calls on
1341 * the PortableInterceptor interfaces IORInfo and IORInterceptor.
1342 * The default value is "IORInterceptor_Adapter_Factory". If the
1343 * IORInterceptor library is linked, the corresponding accessor
1344 * function iorinterceptor_adapter_factory_name() will be called to set
1345 * the value to "Concrete_IORInterceptor_Adapter_Factory".
1347 ACE_CString iorinterceptor_adapter_factory_name_;
1350 * Name of the factory object used to adapt function calls on
1351 * the valuetype-related interfaces.
1352 * The default value is "Valuetype_Adapter_Factory". If the
1353 * Valuetype library is linked, the corresponding accessor
1354 * function valuetype_adapter_factory_name() will be called to set
1355 * the value to "Concrete_Valuetype_Adapter_Factory".
1357 ACE_CString valuetype_adapter_factory_name_;
1359 /// An alternative hook to be set for the ConnectionTimeoutPolicy
1360 TAO_ORB_Core::Timeout_Hook alt_connection_timeout_hook_;
1362 //private:
1363 /// Constructor.
1364 TAO_ORB_Core_Static_Resources ();
1365 TAO_ORB_Core_Static_Resources& operator= (const TAO_ORB_Core_Static_Resources&);
1367 private:
1368 /// Mostly unused variable whose sole purpose is to enforce
1369 /// the instantiation of a TAO_ORB_Core_Static_Resources instance
1370 /// at initialization time.
1371 static TAO_ORB_Core_Static_Resources* initialization_reference_;
1374 // ****************************************************************
1376 /// Obtain an instance of the first ORB core registered in the ORB
1377 /// table.
1378 TAO_Export TAO_ORB_Core * TAO_ORB_Core_instance ();
1380 // ****************************************************************
1382 ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_ORB_Core_Static_Resources)
1383 ACE_FACTORY_DECLARE (TAO, TAO_ORB_Core_Static_Resources)
1385 TAO_END_VERSIONED_NAMESPACE_DECL
1387 #if defined (__ACE_INLINE__)
1388 # include "tao/ORB_Core.inl"
1389 #endif /* __ACE_INLINE__ */
1391 #include /**/ "ace/post.h"
1392 #endif /* TAO_ORB_CORE_H */