1 #include "tao/orbconf.h"
3 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
5 #include "tao/PortableServer/ThreadStrategySingleFactoryImpl.h"
6 #include "tao/PortableServer/ThreadStrategy.h"
7 #include "tao/PortableServer/ThreadStrategySingle.h"
8 #include "ace/Dynamic_Service.h"
9 #include "ace/Log_Msg.h"
11 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
15 namespace Portable_Server
18 ThreadStrategySingleFactoryImpl::create (
19 ::PortableServer::ThreadPolicyValue value
)
21 ThreadStrategy
* strategy
= 0;
25 case ::PortableServer::SINGLE_THREAD_MODEL
:
27 ACE_NEW_RETURN (strategy
, ThreadStrategySingle
, 0);
30 case ::PortableServer::ORB_CTRL_MODEL
:
32 TAOLIB_ERROR ((LM_ERROR
, "Incorrect type in ThreadStrategySingleFactoryImpl"));
41 ThreadStrategySingleFactoryImpl::destroy (ThreadStrategy
*strategy
)
43 strategy
->strategy_cleanup ();
50 ACE_STATIC_SVC_DEFINE (
51 ThreadStrategySingleFactoryImpl
,
52 ACE_TEXT ("ThreadStrategySingleFactory"),
54 &ACE_SVC_NAME (ThreadStrategySingleFactoryImpl
),
55 ACE_Service_Type::DELETE_THIS
| ACE_Service_Type::DELETE_OBJ
,
58 ACE_FACTORY_NAMESPACE_DEFINE (
60 ThreadStrategySingleFactoryImpl
,
61 TAO::Portable_Server::ThreadStrategySingleFactoryImpl
)
62 TAO_END_VERSIONED_NAMESPACE_DECL
64 #endif /* TAO_HAS_MINIMUM_POA == 0 */