summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Simple_Naming
diff options
context:
space:
mode:
authormarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-04-30 01:26:28 +0000
committermarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-04-30 01:26:28 +0000
commit3a64c29d4d6123d34390c6c21f241088f417dbde (patch)
treed70f7b4bb01bfd1b442c820dff82769bcd1a846b /TAO/orbsvcs/tests/Simple_Naming
parentd0e1461c529316181480c412913d9f68e18eb5a5 (diff)
downloadATCD-3a64c29d4d6123d34390c6c21f241088f417dbde.tar.gz
updated mt test to deal with new POA functionality.
Diffstat (limited to 'TAO/orbsvcs/tests/Simple_Naming')
-rw-r--r--TAO/orbsvcs/tests/Simple_Naming/client.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/TAO/orbsvcs/tests/Simple_Naming/client.cpp b/TAO/orbsvcs/tests/Simple_Naming/client.cpp
index 7e8b8aa397d..981c364b88c 100644
--- a/TAO/orbsvcs/tests/Simple_Naming/client.cpp
+++ b/TAO/orbsvcs/tests/Simple_Naming/client.cpp
@@ -379,10 +379,30 @@ MT_Test::execute (TAO_Naming_Client &root_context)
// Spawn threads, each of which will be executing svc ().
int status = this->activate (THR_NEW_LWP | THR_JOINABLE,
size_);
+
+ // @@The code below isn't right for cases with error conditions.
+ // The proper thing to do is to make impl objects deregister from
+ // poa in their destructors.
+
if (status == -1)
return -1;
else
- return this->wait ();
+ this->wait ();
+
+ // Now, unregister our servant from POA before exiting
+ PortableServer::POA_var poa =
+ test_obj_impl._default_POA ();
+
+ PortableServer::ObjectId_var id =
+ poa->servant_to_id (&test_obj_impl,
+ ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
+
+ poa->deactivate_object (id.in (),
+ ACE_TRY_ENV);
+ ACE_CHECK_RETURN (-1);
+
+ return 0;
}
int