ORB_Core.h File Reference

#include "tao/Resource_Factory.h"
#include "tao/Collocation_Strategy.h"
#include "tao/params.h"
#include "tao/ORB_Constants.h"
#include "tao/Parser_Registry.h"
#include "tao/Service_Callbacks.h"
#include "tao/Fault_Tolerance_Service.h"
#include "tao/Cleanup_Func_Registry.h"
#include "tao/Object_Ref_Table.h"
#include "tao/ObjectKey_Table.h"
#include "tao/Messaging_SyncScopeC.h"
#include "tao/Object.h"
#include "tao/Invocation_Utils.h"
#include "tao/Adapter_Registry.h"
#include "tao/ORB_Core_TSS_Resources.h"
#include "tao/Service_Context_Handler_Registry.h"
#include "ace/Array_Map.h"
#include "ace/Thread_Manager.h"
#include "ace/Lock_Adapter_T.h"
#include "ace/TSS_T.h"
#include "ace/Service_Config.h"

Include dependency graph for ORB_Core.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  TAO
namespace  CORBA
namespace  IOP
namespace  PortableInterceptor

Classes

class  TAO_ORB_Core
 Encapsulates the state of an ORB. More...
class  TAO_ORB_Core_Static_Resources
 The static (global) resoures of all ORB cores. More...

Typedefs

typedef ORB * CORBA::ORB_ptr
typedef IORInterceptor * PortableInterceptor::IORInterceptor_ptr
typedef ClientRequestInterceptor * PortableInterceptor::ClientRequestInterceptor_ptr
typedef ServerRequestInterceptor * PortableInterceptor::ServerRequestInterceptor_ptr

Functions

TAO_Export TAO_ORB_CoreTAO_ORB_Core_instance (void)


Detailed Description

Id
ORB_Core.h 81473 2008-04-28 13:11:24Z johnnyw

Author:
DOC Center - Washington University at St. Louis

DOC Laboratory - University of California at Irvine

Definition in file ORB_Core.h.


Function Documentation

TAO_Export TAO_ORB_Core* TAO_ORB_Core_instance ( void   ) 

Obtain an instance of the first ORB core registered in the ORB table.

Definition at line 3384 of file ORB_Core.cpp.

References ACE_GUARD_RETURN, CORBA::ORB_init(), and TAO_SYNCH_RECURSIVE_MUTEX.

Referenced by TAO_Connector_Registry::create_profile(), CORBA::Environment::default_environment(), operator>>(), CORBA::Object::tao_object_initialize(), TAO_Stub::TAO_Stub(), and CORBA::Environment::~Environment().

03385 {
03386   // @@ This is a slight violation of layering, we should use
03387   //    TAO_ORB_Core_instance(), but that breaks during startup.
03388   TAO::ORB_Table * const orb_table = TAO::ORB_Table::instance ();
03389   if (orb_table->first_orb () == 0)
03390     {
03391       ACE_MT (ACE_GUARD_RETURN (TAO_SYNCH_RECURSIVE_MUTEX, guard,
03392                                 *ACE_Static_Object_Lock::instance (), 0));
03393 
03394       if (orb_table->first_orb () == 0)
03395         {
03396           // Calling CORBA::ORB_init() returns a duplicated ORB
03397           // reference, so make sure that reference is stored in an
03398           // ORB_var so that no leak occurs.  The duplicate ORB
03399           // reference isn't needed outside the scope of this function
03400           // since the corresponding ORB Core instance will still
03401           // exist in the ORB table after the ORB reference is
03402           // destroyed.
03403 
03404           try
03405             {
03406               int argc = 0;
03407               CORBA::ORB_var orb = CORBA::ORB_init (argc, 0);
03408             }
03409           catch (const ::CORBA::Exception&)
03410             {
03411               // @@ What should we do here?
03412             }
03413         }
03414     }
03415 
03416   return orb_table->first_orb ();
03417 }


Generated on Tue Feb 2 17:38:37 2010 for TAO by  doxygen 1.4.7