#include "orbsvcs/SSLIOP/SSLIOP_Util.h"
#include "orbsvcs/SSLIOP/SSLIOP_Connection_Handler.h"
#include "orbsvcs/SSLIOP/SSLIOP_Current.h"
#include "tao/ORB_Core.h"
#include "tao/debug.h"
Include dependency graph for SSLIOP_Util.cpp:
Go to the source code of this file.
Functions | |
ACE_RCSID (SSLIOP, SSLIOP_Util,"SSLIOP_Util.cpp, v 1.10 2006/03/14 06:14:35 jtc Exp") TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO |
|
Definition at line 4 of file SSLIOP_Util.cpp. References TAO::SSLIOP::Current::_narrow(), ACE_ANY_EXCEPTION, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_PRINT_EXCEPTION, ACE_TRY, ACE_TRY_CHECK, ACE_TRY_THROW, CORBA::is_nil(), TAO_ORB_Core::object_ref_table(), TAO_Object_Ref_Table::resolve_initial_reference(), TAO_BEGIN_VERSIONED_NAMESPACE_DECL, and TAO_debug_level.
00006 :14:35 jtc Exp") 00007 00008 00009 #include "orbsvcs/SSLIOP/SSLIOP_Connection_Handler.h" 00010 #include "orbsvcs/SSLIOP/SSLIOP_Current.h" 00011 00012 #include "tao/ORB_Core.h" 00013 #include "tao/debug.h" 00014 00015 00016 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00017 00018 TAO::SSLIOP::Current_ptr 00019 TAO::SSLIOP::Util::current ( 00020 TAO_ORB_Core *orb_core) 00021 { 00022 ACE_DECLARE_NEW_CORBA_ENV; 00023 ACE_TRY 00024 { 00025 // Go straight to the object_ref_table in the ORB Core to avoid 00026 // the ORB::resolve_initial_references() mechanism's complaints 00027 // about the fact that the ORB isn't fully initialized yet 00028 // (happens on the client side). 00029 CORBA::Object_var obj = 00030 orb_core->object_ref_table ().resolve_initial_reference ( 00031 "SSLIOPCurrent"); 00032 00033 TAO::SSLIOP::Current_var tao_current = 00034 TAO::SSLIOP::Current::_narrow (obj.in () 00035 ACE_ENV_ARG_PARAMETER); 00036 ACE_TRY_CHECK; 00037 00038 if (CORBA::is_nil (tao_current.in ())) 00039 ACE_TRY_THROW (CORBA::INV_OBJREF ()); 00040 00041 return tao_current._retn (); 00042 } 00043 ACE_CATCHANY 00044 { 00045 if (TAO_debug_level > 0) 00046 ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, 00047 "Could not resolve " 00048 "\"SSLIOPCurrent\" object"); 00049 00050 return 0; 00051 } 00052 ACE_ENDTRY; 00053 ACE_CHECK_RETURN (0); 00054 00055 return 0; 00056 } |