2 #include "tao/CSD_Framework/CSD_Default_Servant_Dispatcher.h"
3 #include "tao/CSD_Framework/CSD_POA.h"
4 #include "tao/CSD_Framework/CSD_Strategy_Repository.h"
5 #include "ace/Dynamic_Service.h"
7 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
9 TAO_CSD_Default_Servant_Dispatcher::~TAO_CSD_Default_Servant_Dispatcher ()
15 TAO_CSD_Default_Servant_Dispatcher::create_Root_POA (const ACE_CString
&name
,
16 PortableServer::POAManager_ptr poa_manager
,
17 const TAO_POA_Policy_Set
&policies
,
19 TAO_SYNCH_MUTEX
&thread_lock
,
20 TAO_ORB_Core
&orb_core
,
21 TAO_Object_Adapter
*object_adapter
)
25 ACE_NEW_THROW_EX (poa
,
37 TAO_CSD_Strategy_Repository
*repo
=
38 ACE_Dynamic_Service
<TAO_CSD_Strategy_Repository
>::instance ("TAO_CSD_Strategy_Repository");
42 if (TAO_debug_level
> 0)
43 TAOLIB_DEBUG ((LM_DEBUG
,
44 ACE_TEXT("(%P|%t) CSD_Default_Servant_Dispatcher::")
45 ACE_TEXT("create_POA could not find ")
46 ACE_TEXT("TAO_CSD_Strategy_Repository\n")));
50 CSD_Framework::Strategy_var strategy
= repo
->find (name
);
52 if (! ::CORBA::is_nil (strategy
.in ()))
54 poa
->set_csd_strategy (strategy
.in ());
60 TAO_END_VERSIONED_NAMESPACE_DECL