diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-23 20:26:13 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-23 20:26:13 +0000 |
commit | fb27a611b4aec80e588b990daf14728ed660ed38 (patch) | |
tree | 2fd5dc79ff78b73febe2c6894a8e560ed408e1d4 | |
parent | 94ca26e3e91fd28f59d610b201eee2cd203c4972 (diff) | |
download | ATCD-fb27a611b4aec80e588b990daf14728ed660ed38.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/ChangeLog-98c | 5 | ||||
-rw-r--r-- | TAO/tao/poa.cpp | 57 |
2 files changed, 43 insertions, 19 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 9b515499772..36bd744172a 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,8 @@ +Sat Jan 24 01:24:24 1998 Irfan Pyarali <irfan@cs.wustl.edu> + + * tao/poa.cpp (destroy_i): Changed etherealize objects to correct + report remaining_activations. + Fri Jan 23 10:55:40 1998 Carlos O'Ryan <coryan@cs.wustl.edu> * tao/objtable.cpp: diff --git a/TAO/tao/poa.cpp b/TAO/tao/poa.cpp index 055fd031681..2bcfeea8bdc 100644 --- a/TAO/tao/poa.cpp +++ b/TAO/tao/poa.cpp @@ -1065,19 +1065,38 @@ TAO_POA::destroy_i (CORBA::Boolean etherealize_objects, this->policies ().request_processing () == PortableServer::USE_SERVANT_MANAGER && !CORBA::is_nil (this->servant_activator_.in ())) { - for (TAO_Object_Table::iterator iterator = this->active_object_map ().begin (); - iterator != this->active_object_map ().end () && env.exception () == 0; - iterator++) - { - PortableServer::POA_var self = this->_this (env); - if (env.exception () != 0) - return; + PortableServer::POA_var self = this->_this (env); + if (env.exception () != 0) + return; - this->servant_activator_->etherealize ((*iterator).ext_id_, + while (1) + { + TAO_Object_Table::iterator iterator = this->active_object_map ().begin (); + if (iterator == this->active_object_map ().end () || env.exception () != 0) + break; + + PortableServer::Servant servant = 0; + PortableServer::ObjectId id ((*iterator).ext_id_); + + int result = this->active_object_map ().unbind (id, servant); + if (result != 0) + { + CORBA::Exception *exception = new CORBA::OBJ_ADAPTER (CORBA::COMPLETED_NO); + env.exception (exception); + return; + } + + CORBA::Boolean remaining_activations = CORBA::B_FALSE; + + if (this->policies ().id_uniqueness () == PortableServer::MULTIPLE_ID && + this->active_object_map ().find (servant) != -1) + remaining_activations = CORBA::B_TRUE; + + this->servant_activator_->etherealize (id, self.in (), - (*iterator).int_id_, + servant, CORBA::B_TRUE, - CORBA::B_FALSE, // @@ + remaining_activations, env); } } @@ -1446,7 +1465,7 @@ TAO_POA::deactivate_object_i (const PortableServer::ObjectId &oid, // If there is no active object associated with the specified Object // Id, the operation raises an ObjectNotActive exception. - if (result == -1) + if (result != 0) { CORBA::Exception *exception = new PortableServer::POA::ObjectNotActive; env.exception (exception); @@ -1465,17 +1484,17 @@ TAO_POA::deactivate_object_i (const PortableServer::ObjectId &oid, // deactivated. It is the responsibility of the object // implementation to refrain from destroying the servant while it is // active with any Id. - PortableServer::POA_var self = this->_this (env); - if (env.exception () != 0) - return; - if (!CORBA::is_nil (this->servant_activator_.in ())) { - CORBA::Boolean remaining_activations; - if (this->active_object_map ().find (servant) != -1) + PortableServer::POA_var self = this->_this (env); + if (env.exception () != 0) + return; + + CORBA::Boolean remaining_activations = CORBA::B_FALSE; + + if (this->policies ().id_uniqueness () == PortableServer::MULTIPLE_ID && + this->active_object_map ().find (servant) != -1) remaining_activations = CORBA::B_TRUE; - else - remaining_activations = CORBA::B_FALSE; this->servant_activator_->etherealize (oid, self.in (), |