Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / CSD_Framework / CSD_ORBInitializer.cpp
blob36bce1c32c68cc9cb072649b84b00c92b7828b46
1 // -*- C++ -*-
2 #include "tao/CSD_Framework/CSD_ORBInitializer.h"
3 #include "tao/Exception.h"
4 #include "tao/ORB_Core.h"
5 #include "tao/PI/ORBInitInfo.h"
6 #include "tao/debug.h"
8 static const ACE_TCHAR csd_poa_factory_directive[] =
9 ACE_DYNAMIC_VERSIONED_SERVICE_DIRECTIVE(
10 "TAO_CSD_Object_Adapter_Factory",
11 "TAO_CSD_Framework",
12 TAO_VERSION,
13 "_make_TAO_CSD_Object_Adapter_Factory",
14 "");
16 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
18 void
19 TAO_CSD_ORBInitializer::pre_init (PortableInterceptor::ORBInitInfo_ptr info)
21 // Narrow to a TAO_ORBInitInfo object to get access to the
22 // orb_core() TAO extension.
23 TAO_ORBInitInfo_var tao_info = TAO_ORBInitInfo::_narrow (info);
25 if (CORBA::is_nil (tao_info.in ()))
27 if (TAO_debug_level > 0)
28 TAOLIB_ERROR ((LM_ERROR,
29 "(%P|%t) TAO_CSD_ORBInitializer::pre_init:\n"
30 "(%P|%t) Unable to narrow "
31 "\"PortableInterceptor::ORBInitInfo_ptr\" to\n"
32 "(%P|%t) \"TAO_ORBInitInfo *.\"\n"));
34 throw ::CORBA::INTERNAL ();
37 // If the application resolves the root POA, make sure we load the CSD POA.
38 tao_info->orb_core ()->orb_params ()->poa_factory_name ("TAO_CSD_Object_Adapter_Factory");
40 tao_info->orb_core ()->orb_params ()->poa_factory_directive (csd_poa_factory_directive);
43 void
44 TAO_CSD_ORBInitializer::post_init (PortableInterceptor::ORBInitInfo_ptr)
48 TAO_END_VERSIONED_NAMESPACE_DECL