summaryrefslogtreecommitdiff
path: root/TAO/tests/BiDirectional_DelayedUpcall/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/BiDirectional_DelayedUpcall/client.cpp')
-rw-r--r--TAO/tests/BiDirectional_DelayedUpcall/client.cpp33
1 files changed, 14 insertions, 19 deletions
diff --git a/TAO/tests/BiDirectional_DelayedUpcall/client.cpp b/TAO/tests/BiDirectional_DelayedUpcall/client.cpp
index ad33e1782be..86d6a8a89bb 100644
--- a/TAO/tests/BiDirectional_DelayedUpcall/client.cpp
+++ b/TAO/tests/BiDirectional_DelayedUpcall/client.cpp
@@ -43,13 +43,13 @@ parse_args (int argc, char *argv[])
int
main (int argc, char *argv[])
{
- ACE_TRY_NEW_ENV
+ try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (argc, argv, "");
CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
if (CORBA::is_nil (poa_object.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -57,7 +57,7 @@ main (int argc, char *argv[])
1);
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (poa_object.in ());
PortableServer::POAManager_var poa_manager =
root_poa->the_POAManager ();
@@ -70,8 +70,7 @@ main (int argc, char *argv[])
pol <<= BiDirPolicy::BOTH;
policies[0] =
orb->create_policy (BiDirPolicy::BIDIRECTIONAL_POLICY_TYPE,
- pol
- ACE_ENV_ARG_PARAMETER);
+ pol);
// Create POA as child of RootPOA with the above policies. This POA
// will receive request in the same connection in which it sent
@@ -79,8 +78,7 @@ main (int argc, char *argv[])
PortableServer::POA_var child_poa =
root_poa->create_POA ("childPOA",
poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
// Creation of childPOA is over. Destroy the Policy objects.
for (CORBA::ULong i = 0;
@@ -96,10 +94,10 @@ main (int argc, char *argv[])
return 1;
CORBA::Object_var object =
- orb->string_to_object (ior ACE_ENV_ARG_PARAMETER);
+ orb->string_to_object (ior);
Simple_Server_var server =
- Simple_Server::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ Simple_Server::_narrow (object.in ());
if (CORBA::is_nil (server.in ()))
{
@@ -120,13 +118,12 @@ main (int argc, char *argv[])
callback_impl->_this ();
// Send the calback object to the server
- server->callback_object (callback.in ()
- ACE_ENV_ARG_PARAMETER);
+ server->callback_object (callback.in ());
// Call the client that will make remote calls to us again, but
// not directly, but delayed for a second or so.
CORBA::Long r =
- server->test_method (1 ACE_ENV_ARG_PARAMETER);
+ server->test_method (1);
if (r != 0)
{
@@ -137,21 +134,19 @@ main (int argc, char *argv[])
// Run now the ORB for 5 seconds
ACE_Time_Value run_time (5);
- orb->run (run_time ACE_ENV_ARG_PARAMETER);
+ orb->run (run_time);
// Shutdown the server
server->shutdown ();
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
+ root_poa->destroy (1, 1);
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
+ ex._tao_print_exception ("Caught exception:");
return 1;
}
- ACE_ENDTRY;
return 0;
}