#include "orbsvcs/Event/EC_Lifetime_Utils_T.h"Include dependency graph for EC_Lifetime_Utils_T.cpp:

Go to the source code of this file.
Functions | |
| template<typename T> TAO_BEGIN_VERSIONED_NAMESPACE_DECL void | activate (T &obj_ref, PortableServer::POA_ptr poa, PortableServer::ServantBase *servant, TAO_EC_Object_Deactivator &suggested_object_deactivator) |
| Helper for activating objects. Activates servant with poa and returns the object reference via obj_ref. If object_deactivator != 0, it is populated with info necessary to deactivate the servant from poa. | |
|
||||||||||||||||||||||||
|
Helper for activating objects. Activates servant with poa and returns the object reference via obj_ref. If object_deactivator != 0, it is populated with info necessary to deactivate the servant from poa.
Definition at line 16 of file EC_Lifetime_Utils_T.cpp. References ACE_CHECK, ACE_ENV_ARG_PARAMETER, ACE_THROW, and CORBA::is_nil(). Referenced by TAO_ECG_UDP_Receiver::new_connect(), TAO_ECG_UDP_Sender::new_connect(), TAO_ECG_Mcast_EH::open(), and TAO_ECG_Mcast_Gateway::run().
00021 {
00022 // Activate the servant into the POA.
00023 PortableServer::ObjectId_var obj_id =
00024 poa->activate_object (servant
00025 ACE_ENV_ARG_PARAMETER);
00026 ACE_CHECK;
00027
00028 suggested_object_deactivator.set_values (poa, obj_id.in ());
00029
00030 // Get the object reference of the activated object.
00031 CORBA::Object_var obj =
00032 poa->id_to_reference (obj_id.in () ACE_ENV_ARG_PARAMETER);
00033 ACE_CHECK;
00034
00035 // Don't try to use T::_obj_type::_narrow, some compilers don't like it so
00036 // do this in two steps
00037 typedef typename T::_obj_type my_object_type;
00038
00039 obj_ref =
00040 my_object_type::_narrow (obj.in() ACE_ENV_ARG_PARAMETER);
00041 ACE_CHECK;
00042
00043 if (CORBA::is_nil (obj_ref.in ()))
00044 {
00045 ACE_THROW (CORBA::INTERNAL ());
00046 }
00047 }
|
1.3.6