summaryrefslogtreecommitdiff
path: root/TAO/tests/BiDirectional/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/BiDirectional/client.cpp')
-rw-r--r--TAO/tests/BiDirectional/client.cpp31
1 files changed, 13 insertions, 18 deletions
diff --git a/TAO/tests/BiDirectional/client.cpp b/TAO/tests/BiDirectional/client.cpp
index 584665586f7..a6523c6733c 100644
--- a/TAO/tests/BiDirectional/client.cpp
+++ b/TAO/tests/BiDirectional/client.cpp
@@ -42,13 +42,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,
@@ -56,7 +56,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 ();
@@ -69,8 +69,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
@@ -78,8 +77,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;
@@ -95,10 +93,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 ()))
{
@@ -115,12 +113,11 @@ 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 ());
// A method to kickstart callbacks from the server
CORBA::Long r =
- server->test_method (1 ACE_ENV_ARG_PARAMETER);
+ server->test_method (1);
if (r != 0)
{
@@ -131,16 +128,14 @@ main (int argc, char *argv[])
orb->run ();
- 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;
}