summaryrefslogtreecommitdiff
path: root/TAO/examples/Buffered_Oneways/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/Buffered_Oneways/client.cpp')
-rw-r--r--TAO/examples/Buffered_Oneways/client.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/TAO/examples/Buffered_Oneways/client.cpp b/TAO/examples/Buffered_Oneways/client.cpp
index f3c41136d34..fa8531655df 100644
--- a/TAO/examples/Buffered_Oneways/client.cpp
+++ b/TAO/examples/Buffered_Oneways/client.cpp
@@ -131,10 +131,19 @@ main (int argc, char **argv)
if (parse_args_result != 0)
return parse_args_result;
- // Get an object reference from the argument string.
CORBA::Object_var base =
- orb->string_to_object (IOR,
- ACE_TRY_ENV);
+ orb->resolve_initial_references ("RootPOA",
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (base.in (),
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ // Get an object reference from the argument string.
+ base = orb->string_to_object (IOR,
+ ACE_TRY_ENV);
ACE_TRY_CHECK;
// Try to narrow the object reference to a <test> reference.
@@ -326,6 +335,11 @@ main (int argc, char **argv)
buffering_flush_policy_list[0]->destroy (ACE_TRY_ENV);
ACE_TRY_CHECK;
+ root_poa->destroy (1,
+ 1,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
// Destroy the ORB. On some platforms, e.g., Win32, the socket
// library is closed at the end of main(). This means that any
// socket calls made after main() fail. Hence if we wait for