diff options
author | pgontla <pgontla@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-02-13 02:25:47 +0000 |
---|---|---|
committer | pgontla <pgontla@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-02-13 02:25:47 +0000 |
commit | d0edceb21faf43360551cc5710d981127b436e0d (patch) | |
tree | 59629f69810037cb3041a8efccd21559213b0c5f | |
parent | 22060c23e4505e1373e4b6cf252a0bd1fc33b940 (diff) | |
download | ATCD-d0edceb21faf43360551cc5710d981127b436e0d.tar.gz |
ChangeLogTag: Tue Feb 12 17:53:31 2002 Priyanka Gontla <pgontla@ece.uci.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 7 | ||||
-rw-r--r-- | TAO/tao/PortableServer/POA.cpp | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index ed1c4f2298d..a817489a02f 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,10 @@ +Tue Feb 12 17:53:31 2002 Priyanka Gontla <pgontla@ece.uci.edu> + + * tao/PortableServer/POA.cpp (destroy_i): + Got a duplicate before releasing the poa so that it stays around + while we change its status and call the corresponding + interceptor's adapter_state_changed methods. + Tue Feb 12 16:01:25 2002 Ossama Othman <ossama@uci.edu> * tao/PICurrent.cpp (copy): diff --git a/TAO/tao/PortableServer/POA.cpp b/TAO/tao/PortableServer/POA.cpp index 509f2aa86df..52969ff6715 100644 --- a/TAO/tao/PortableServer/POA.cpp +++ b/TAO/tao/PortableServer/POA.cpp @@ -377,6 +377,7 @@ TAO_POA::complete_destruction_i (ACE_ENV_SINGLE_ARG_DECL) if (result != 0) ACE_THROW (CORBA::OBJ_ADAPTER ()); + // Forced cleanup. The new memory management scheme is evil and can // lead to reference deadlock, i.e., POA holds object A, but POA // cannot die because object A hold POA. @@ -803,6 +804,14 @@ TAO_POA::destroy_i (CORBA::Boolean etherealize_objects, (non_servant_upcall_in_progress == 0 || &non_servant_upcall_in_progress->poa () != this)) { + // According to the ORT spec, after a POA is destroyed, its state + // has to be changed to NON_EXISTENT and all the registered + // interceptors are to be informed. Since, the POA is destroyed + // and is released in the complete_destruction_i method, we are + // trying to keep the poa still around by doing a duplicate of + // it. (a hack). + PortableServer::POA_var poa = PortableServer::POA::_duplicate (this); + this->complete_destruction_i (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; @@ -812,6 +821,8 @@ TAO_POA::destroy_i (CORBA::Boolean etherealize_objects, this->adapter_state_ ACE_ENV_ARG_PARAMETER); ACE_CHECK; + + } else { |