2 #include "tao/CSD_Framework/CSD_Object_Adapter_Factory.h"
3 #include "tao/CSD_Framework/CSD_Strategy_Repository.h"
4 #include "tao/CSD_Framework/CSD_Object_Adapter.h"
5 #include "tao/CSD_Framework/CSD_Default_Servant_Dispatcher.h"
6 #include "tao/ORB_Core.h"
7 #include "tao/ORBInitializer_Registry.h"
8 #include "ace/Dynamic_Service.h"
10 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
12 TAO_CSD_Object_Adapter_Factory::TAO_CSD_Object_Adapter_Factory ()
17 TAO_CSD_Object_Adapter_Factory::create (TAO_ORB_Core
*oc
)
19 // Create the CSD object adapter.
20 TAO_CSD_Object_Adapter
*object_adapter
= 0;
21 ACE_NEW_RETURN (object_adapter
,
22 TAO_CSD_Object_Adapter (oc
->server_factory ()->
23 active_object_map_creation_parameters (),
27 // Create and register the CSD servant dispatcher.
28 TAO_CSD_Default_Servant_Dispatcher
* csd_servant_dispatcher
= 0;
29 ACE_NEW_RETURN (csd_servant_dispatcher
,
30 TAO_CSD_Default_Servant_Dispatcher
,
32 object_adapter
->servant_dispatcher (csd_servant_dispatcher
);
34 return object_adapter
;
38 TAO_CSD_Object_Adapter_Factory::init (int /* argc */, ACE_TCHAR
* /* argv */ [])
40 TAO_CSD_Strategy_Repository
*repo
=
41 ACE_Dynamic_Service
<TAO_CSD_Strategy_Repository
>::instance ("TAO_CSD_Strategy_Repository");
50 ACE_FACTORY_DEFINE (TAO_CSD_FW
, TAO_CSD_Object_Adapter_Factory
)
51 ACE_STATIC_SVC_DEFINE (TAO_CSD_Object_Adapter_Factory
,
52 ACE_TEXT ("TAO_CSD_Object_Adapter_Factory"),
54 &ACE_SVC_NAME (TAO_CSD_Object_Adapter_Factory
),
55 ACE_Service_Type::DELETE_THIS
| ACE_Service_Type::DELETE_OBJ
,
57 TAO_END_VERSIONED_NAMESPACE_DECL