diff options
-rw-r--r-- | TAO/tao/RTCORBA/RT_ORBInitializer.cpp | 17 | ||||
-rw-r--r-- | TAO/tao/RTCORBA/RT_ORBInitializer.h | 8 | ||||
-rwxr-xr-x | TAO/tests/RTCORBA/Linear_Priority/run_test.pl | 4 |
3 files changed, 15 insertions, 14 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; } diff --git a/TAO/tao/RTCORBA/RT_ORBInitializer.h b/TAO/tao/RTCORBA/RT_ORBInitializer.h index d64f3a8ccf9..5f876452de6 100644 --- a/TAO/tao/RTCORBA/RT_ORBInitializer.h +++ b/TAO/tao/RTCORBA/RT_ORBInitializer.h @@ -26,8 +26,6 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "RT_PolicyFactory.h" - #include "tao/PortableInterceptorC.h" #include "tao/LocalObject.h" @@ -79,12 +77,6 @@ private: ACE_ENV_ARG_DECL); private: - - /// Instance of the RTCORBA policy factory. - /// The RTCORBA policy factory is stateless and reentrant, so share - /// a single instance between all ORBs. - TAO_RT_PolicyFactory policy_factory_; - /// Priority mapping type. int priority_mapping_type_; diff --git a/TAO/tests/RTCORBA/Linear_Priority/run_test.pl b/TAO/tests/RTCORBA/Linear_Priority/run_test.pl index b5aa193758d..b5b844fcfa7 100755 --- a/TAO/tests/RTCORBA/Linear_Priority/run_test.pl +++ b/TAO/tests/RTCORBA/Linear_Priority/run_test.pl @@ -84,7 +84,9 @@ sub run_server else { $SV = new PerlACE::Process ("server", @_); } - $SV->Spawn (); + if ($SV->Spawn () == -1) { + exit 1; + } if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) { |