00001
00002
00003 #ifndef TAO_EC_LIFETIME_UTILS_T_CPP
00004 #define TAO_EC_LIFETIME_UTILS_T_CPP
00005
00006 #include "orbsvcs/Event/EC_Lifetime_Utils_T.h"
00007
00008 #if ! defined (__ACE_INLINE__)
00009 #include "orbsvcs/Event/EC_Lifetime_Utils_T.inl"
00010 #endif
00011
00012 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00013
00014 template <typename T>
00015 void
00016 activate (T & obj_ref,
00017 PortableServer::POA_ptr poa,
00018 PortableServer::ServantBase * servant,
00019 TAO_EC_Object_Deactivator & suggested_object_deactivator)
00020 {
00021
00022 PortableServer::ObjectId_var obj_id =
00023 poa->activate_object (servant);
00024
00025 suggested_object_deactivator.set_values (poa, obj_id.in ());
00026
00027
00028 CORBA::Object_var obj =
00029 poa->id_to_reference (obj_id.in ());
00030
00031
00032
00033 typedef typename T::_obj_type my_object_type;
00034
00035 obj_ref =
00036 my_object_type::_narrow (obj.in());
00037
00038 if (CORBA::is_nil (obj_ref.in ()))
00039 {
00040 throw CORBA::INTERNAL ();
00041 }
00042 }
00043
00044 TAO_END_VERSIONED_NAMESPACE_DECL
00045
00046 #endif