diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-01-07 21:29:33 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-01-07 21:29:33 +0000 |
commit | 08189aa335daafd4ec7112aa0a55795350673242 (patch) | |
tree | f0c71665b10ac634b9a11faac8e776e0ac47e6b3 | |
parent | 58fdcfb164e5f462e456d1263d64a222e3d012d2 (diff) | |
download | ATCD-08189aa335daafd4ec7112aa0a55795350673242.tar.gz |
* tao/ORB.cpp (destroy):
Corrected behavior where ORB::destroy() would throw a
BAD_INV_ORDER exception if the ORB was already shutdown, which
does not agree with the CORBA specification. It is now possible
to call ORB::destroy() after ORB::shutdown().
-rw-r--r-- | TAO/tao/ORB.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 0a11f06b101..5f657231db2 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -191,8 +191,18 @@ CORBA_ORB::shutdown (CORBA::Boolean wait_for_completion, void CORBA_ORB::destroy (CORBA::Environment &ACE_TRY_ENV) { - this->check_shutdown (ACE_TRY_ENV); - ACE_CHECK; + if (this->orb_core () == 0) + { + // If the ORB_Core pointer is zero, assume that the ORB_Core has + // been destroyed. + + // As defined by the CORBA 2.3 specification, throw a + // CORBA::OBJECT_NOT_EXIST exception if the ORB has been + // destroyed by the time an ORB function is called. + + ACE_THROW (CORBA::OBJECT_NOT_EXIST (TAO_DEFAULT_MINOR_CODE, + CORBA::COMPLETED_NO)); + } if (TAO_debug_level >= 3) { @@ -930,8 +940,8 @@ CORBA_ORB::check_shutdown (CORBA_Environment &ACE_TRY_ENV) // been destroyed. // As defined by the CORBA 2.3 specification, throw a - // CORBA::OBJECT_NOT_EXIST exception with minor code 4 if the ORB - // has shutdown by the time an ORB function is called. + // CORBA::OBJECT_NOT_EXIST exception if the ORB has been + // destroyed by the time an ORB function is called. ACE_THROW (CORBA::OBJECT_NOT_EXIST (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_NO)); |