summaryrefslogtreecommitdiff
path: root/TAO/tao/RTCORBA/RT_ORBInitializer.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2005-06-11 12:45:04 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2005-06-11 12:45:04 +0000
commitb0fe7bc7842f4aafdbdd81efd96e3b8fa2628c4c (patch)
tree5ce032c3d2aaa90c0feb701467061ca5e68b17f6 /TAO/tao/RTCORBA/RT_ORBInitializer.cpp
parent6a9c5655afebaba6bb38c8a5728a09a09729e8a4 (diff)
downloadATCD-b0fe7bc7842f4aafdbdd81efd96e3b8fa2628c4c.tar.gz
ChangeLogTag: Sat Jun 11 11:52:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/RTCORBA/RT_ORBInitializer.cpp')
-rw-r--r--TAO/tao/RTCORBA/RT_ORBInitializer.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/TAO/tao/RTCORBA/RT_ORBInitializer.cpp b/TAO/tao/RTCORBA/RT_ORBInitializer.cpp
index 27dc3ded6c0..0462862da2e 100644
--- a/TAO/tao/RTCORBA/RT_ORBInitializer.cpp
+++ b/TAO/tao/RTCORBA/RT_ORBInitializer.cpp
@@ -12,6 +12,7 @@ ACE_RCSID (RTCORBA,
#undef TAO_RTCORBA_SAFE_INCLUDE
#include "RT_Policy_i.h"
+#include "RT_PolicyFactory.h"
#include "RT_Protocols_Hooks.h"
#include "Priority_Mapping_Manager.h"
#include "Network_Priority_Mapping_Manager.h"
@@ -232,11 +233,17 @@ TAO_RT_ORBInitializer::register_policy_factories (
ACE_ENV_ARG_DECL)
{
// Register the RTCORBA policy factories.
+ PortableInterceptor::PolicyFactory_ptr tmp;
+ ACE_NEW_THROW_EX (tmp,
+ TAO_RT_PolicyFactory,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ TAO::VMCID,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_CHECK;
- // The RTCORBA policy factory is stateless and reentrant, so share a
- // single instance between all ORBs.
- PortableInterceptor::PolicyFactory_ptr policy_factory =
- &(this->policy_factory_);
+ PortableInterceptor::PolicyFactory_var policy_factory = tmp;
// Bind the same policy factory to all RTCORBA related policy
// types since a single policy factory is used to create each of
@@ -260,7 +267,7 @@ TAO_RT_ORBInitializer::register_policy_factories (
ACE_TRY
{
info->register_policy_factory (*i,
- policy_factory
+ policy_factory.in ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}