Updated logging to include the class/method so that it is more obvious where these...
[ACE_TAO.git] / TAO / tao / PortableServer / RequestProcessingStrategyServantLocatorFI.cpp
blob9da757ce48912e490615b8801394ebec624b6967
1 // -*- C++ -*-
2 #include "tao/orbconf.h"
4 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
6 #include "tao/PortableServer/RequestProcessingStrategyServantLocatorFI.h"
7 #include "tao/PortableServer/RequestProcessingStrategy.h"
8 #include "tao/PortableServer/RequestProcessingStrategyServantLocator.h"
9 #include "ace/Dynamic_Service.h"
10 #include "ace/Log_Msg.h"
12 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
14 namespace TAO
16 namespace Portable_Server
18 RequestProcessingStrategy*
19 RequestProcessingStrategyServantLocatorFactoryImpl::create (
20 ::PortableServer::RequestProcessingPolicyValue value,
21 ::PortableServer::ServantRetentionPolicyValue srvalue)
23 RequestProcessingStrategy* strategy = 0;
25 switch (value)
27 case ::PortableServer::USE_SERVANT_MANAGER :
29 switch (srvalue)
31 case ::PortableServer::RETAIN :
33 TAOLIB_ERROR ((LM_ERROR, "Incorrect type in RequestProcessingStrategyServantLocatorFactoryImpl"));
34 break;
36 case ::PortableServer::NON_RETAIN :
38 ACE_NEW_RETURN (strategy, RequestProcessingStrategyServantLocator, 0);
39 break;
42 break;
44 default :
46 TAOLIB_ERROR ((LM_ERROR, "Incorrect type in RequestProcessingStrategyServantLocatorFactoryImpl"));
47 break;
51 return strategy;
54 void
55 RequestProcessingStrategyServantLocatorFactoryImpl::destroy (
56 RequestProcessingStrategy *strategy)
58 strategy->strategy_cleanup ();
60 delete strategy;
65 ACE_STATIC_SVC_DEFINE (
66 RequestProcessingStrategyServantLocatorFactoryImpl,
67 ACE_TEXT ("RequestProcessingStrategyServantLocatorFactory"),
68 ACE_SVC_OBJ_T,
69 &ACE_SVC_NAME (RequestProcessingStrategyServantLocatorFactoryImpl),
70 ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
73 ACE_FACTORY_NAMESPACE_DEFINE (
74 ACE_Local_Service,
75 RequestProcessingStrategyServantLocatorFactoryImpl,
76 TAO::Portable_Server::RequestProcessingStrategyServantLocatorFactoryImpl)
78 TAO_END_VERSIONED_NAMESPACE_DECL
80 #endif /* TAO_HAS_MINIMUM_POA == 0 */