summaryrefslogtreecommitdiff
path: root/TAO/tests/POA/Etherealization
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/POA/Etherealization
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/POA/Etherealization')
-rw-r--r--TAO/tests/POA/Etherealization/Etherealization.cpp78
1 files changed, 27 insertions, 51 deletions
diff --git a/TAO/tests/POA/Etherealization/Etherealization.cpp b/TAO/tests/POA/Etherealization/Etherealization.cpp
index 835dfbc8b43..fdb86bda753 100644
--- a/TAO/tests/POA/Etherealization/Etherealization.cpp
+++ b/TAO/tests/POA/Etherealization/Etherealization.cpp
@@ -24,7 +24,7 @@
class test_i : public POA_test
{
public:
- void method (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
+ void method ( /**/)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
@@ -54,8 +54,7 @@ class Servant_Activator : public PortableServer::ServantActivator
{
public:
PortableServer::Servant incarnate (const PortableServer::ObjectId &oid,
- PortableServer::POA_ptr poa
- ACE_ENV_ARG_DECL)
+ PortableServer::POA_ptr poa)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::ForwardRequest));
@@ -63,15 +62,13 @@ public:
PortableServer::POA_ptr adapter,
PortableServer::Servant servant,
CORBA::Boolean cleanup_in_progress,
- CORBA::Boolean remaining_activations
- ACE_ENV_ARG_DECL)
+ CORBA::Boolean remaining_activations)
ACE_THROW_SPEC ((CORBA::SystemException));
};
PortableServer::Servant
Servant_Activator::incarnate (const PortableServer::ObjectId &id,
- PortableServer::POA_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+ PortableServer::POA_ptr)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::ForwardRequest))
{
@@ -95,8 +92,7 @@ Servant_Activator::etherealize (const PortableServer::ObjectId &id,
PortableServer::POA_ptr ,
PortableServer::Servant servant,
CORBA::Boolean,
- CORBA::Boolean
- ACE_ENV_ARG_DECL)
+ CORBA::Boolean)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CORBA::String_var object_name =
@@ -118,25 +114,21 @@ Servant_Activator::etherealize (const PortableServer::ObjectId &id,
int
main (int argc, char **argv)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
// Initialize the ORB first.
CORBA::ORB_var orb = CORBA::ORB_init (argc,
argv,
- 0
- ACE_ENV_ARG_PARAMETER);
+ 0);
// Obtain the RootPOA.
CORBA::Object_var object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
// Get the POA_var object from Object_var.
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (object.in ());
// Get the POAManager of the RootPOA.
PortableServer::POAManager_var poa_manager =
@@ -147,24 +139,20 @@ main (int argc, char **argv)
// ID Assignment Policy
policies[0] =
- root_poa->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_id_assignment_policy (PortableServer::USER_ID);
// Lifespan Policy
policies[1] =
- root_poa->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_lifespan_policy (PortableServer::PERSISTENT);
// Request Processing Policy
policies[2] =
- root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER);
PortableServer::POA_var child_poa =
root_poa->create_POA ("child",
poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
poa_manager->activate ();
@@ -173,8 +161,7 @@ main (int argc, char **argv)
new Servant_Activator;
// Set servant_activator as the servant_manager of child POA.
- child_poa->set_servant_manager (servant_manager.in ()
- ACE_ENV_ARG_PARAMETER);
+ child_poa->set_servant_manager (servant_manager.in ());
{
// Create a reference with user created ID in child POA which
@@ -184,17 +171,14 @@ main (int argc, char **argv)
object =
child_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
test_var test =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
+ test::_narrow (object.in ());
test->method ();
- child_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ child_poa->deactivate_object (id.in ());
}
{
@@ -205,17 +189,14 @@ main (int argc, char **argv)
object =
child_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
test_var test =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
+ test::_narrow (object.in ());
test->method ();
- child_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ child_poa->deactivate_object (id.in ());
}
{
@@ -226,11 +207,9 @@ main (int argc, char **argv)
object =
child_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
- child_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ child_poa->deactivate_object (id.in ());
}
{
@@ -241,25 +220,22 @@ main (int argc, char **argv)
object =
child_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
PortableServer::ObjectId_var oid =
- child_poa->reference_to_id (object.in () ACE_ENV_ARG_PARAMETER);
+ child_poa->reference_to_id (object.in ());
- child_poa->deactivate_object (oid.in ()
- ACE_ENV_ARG_PARAMETER);
+ child_poa->deactivate_object (oid.in ());
}
ACE_DEBUG ((LM_DEBUG,
"\nEnd of main()\n\n"));
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
+ ex._tao_print_exception ("Exception caught");
return -1;
}
- ACE_ENDTRY;
return 0;
}