Go to the documentation of this file.00001
00002
00003 #include "tao/RTPortableServer/RT_Object_Adapter_Factory.h"
00004
00005 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
00006
00007 #include "tao/PortableServer/Object_Adapter.h"
00008 #include "tao/ORB_Core.h"
00009 #include "tao/RTPortableServer/RT_Servant_Dispatcher.h"
00010 #include "tao/RTPortableServer/RT_Policy_Validator.h"
00011 #include "tao/RTPortableServer/RT_Collocation_Resolver.h"
00012
00013 ACE_RCSID (RTPortableServer,
00014 RT_Object_Adapter_Factory,
00015 "$Id: RT_Object_Adapter_Factory.cpp 84281 2009-01-30 15:01:17Z wotte $")
00016
00017
00018 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00019
00020 TAO_Adapter*
00021 TAO_RT_Object_Adapter_Factory::create (TAO_ORB_Core *orb_core)
00022 {
00023 if (!orb_core->orb_params ()->disable_rt_collocation_resolver ())
00024 {
00025
00026 orb_core->orb_params ()->collocation_resolver_name ("RT_Collocation_Resolver");
00027 ACE_Service_Config::process_directive (
00028 ace_svc_desc_TAO_RT_Collocation_Resolver);
00029 }
00030
00031 TAO_Object_Adapter *object_adapter = 0;
00032 ACE_NEW_RETURN (object_adapter,
00033 TAO_Object_Adapter (orb_core->server_factory ()->
00034 active_object_map_creation_parameters (),
00035 *orb_core),
00036 0);
00037
00038
00039 TAO_RT_Servant_Dispatcher *rt_servant_dispatcher = 0;
00040 ACE_NEW_RETURN (rt_servant_dispatcher,
00041 TAO_RT_Servant_Dispatcher,
00042 0);
00043 object_adapter->servant_dispatcher (rt_servant_dispatcher);
00044
00045
00046 TAO_POA_RT_Policy_Validator *rt_validator = 0;
00047 ACE_NEW_RETURN (rt_validator,
00048 TAO_POA_RT_Policy_Validator (*orb_core),
00049 0);
00050 object_adapter->validator ().add_validator (rt_validator);
00051
00052 return object_adapter;
00053 }
00054
00055
00056 ACE_FACTORY_DEFINE (TAO_RTPortableServer, TAO_RT_Object_Adapter_Factory)
00057 ACE_STATIC_SVC_DEFINE (TAO_RT_Object_Adapter_Factory,
00058 ACE_TEXT ("TAO_RT_Object_Adapter_Factory"),
00059 ACE_SVC_OBJ_T,
00060 &ACE_SVC_NAME (TAO_RT_Object_Adapter_Factory),
00061 ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
00062 0)
00063
00064 TAO_END_VERSIONED_NAMESPACE_DECL
00065
00066 #endif