summaryrefslogtreecommitdiff
path: root/TAO/tests/RTCORBA/Banded_Connections
diff options
context:
space:
mode:
authorokellogg <okellogg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-01-29 20:21:11 +0000
committerokellogg <okellogg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-01-29 20:21:11 +0000
commit56681ffa90714cf82c32e907c0f80cea75166740 (patch)
treefd798ba5478a08b4b6f842cb8515ed9776861f5f /TAO/tests/RTCORBA/Banded_Connections
parent6b5e98c78a7f66029147fad41e2e75cea35854aa (diff)
downloadATCD-56681ffa90714cf82c32e907c0f80cea75166740.tar.gz
ChangeLogTag:Tue Jan 29 21:09:12 2002 Oliver Kellogg <oliver.kellogg@sysde.eads.net>
Diffstat (limited to 'TAO/tests/RTCORBA/Banded_Connections')
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/client.cpp60
-rw-r--r--TAO/tests/RTCORBA/Banded_Connections/server.cpp88
2 files changed, 74 insertions, 74 deletions
diff --git a/TAO/tests/RTCORBA/Banded_Connections/client.cpp b/TAO/tests/RTCORBA/Banded_Connections/client.cpp
index 13ad05417f5..badd76f3043 100644
--- a/TAO/tests/RTCORBA/Banded_Connections/client.cpp
+++ b/TAO/tests/RTCORBA/Banded_Connections/client.cpp
@@ -41,22 +41,22 @@ parse_args (int argc, char *argv[])
CORBA::Short
get_server_priority (Test_ptr server
- TAO_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL)
{
// Get the Priority Model Policy from the stub.
CORBA::Policy_var policy =
server->_get_policy (RTCORBA::PRIORITY_MODEL_POLICY_TYPE
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
// Narrow down to correct type.
RTCORBA::PriorityModelPolicy_var priority_policy =
- RTCORBA::PriorityModelPolicy::_narrow (policy.in () TAO_ENV_ARG_PARAMETER);
+ RTCORBA::PriorityModelPolicy::_narrow (policy.in () ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
// Make sure that we have the SERVER_DECLARED priority model.
RTCORBA::PriorityModel priority_model =
- priority_policy->priority_model (TAO_ENV_SINGLE_ARG_PARAMETER);
+ priority_policy->priority_model (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
if (priority_model != RTCORBA::SERVER_DECLARED)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -65,20 +65,20 @@ get_server_priority (Test_ptr server
-1);
// Return the server priority.
- return priority_policy->server_priority (TAO_ENV_SINGLE_ARG_PARAMETER);
+ return priority_policy->server_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
}
void
invocation_exception_test (Test_ptr obj,
CORBA::Short priority
- TAO_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL)
{
ACE_TRY
{
// Invoke method on test object.
obj->test_method (1,
priority
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// This next line of code should not run because an exception
@@ -115,7 +115,7 @@ main (int argc, char *argv[])
CORBA::ORB_init (argc,
argv,
""
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
@@ -128,42 +128,42 @@ main (int argc, char *argv[])
// Get the RTORB.
CORBA::Object_var object =
orb->resolve_initial_references ("RTORB"
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
RTCORBA::RTORB_var rt_orb =
RTCORBA::RTORB::_narrow (object.in ()
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Get the RTCurrent.
object =
orb->resolve_initial_references ("RTCurrent"
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
RTCORBA::Current_var current =
RTCORBA::Current::_narrow (object.in ()
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Test object 1 (with CLIENT_PROPAGATED priority model).
object =
orb->string_to_object (ior1
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
Test_var client_propagated_obj =
- Test::_narrow (object.in () TAO_ENV_ARG_PARAMETER);
+ Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Test object 2 (with SERVER_DECLARED priority model).
object = orb->string_to_object (ior2
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
Test_var server_declared_obj =
- Test::_narrow (object.in () TAO_ENV_ARG_PARAMETER);
+ Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Test: Attempt to set priority bands that do not match server
@@ -183,7 +183,7 @@ main (int argc, char *argv[])
policies.length (1);
policies[0] =
rt_orb->create_priority_banded_connection_policy (false_bands
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Set false bands at the object level. Note that a new object
@@ -191,24 +191,24 @@ main (int argc, char *argv[])
object =
client_propagated_obj->_set_policy_overrides (policies,
CORBA::SET_OVERRIDE
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
client_propagated_obj =
- Test::_narrow (object.in () TAO_ENV_ARG_PARAMETER);
+ Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Invoking on this object with false bands should produce an
// exception.
invocation_exception_test (client_propagated_obj.in (),
0
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Get the correct bands from the <server_declared_obj>.
policies[0] =
server_declared_obj->_get_policy (RTCORBA::PRIORITY_BANDED_CONNECTION_POLICY_TYPE
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
RTCORBA::PriorityBandedConnectionPolicy_var bands_policy =
@@ -222,12 +222,12 @@ main (int argc, char *argv[])
object =
client_propagated_obj->_set_policy_overrides (policies,
CORBA::SET_OVERRIDE
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Overwrite existing <client_propagated_obj>.
client_propagated_obj =
- Test::_narrow (object.in () TAO_ENV_ARG_PARAMETER);
+ Test::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Test: Attempt invocation on <client_propagated_obj> with
@@ -243,14 +243,14 @@ main (int argc, char *argv[])
// Reset the current thread's priority.
current->the_priority (client_priority
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Invoking on this object with an invalid client thread
// priority should produce an exception.
invocation_exception_test (client_propagated_obj.in (),
client_priority
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Test: Make invocations on the <client_propagated_obj>.
@@ -268,13 +268,13 @@ main (int argc, char *argv[])
// Reset the current thread's priority.
current->the_priority (client_priority
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Invoke test method on server.
client_propagated_obj->test_method (1, // CLIENT_PROPAGATED
client_priority
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
}
@@ -286,17 +286,17 @@ main (int argc, char *argv[])
// Get the <server_priority> from the stub.
CORBA::Short server_priority =
get_server_priority (server_declared_obj.in ()
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Invoke test method on server.
server_declared_obj->test_method (0, // SERVER_DECLARED
server_priority
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Testing over. Shut down Server ORB.
- server_declared_obj->shutdown (TAO_ENV_SINGLE_ARG_PARAMETER);
+ server_declared_obj->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY
diff --git a/TAO/tests/RTCORBA/Banded_Connections/server.cpp b/TAO/tests/RTCORBA/Banded_Connections/server.cpp
index c2b2660d8fc..ea801e29409 100644
--- a/TAO/tests/RTCORBA/Banded_Connections/server.cpp
+++ b/TAO/tests/RTCORBA/Banded_Connections/server.cpp
@@ -12,14 +12,14 @@ class Test_i : public POA_Test
public:
Test_i (CORBA::ORB_ptr orb,
RTCORBA::PriorityBands &bands
- TAO_ENV_ARG_DECL);
+ ACE_ENV_ARG_DECL);
void test_method (CORBA::Boolean client_propagated,
CORBA::Short priority
- TAO_ENV_ARG_DECL_NOT_USED)
+ ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
- void shutdown (TAO_ENV_SINGLE_ARG_DECL_NOT_USED)
+ void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException));
private:
@@ -30,7 +30,7 @@ private:
Test_i::Test_i (CORBA::ORB_ptr orb,
RTCORBA::PriorityBands &bands
- TAO_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL)
: orb_ (CORBA::ORB::_duplicate (orb)),
bands_ (bands),
rt_current_ ()
@@ -38,24 +38,24 @@ Test_i::Test_i (CORBA::ORB_ptr orb,
// We resolve and store the RT Current for later use.
CORBA::Object_var obj =
this->orb_->resolve_initial_references ("RTCurrent"
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
this->rt_current_ =
RTCORBA::Current::_narrow (obj.in ()
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
void
Test_i::test_method (CORBA::Boolean client_propagated,
CORBA::Short client_priority
- TAO_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// Get the upcall thread's priority.
CORBA::Short server_priority =
- this->rt_current_->the_priority (TAO_ENV_SINGLE_ARG_PARAMETER);
+ this->rt_current_->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
// Check which policy we are dealing with.
@@ -116,11 +116,11 @@ Test_i::test_method (CORBA::Boolean client_propagated,
}
void
-Test_i::shutdown (TAO_ENV_SINGLE_ARG_DECL)
+Test_i::shutdown (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->orb_->shutdown (0
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
@@ -233,24 +233,24 @@ create_object (PortableServer::POA_ptr poa,
CORBA::ORB_ptr orb,
Test_i *server_impl,
const char *filename
- TAO_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL)
{
// Register servant with the POA.
PortableServer::ObjectId_var id;
id = poa->activate_object (server_impl
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
// Create object reference.
CORBA::Object_var server =
poa->id_to_reference (id.in ()
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
// Print out the IOR.
CORBA::String_var ior =
orb->object_to_string (server.in ()
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
// Print ior to the file.
@@ -276,7 +276,7 @@ void
object_activation_exception_test (RTPortableServer::POA_ptr poa,
Test_i *server_impl,
CORBA::Short priority
- TAO_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL)
{
ACE_TRY
{
@@ -284,7 +284,7 @@ object_activation_exception_test (RTPortableServer::POA_ptr poa,
PortableServer::ObjectId_var id =
poa->activate_object_with_priority (server_impl,
priority
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// This next line of code should not run because an exception
@@ -311,7 +311,7 @@ void
poa_creation_exception_test (PortableServer::POA_ptr root_poa,
PortableServer::POAManager_ptr manager,
CORBA::PolicyList &policies
- TAO_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL)
{
ACE_TRY
{
@@ -320,7 +320,7 @@ poa_creation_exception_test (PortableServer::POA_ptr root_poa,
root_poa->create_POA ("Child_POA",
manager,
policies
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// This next line of code should not run because an exception
@@ -357,7 +357,7 @@ main (int argc, char *argv[])
CORBA::ORB_init (argc,
argv,
""
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Parse arguments.
@@ -370,27 +370,27 @@ main (int argc, char *argv[])
// Get the RTORB.
CORBA::Object_var object =
orb->resolve_initial_references ("RTORB"
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
RTCORBA::RTORB_var rt_orb =
RTCORBA::RTORB::_narrow (object.in ()
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Get the RootPOA.
object =
orb->resolve_initial_references ("RootPOA"
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in () TAO_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Get the POA Manager.
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (TAO_ENV_SINGLE_ARG_PARAMETER);
+ root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
// Obtain priority bands to be used in this test from the file
@@ -436,7 +436,7 @@ main (int argc, char *argv[])
allow_request_buffering,
max_buffered_requests,
max_request_buffer_size
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Test: Attempt to create a POA with priority bands that do not
@@ -455,13 +455,13 @@ main (int argc, char *argv[])
// Create a bands policy.
poa_policy_list[0] =
rt_orb->create_priority_banded_connection_policy (false_bands
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Create a thread-pool policy.
poa_policy_list[1] =
rt_orb->create_threadpool_policy (threadpool_id
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Try to create a POA with invalid policies. Should throw an
@@ -469,7 +469,7 @@ main (int argc, char *argv[])
poa_creation_exception_test (root_poa.in (),
poa_manager.in (),
poa_policy_list
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Two policies for the next POA.
@@ -479,13 +479,13 @@ main (int argc, char *argv[])
poa_policy_list[0] =
rt_orb->create_priority_model_policy (RTCORBA::CLIENT_PROPAGATED,
0
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Create a thread-pool policy.
poa_policy_list[1] =
rt_orb->create_threadpool_policy (threadpool_id
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Create POA with CLIENT_PROPAGATED priority model, with lanes
@@ -494,7 +494,7 @@ main (int argc, char *argv[])
root_poa->create_POA ("client_propagated_poa",
poa_manager.in (),
poa_policy_list
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Three policies for the next POA.
@@ -508,19 +508,19 @@ main (int argc, char *argv[])
poa_policy_list[0] =
rt_orb->create_priority_model_policy (RTCORBA::SERVER_DECLARED,
poa_priority
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Create a bands policy.
poa_policy_list[1] =
rt_orb->create_priority_banded_connection_policy (bands
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Create a thread-pool policy.
poa_policy_list[2] =
rt_orb->create_threadpool_policy (threadpool_id
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Create POA with SERVER_DECLARED priority model, with bands
@@ -529,7 +529,7 @@ main (int argc, char *argv[])
root_poa->create_POA ("server_declared_poa",
poa_manager.in (),
poa_policy_list
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Test: Attempt to register an object with priority that
@@ -538,7 +538,7 @@ main (int argc, char *argv[])
"\n<---Test--->: Servant priority does not match lanes\n\n"));
RTPortableServer::POA_var rt_server_declared_poa =
- RTPortableServer::POA::_narrow (server_declared_poa.in () TAO_ENV_ARG_PARAMETER);
+ RTPortableServer::POA::_narrow (server_declared_poa.in () ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Activation with incorrect priority should fail.
@@ -546,19 +546,19 @@ main (int argc, char *argv[])
object_activation_exception_test (rt_server_declared_poa.in (),
0,
wrong_priority
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
// Create first servant and register with <client_propagated_poa>.
Test_i server_impl (orb.in (),
bands
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
result = create_object (client_propagated_poa.in (),
orb.in (),
&server_impl,
ior_output_file1
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (result != 0)
return result;
@@ -566,27 +566,27 @@ main (int argc, char *argv[])
// Create second servant and register with <server_declared_poa>.
Test_i server_impl2 (orb.in (),
bands
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
result = create_object (server_declared_poa.in (),
orb.in (),
&server_impl2,
ior_output_file2
- TAO_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (result != 0)
return result;
// Activate POA manager.
- poa_manager->activate (TAO_ENV_SINGLE_ARG_PARAMETER);
+ poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
// Run ORB.
- orb->run (TAO_ENV_SINGLE_ARG_PARAMETER);
+ orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
// Destroy ORB.
- orb->destroy (TAO_ENV_SINGLE_ARG_PARAMETER);
+ orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
}
ACE_CATCHANY