summaryrefslogtreecommitdiff
path: root/TAO/tao/RTCORBA/RT_ORB_Loader.cpp
diff options
context:
space:
mode:
authorfhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-06-20 14:33:20 +0000
committerfhunleth <fhunleth@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-06-20 14:33:20 +0000
commit30124d8d2aa5d8a3f54f53d9a0c56589089d184f (patch)
treed97d5947fff01c3053c287743fcbe786e96ccead /TAO/tao/RTCORBA/RT_ORB_Loader.cpp
parentc4e314de9d3855adf5385262a76ff1e7d3134a23 (diff)
downloadATCD-30124d8d2aa5d8a3f54f53d9a0c56589089d184f.tar.gz
ChangeLogTag:Wed Jun 20 09:29:20 2001 Frank Hunleth <fhunleth@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/RTCORBA/RT_ORB_Loader.cpp')
-rw-r--r--TAO/tao/RTCORBA/RT_ORB_Loader.cpp36
1 files changed, 23 insertions, 13 deletions
diff --git a/TAO/tao/RTCORBA/RT_ORB_Loader.cpp b/TAO/tao/RTCORBA/RT_ORB_Loader.cpp
index 754c7403026..82ec69e76e4 100644
--- a/TAO/tao/RTCORBA/RT_ORB_Loader.cpp
+++ b/TAO/tao/RTCORBA/RT_ORB_Loader.cpp
@@ -19,13 +19,11 @@ TAO_RT_ORB_Loader::Initializer (void)
ACE_Service_Config::static_svcs ()->
insert (&ace_svc_desc_TAO_RT_ORB_Loader);
- ACE_Service_Config::static_svcs ()->
- insert (&ace_svc_desc_TAO_RT_Current_Loader);
-
return 0;
}
TAO_RT_ORB_Loader::TAO_RT_ORB_Loader (void)
+ : initialized_ (0)
{
}
@@ -147,6 +145,13 @@ TAO_RT_ORB_Loader::init (int argc,
}
ACE_ENDTRY;
+ // Allow someone to retrieve RTORB.
+ this->initialized_ = 1;
+
+ // Allow someone to retrieve RTCurrent now.
+ ACE_Service_Config::static_svcs ()->
+ insert (&ace_svc_desc_TAO_RT_Current_Loader);
+
return 0;
}
@@ -157,17 +162,22 @@ TAO_RT_ORB_Loader::create_object (CORBA::ORB_ptr orb,
CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- /// Return RT_ORB
- CORBA::Object_ptr rt_orb;
+ // Return RT_ORB
+ CORBA::Object_ptr rt_orb = CORBA::Object::_nil ();
- ACE_NEW_THROW_EX (rt_orb,
- TAO_RT_ORB (orb),
- CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO_DEFAULT_MINOR_CODE,
- ENOMEM),
- CORBA::COMPLETED_NO));
- ACE_CHECK_RETURN (CORBA::Object::_nil ());
+ // Check that all of the RTCORBA hooks have been initialized
+ // successfully.
+ if (this->initialized_)
+ {
+ ACE_NEW_THROW_EX (rt_orb,
+ TAO_RT_ORB (orb),
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ TAO_DEFAULT_MINOR_CODE,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_CHECK_RETURN (CORBA::Object::_nil ());
+ }
return rt_orb;
}