summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp')
-rw-r--r--TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp43
1 files changed, 19 insertions, 24 deletions
diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp b/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp
index eebd951a1cb..dbd64fada44 100644
--- a/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp
+++ b/TAO/orbsvcs/tests/CosEvent/Basic/Shutdown.cpp
@@ -10,65 +10,60 @@ ACE_RCSID( CEC_Tests_Basic,
"$Id$")
static void run_test (PortableServer::POA_ptr poa,
- int with_callbacks
- ACE_ENV_ARG_DECL);
+ int with_callbacks);
int
main (int argc, char* argv[])
{
TAO_CEC_Default_Factory::init_svcs ();
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
// ORB initialization boiler plate...
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_init (argc, argv, "");
CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var poa =
- PortableServer::POA::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (object.in ());
PortableServer::POAManager_var poa_manager =
poa->the_POAManager ();
poa_manager->activate ();
// ****************************************************************
- run_test (poa.in (), 0 ACE_ENV_ARG_PARAMETER);
+ run_test (poa.in (), 0);
- run_test (poa.in (), 1 ACE_ENV_ARG_PARAMETER);
+ run_test (poa.in (), 1);
// ****************************************************************
- poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
+ poa->destroy (1, 1);
orb->destroy ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Service");
+ ex._tao_print_exception ("Service");
return 1;
}
- ACE_ENDTRY;
return 0;
}
void
-deactivate_servant (PortableServer::Servant servant
- ACE_ENV_ARG_DECL)
+deactivate_servant (PortableServer::Servant servant)
{
PortableServer::POA_var poa =
servant->_default_POA ();
PortableServer::ObjectId_var id =
- poa->servant_to_id (servant ACE_ENV_ARG_PARAMETER);
- poa->deactivate_object (id.in () ACE_ENV_ARG_PARAMETER);
+ poa->servant_to_id (servant);
+ poa->deactivate_object (id.in ());
}
static void
run_test (PortableServer::POA_ptr poa,
- int with_callbacks
- ACE_ENV_ARG_DECL)
+ int with_callbacks)
{
TAO_CEC_EventChannel_Attributes attributes (poa,
poa);
@@ -112,9 +107,9 @@ run_test (PortableServer::POA_ptr poa,
for (i = 0; i != n; ++i)
{
- consumer[i]->connect (consumer_admin.in () ACE_ENV_ARG_PARAMETER);
+ consumer[i]->connect (consumer_admin.in ());
- supplier[i]->connect (supplier_admin.in () ACE_ENV_ARG_PARAMETER);
+ supplier[i]->connect (supplier_admin.in ());
}
// ****************************************************************
@@ -146,14 +141,14 @@ run_test (PortableServer::POA_ptr poa,
for (i = 0; i != n; ++i)
{
- deactivate_servant (supplier[i] ACE_ENV_ARG_PARAMETER);
+ deactivate_servant (supplier[i]);
delete supplier[i];
- deactivate_servant (consumer[i] ACE_ENV_ARG_PARAMETER);
+ deactivate_servant (consumer[i]);
delete consumer[i];
}
delete[] supplier;
delete[] consumer;
- deactivate_servant (&ec_impl ACE_ENV_ARG_PARAMETER);
+ deactivate_servant (&ec_impl);
}