summaryrefslogtreecommitdiff
path: root/TAO/tests/Oneway_Buffering
diff options
context:
space:
mode:
authorelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-25 18:17:52 +0000
committerelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-25 18:17:52 +0000
commit2ee7b7eed4c0cc10f4ec25b186b04202af01b565 (patch)
tree08a8a649c90559cf5b2228c1caad15515902613e /TAO/tests/Oneway_Buffering
parentc979767a00db4ea1299af482033a68829cc16675 (diff)
downloadATCD-2ee7b7eed4c0cc10f4ec25b186b04202af01b565.tar.gz
ChangeLogTag: Thu Jan 25 17:39:59 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/tests/Oneway_Buffering')
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp7
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering.h3
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp5
-rw-r--r--TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h3
-rw-r--r--TAO/tests/Oneway_Buffering/admin.cpp18
-rw-r--r--TAO/tests/Oneway_Buffering/client.cpp142
-rw-r--r--TAO/tests/Oneway_Buffering/server.cpp22
7 files changed, 81 insertions, 119 deletions
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp b/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp
index 4768a8bd14b..16db8fe73e2 100644
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp
+++ b/TAO/tests/Oneway_Buffering/Oneway_Buffering.cpp
@@ -13,11 +13,10 @@ Oneway_Buffering::Oneway_Buffering (CORBA::ORB_ptr orb,
}
void
-Oneway_Buffering::receive_data (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
+Oneway_Buffering::receive_data (const Test::Payload &the_payload)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->admin_->request_received (the_payload.length () ACE_ENV_ARG_PARAMETER);
+ this->admin_->request_received (the_payload.length ());
}
void
@@ -37,5 +36,5 @@ void
Oneway_Buffering::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+ this->orb_->shutdown (0);
}
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering.h b/TAO/tests/Oneway_Buffering/Oneway_Buffering.h
index b2b6764a311..9b32c9e4d58 100644
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering.h
+++ b/TAO/tests/Oneway_Buffering/Oneway_Buffering.h
@@ -18,8 +18,7 @@ public:
Test::Oneway_Buffering_Admin_ptr admin);
// = The skeleton methods
- virtual void receive_data (const Test::Payload &the_payload
- ACE_ENV_ARG_DECL)
+ virtual void receive_data (const Test::Payload &the_payload)
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void flush (void)
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp
index 59af5adc056..1525b0f0905 100644
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp
+++ b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.cpp
@@ -27,8 +27,7 @@ Oneway_Buffering_Admin::bytes_received_count (void)
}
void
-Oneway_Buffering_Admin::request_received (CORBA::ULong payload_length
- ACE_ENV_ARG_DECL_NOT_USED)
+Oneway_Buffering_Admin::request_received (CORBA::ULong payload_length)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->request_count_++;
@@ -45,5 +44,5 @@ void
Oneway_Buffering_Admin::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+ this->orb_->shutdown (0);
}
diff --git a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h
index 80825e37778..02272fd53bf 100644
--- a/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h
+++ b/TAO/tests/Oneway_Buffering/Oneway_Buffering_Admin.h
@@ -23,8 +23,7 @@ public:
virtual CORBA::ULong bytes_received_count (void)
ACE_THROW_SPEC ((CORBA::SystemException));
- virtual void request_received (CORBA::ULong payload_length
- ACE_ENV_ARG_DECL)
+ virtual void request_received (CORBA::ULong payload_length)
ACE_THROW_SPEC ((CORBA::SystemException));
virtual void flush (void)
diff --git a/TAO/tests/Oneway_Buffering/admin.cpp b/TAO/tests/Oneway_Buffering/admin.cpp
index 097b71236eb..830ab7969b6 100644
--- a/TAO/tests/Oneway_Buffering/admin.cpp
+++ b/TAO/tests/Oneway_Buffering/admin.cpp
@@ -37,16 +37,16 @@ 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");
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (poa_object.in ());
if (CORBA::is_nil (root_poa.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -69,7 +69,7 @@ main (int argc, char *argv[])
oneway_buffering_admin_impl->_this ();
CORBA::String_var ior =
- orb->object_to_string (oneway_buffering_admin.in () ACE_ENV_ARG_PARAMETER);
+ orb->object_to_string (oneway_buffering_admin.in ());
// If the ior_output_file exists, output the ior to it
FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
@@ -87,17 +87,15 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "(%P|%t) admin - event loop finished\n"));
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
+ root_poa->destroy (1, 1);
orb->destroy ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in admin:");
+ ex._tao_print_exception ("Exception caught in admin:");
return 1;
}
- ACE_ENDTRY;
return 0;
}
diff --git a/TAO/tests/Oneway_Buffering/client.cpp b/TAO/tests/Oneway_Buffering/client.cpp
index 18617f80bbe..4ad22187b4c 100644
--- a/TAO/tests/Oneway_Buffering/client.cpp
+++ b/TAO/tests/Oneway_Buffering/client.cpp
@@ -91,44 +91,40 @@ parse_args (int argc, char *argv[])
int
run_message_count (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
+ Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin);
int
run_timeout (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
+ Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin);
int
run_timeout_reactive (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
+ Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin);
int
run_buffer_size (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL);
+ Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin);
int
main (int argc, char *argv[])
{
int test_failed = 0;
- ACE_TRY_NEW_ENV
+ try
{
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (argc, argv, "");
if (parse_args (argc, argv) != 0)
return 1;
CORBA::Object_var tmp =
- orb->string_to_object(server_ior ACE_ENV_ARG_PARAMETER);
+ orb->string_to_object(server_ior);
Test::Oneway_Buffering_var oneway_buffering =
- Test::Oneway_Buffering::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
+ Test::Oneway_Buffering::_narrow(tmp.in ());
if (CORBA::is_nil (oneway_buffering.in ()))
{
@@ -139,10 +135,10 @@ main (int argc, char *argv[])
}
tmp =
- orb->string_to_object(admin_ior ACE_ENV_ARG_PARAMETER);
+ orb->string_to_object(admin_ior);
Test::Oneway_Buffering_Admin_var oneway_buffering_admin =
- Test::Oneway_Buffering_Admin::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
+ Test::Oneway_Buffering_Admin::_narrow(tmp.in ());
if (CORBA::is_nil (oneway_buffering_admin.in ()))
{
@@ -159,8 +155,7 @@ main (int argc, char *argv[])
test_failed =
run_message_count (orb.in (),
oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering_admin.in ());
}
else if (run_timeout_test)
{
@@ -169,8 +164,7 @@ main (int argc, char *argv[])
test_failed =
run_timeout (orb.in (),
oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering_admin.in ());
}
else if (run_timeout_reactive_test)
{
@@ -179,8 +173,7 @@ main (int argc, char *argv[])
test_failed =
run_timeout_reactive (orb.in (),
oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering_admin.in ());
}
else if (run_buffer_size_test)
{
@@ -189,8 +182,7 @@ main (int argc, char *argv[])
test_failed =
run_buffer_size (orb.in (),
oneway_buffering.in (),
- oneway_buffering_admin.in ()
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering_admin.in ());
}
else
{
@@ -204,13 +196,11 @@ main (int argc, char *argv[])
orb->destroy ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in client:");
+ ex._tao_print_exception ("Exception caught in client:");
return 1;
}
- ACE_ENDTRY;
return test_failed;
}
@@ -219,14 +209,13 @@ int
configure_policies (CORBA::ORB_ptr orb,
const TAO::BufferingConstraint &buffering_constraint,
Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_out flusher
- ACE_ENV_ARG_DECL)
+ Test::Oneway_Buffering_out flusher)
{
CORBA::Object_var object =
- orb->resolve_initial_references ("PolicyCurrent" ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("PolicyCurrent");
CORBA::PolicyCurrent_var policy_current =
- CORBA::PolicyCurrent::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ CORBA::PolicyCurrent::_narrow (object.in ());
if (CORBA::is_nil (policy_current.in ()))
{
@@ -242,15 +231,12 @@ configure_policies (CORBA::ORB_ptr orb,
CORBA::PolicyList policies (2); policies.length (2);
policies[0] =
orb->create_policy (Messaging::SYNC_SCOPE_POLICY_TYPE,
- scope_as_any
- ACE_ENV_ARG_PARAMETER);
+ scope_as_any);
policies[1] =
orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE,
- buffering_as_any
- ACE_ENV_ARG_PARAMETER);
+ buffering_as_any);
- policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
+ policy_current->set_policy_overrides (policies, CORBA::ADD_OVERRIDE);
policies[0]->destroy ();
policies[1]->destroy ();
@@ -265,25 +251,22 @@ configure_policies (CORBA::ORB_ptr orb,
policies.length (1);
policies[0] =
orb->create_policy (TAO::BUFFERING_CONSTRAINT_POLICY_TYPE,
- buffering_as_any
- ACE_ENV_ARG_PARAMETER);
+ buffering_as_any);
object =
oneway_buffering->_set_policy_overrides (policies,
- CORBA::ADD_OVERRIDE
- ACE_ENV_ARG_PARAMETER);
+ CORBA::ADD_OVERRIDE);
policies[0]->destroy ();
flusher =
- Test::Oneway_Buffering::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ Test::Oneway_Buffering::_narrow (object.in ());
return 0;
}
void
-sync_server (Test::Oneway_Buffering_ptr flusher
- ACE_ENV_ARG_DECL)
+sync_server (Test::Oneway_Buffering_ptr flusher)
{
// Get back in sync with the server...
flusher->flush ();
@@ -294,13 +277,12 @@ int
run_liveness_test (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_ptr oneway_buffering,
Test::Oneway_Buffering_ptr flusher,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
+ Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin)
{
ACE_DEBUG ((LM_DEBUG, ".... checking for liveness\n"));
int test_failed = 0;
- sync_server (flusher ACE_ENV_ARG_PARAMETER);
+ sync_server (flusher);
CORBA::ULong send_count =
oneway_buffering_admin->request_count ();
@@ -315,14 +297,14 @@ run_liveness_test (CORBA::ORB_ptr orb,
int depth = 0;
for (int i = 0; i != liveness_test_iterations; ++i)
{
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
+ oneway_buffering->receive_data (payload);
send_count++;
CORBA::ULong receive_count =
oneway_buffering_admin->request_count ();
ACE_Time_Value tv (0, 10 * 1000);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
+ orb->run (tv);
// Once the system has sent enough messages we don't
// expect it to fall too far behind, i.e. at least 90% of the
@@ -339,12 +321,12 @@ run_liveness_test (CORBA::ORB_ptr orb,
"expected %u\n",
i, receive_count, expected));
- sync_server (flusher ACE_ENV_ARG_PARAMETER);
+ sync_server (flusher);
}
if (depth++ == LIVENESS_MAX_DEPTH)
{
- sync_server (flusher ACE_ENV_ARG_PARAMETER);
+ sync_server (flusher);
depth = 0;
}
@@ -357,8 +339,7 @@ run_liveness_test (CORBA::ORB_ptr orb,
int
run_message_count (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
+ Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin)
{
TAO::BufferingConstraint buffering_constraint;
buffering_constraint.mode = TAO::BUFFER_MESSAGE_COUNT;
@@ -369,8 +350,7 @@ run_message_count (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_var flusher;
int test_failed =
configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering, flusher.out ());
if (test_failed != 0)
return test_failed;
@@ -383,7 +363,7 @@ run_message_count (CORBA::ORB_ptr orb,
CORBA::ULong send_count = 0;
for (int i = 0; i != iterations; ++i)
{
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
+ sync_server (flusher.in ());
CORBA::ULong initial_receive_count =
oneway_buffering_admin->request_count ();
@@ -398,14 +378,14 @@ run_message_count (CORBA::ORB_ptr orb,
while (1)
{
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
+ oneway_buffering->receive_data (payload);
send_count++;
CORBA::ULong receive_count =
oneway_buffering_admin->request_count ();
ACE_Time_Value tv (0, 10 * 1000);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
+ orb->run (tv);
CORBA::ULong iteration_count =
send_count - initial_receive_count;
@@ -442,8 +422,7 @@ run_message_count (CORBA::ORB_ptr orb,
run_liveness_test (orb,
oneway_buffering,
flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering_admin);
if (liveness_test_failed)
test_failed = 1;
@@ -454,8 +433,7 @@ run_message_count (CORBA::ORB_ptr orb,
int
run_timeout (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
+ Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin)
{
TAO::BufferingConstraint buffering_constraint;
buffering_constraint.mode = TAO::BUFFER_TIMEOUT;
@@ -466,8 +444,7 @@ run_timeout (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_var flusher;
int test_failed =
configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering, flusher.out ());
if (test_failed != 0)
return test_failed;
@@ -480,7 +457,7 @@ run_timeout (CORBA::ORB_ptr orb,
CORBA::ULong send_count = 0;
for (int i = 0; i != iterations; ++i)
{
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
+ sync_server (flusher.in ());
CORBA::ULong initial_receive_count =
oneway_buffering_admin->request_count ();
@@ -496,14 +473,14 @@ run_timeout (CORBA::ORB_ptr orb,
ACE_Time_Value start = ACE_OS::gettimeofday ();
while (1)
{
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
+ oneway_buffering->receive_data (payload);
send_count++;
CORBA::ULong receive_count =
oneway_buffering_admin->request_count ();
ACE_Time_Value tv (0, 10 * 1000);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
+ orb->run (tv);
ACE_Time_Value elapsed = ACE_OS::gettimeofday () - start;
if (receive_count != initial_receive_count)
@@ -539,8 +516,7 @@ run_timeout (CORBA::ORB_ptr orb,
int liveness_test_failed =
run_liveness_test (orb, oneway_buffering,
flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering_admin);
if (liveness_test_failed)
test_failed = 1;
@@ -552,8 +528,7 @@ run_timeout (CORBA::ORB_ptr orb,
int
run_timeout_reactive (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
+ Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin)
{
TAO::BufferingConstraint buffering_constraint;
buffering_constraint.mode = TAO::BUFFER_TIMEOUT;
@@ -564,8 +539,7 @@ run_timeout_reactive (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_var flusher;
int test_failed =
configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering, flusher.out ());
if (test_failed != 0)
return test_failed;
@@ -578,7 +552,7 @@ run_timeout_reactive (CORBA::ORB_ptr orb,
CORBA::ULong send_count = 0;
for (int i = 0; i != iterations; ++i)
{
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
+ sync_server (flusher.in ());
CORBA::ULong initial_receive_count =
oneway_buffering_admin->request_count ();
@@ -594,7 +568,7 @@ run_timeout_reactive (CORBA::ORB_ptr orb,
ACE_Time_Value start = ACE_OS::gettimeofday ();
for (int j = 0; j != 20; ++j)
{
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
+ oneway_buffering->receive_data (payload);
send_count++;
}
while (1)
@@ -603,7 +577,7 @@ run_timeout_reactive (CORBA::ORB_ptr orb,
oneway_buffering_admin->request_count ();
ACE_Time_Value tv (0, 10 * 1000);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
+ orb->run (tv);
ACE_Time_Value elapsed = ACE_OS::gettimeofday () - start;
@@ -640,8 +614,7 @@ run_timeout_reactive (CORBA::ORB_ptr orb,
int liveness_test_failed =
run_liveness_test (orb, oneway_buffering,
flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering_admin);
if (liveness_test_failed)
test_failed = 1;
@@ -653,8 +626,7 @@ run_timeout_reactive (CORBA::ORB_ptr orb,
int
run_buffer_size (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_ptr oneway_buffering,
- Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin
- ACE_ENV_ARG_DECL)
+ Test::Oneway_Buffering_Admin_ptr oneway_buffering_admin)
{
TAO::BufferingConstraint buffering_constraint;
buffering_constraint.mode = TAO::BUFFER_MESSAGE_BYTES;
@@ -665,8 +637,7 @@ run_buffer_size (CORBA::ORB_ptr orb,
Test::Oneway_Buffering_var flusher;
int test_failed =
configure_policies (orb, buffering_constraint,
- oneway_buffering, flusher.out ()
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering, flusher.out ());
if (test_failed != 0)
return test_failed;
@@ -679,7 +650,7 @@ run_buffer_size (CORBA::ORB_ptr orb,
CORBA::ULong bytes_sent = 0;
for (int i = 0; i != iterations; ++i)
{
- sync_server (flusher.in () ACE_ENV_ARG_PARAMETER);
+ sync_server (flusher.in ());
CORBA::ULong initial_bytes_received =
oneway_buffering_admin->bytes_received_count ();
@@ -694,14 +665,14 @@ run_buffer_size (CORBA::ORB_ptr orb,
while (1)
{
- oneway_buffering->receive_data (payload ACE_ENV_ARG_PARAMETER);
+ oneway_buffering->receive_data (payload);
bytes_sent += PAYLOAD_LENGTH;
CORBA::ULong bytes_received =
oneway_buffering_admin->bytes_received_count ();
ACE_Time_Value tv (0, 10 * 1000);
- orb->run (tv ACE_ENV_ARG_PARAMETER);
+ orb->run (tv);
CORBA::ULong payload_delta =
bytes_sent - initial_bytes_received;
@@ -742,8 +713,7 @@ run_buffer_size (CORBA::ORB_ptr orb,
int liveness_test_failed =
run_liveness_test (orb, oneway_buffering,
flusher.in (),
- oneway_buffering_admin
- ACE_ENV_ARG_PARAMETER);
+ oneway_buffering_admin);
if (liveness_test_failed)
test_failed = 1;
diff --git a/TAO/tests/Oneway_Buffering/server.cpp b/TAO/tests/Oneway_Buffering/server.cpp
index 9bdfa92be29..bd0c5a289e5 100644
--- a/TAO/tests/Oneway_Buffering/server.cpp
+++ b/TAO/tests/Oneway_Buffering/server.cpp
@@ -43,16 +43,16 @@ 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");
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (poa_object.in ());
if (CORBA::is_nil (root_poa.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -66,10 +66,10 @@ main (int argc, char *argv[])
return 1;
CORBA::Object_var tmp =
- orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
+ orb->string_to_object(ior);
Test::Oneway_Buffering_Admin_var admin =
- Test::Oneway_Buffering_Admin::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
+ Test::Oneway_Buffering_Admin::_narrow(tmp.in ());
if (CORBA::is_nil (admin.in ()))
{
@@ -90,7 +90,7 @@ main (int argc, char *argv[])
oneway_buffering_impl->_this ();
CORBA::String_var ior =
- orb->object_to_string (oneway_buffering.in () ACE_ENV_ARG_PARAMETER);
+ orb->object_to_string (oneway_buffering.in ());
// If the ior_output_file exists, output the ior to it
FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
@@ -108,17 +108,15 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
+ root_poa->destroy (1, 1);
orb->destroy ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception caught in server:");
+ ex._tao_print_exception ("Exception caught in server:");
return 1;
}
- ACE_ENDTRY;
return 0;
}