Updated logging to include the class/method so that it is more obvious where these...
[ACE_TAO.git] / TAO / tao / PortableServer / RequestProcessingStrategyDefaultServantFI.cpp
blobb2a2250c04a12f9090eed1da9770868e94730846
1 #include "tao/orbconf.h"
3 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
5 #include "tao/PortableServer/RequestProcessingStrategyDefaultServantFI.h"
6 #include "tao/PortableServer/RequestProcessingStrategy.h"
7 #include "tao/PortableServer/RequestProcessingStrategyDefaultServant.h"
8 #include "ace/Dynamic_Service.h"
9 #include "ace/Log_Msg.h"
11 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
13 namespace TAO
15 namespace Portable_Server
17 RequestProcessingStrategy*
18 RequestProcessingStrategyDefaultServantFactoryImpl::create (
19 ::PortableServer::RequestProcessingPolicyValue value,
20 ::PortableServer::ServantRetentionPolicyValue /*srvalue*/)
22 RequestProcessingStrategy* strategy = 0;
24 switch (value)
26 case ::PortableServer::USE_DEFAULT_SERVANT :
28 ACE_NEW_RETURN (strategy, RequestProcessingStrategyDefaultServant, 0);
29 break;
31 default :
33 TAOLIB_ERROR ((LM_ERROR, "Incorrect type in RequestProcessingStrategyDefaultServantFactoryImpl"));
34 break;
38 return strategy;
41 void
42 RequestProcessingStrategyDefaultServantFactoryImpl::destroy (
43 RequestProcessingStrategy *strategy)
45 strategy->strategy_cleanup ();
47 delete strategy;
52 ACE_STATIC_SVC_DEFINE (
53 RequestProcessingStrategyDefaultServantFactoryImpl,
54 ACE_TEXT ("RequestProcessingStrategyDefaultServantFactory"),
55 ACE_SVC_OBJ_T,
56 &ACE_SVC_NAME (RequestProcessingStrategyDefaultServantFactoryImpl),
57 ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
60 ACE_FACTORY_NAMESPACE_DEFINE (
61 ACE_Local_Service,
62 RequestProcessingStrategyDefaultServantFactoryImpl,
63 TAO::Portable_Server::RequestProcessingStrategyDefaultServantFactoryImpl)
65 TAO_END_VERSIONED_NAMESPACE_DECL
67 #endif /* TAO_HAS_MINIMUM_POA == 0 */