summaryrefslogtreecommitdiff
path: root/TAO/tests/POA
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
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')
-rw-r--r--TAO/tests/POA/Bug_2511_Regression/server.cpp59
-rw-r--r--TAO/tests/POA/Current/Current.cpp23
-rw-r--r--TAO/tests/POA/Deactivate_Object/server.cpp25
-rw-r--r--TAO/tests/POA/Default_Servant/Default_Servant.cpp78
-rw-r--r--TAO/tests/POA/EndpointPolicy/Hello.cpp2
-rw-r--r--TAO/tests/POA/EndpointPolicy/client.cpp22
-rw-r--r--TAO/tests/POA/Etherealization/Etherealization.cpp78
-rw-r--r--TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp90
-rw-r--r--TAO/tests/POA/Identity/Identity.cpp348
-rw-r--r--TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp78
-rw-r--r--TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp72
-rw-r--r--TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp42
-rw-r--r--TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp48
-rw-r--r--TAO/tests/POA/POAManagerFactory/POAManagerFactory.cpp37
-rw-r--r--TAO/tests/POA/POA_Destruction/POA_Destruction.cpp20
-rw-r--r--TAO/tests/POA/Persistent_ID/client.cpp17
-rw-r--r--TAO/tests/POA/Persistent_ID/server.cpp46
-rw-r--r--TAO/tests/POA/Policies/Policies.cpp80
-rw-r--r--TAO/tests/POA/Reference_Counting/test.cpp26
-rw-r--r--TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp35
-rw-r--r--TAO/tests/POA/wait_for_completion/wait_for_completion.cpp42
21 files changed, 453 insertions, 815 deletions
diff --git a/TAO/tests/POA/Bug_2511_Regression/server.cpp b/TAO/tests/POA/Bug_2511_Regression/server.cpp
index 7fffa5a0c1b..4cda3f582df 100644
--- a/TAO/tests/POA/Bug_2511_Regression/server.cpp
+++ b/TAO/tests/POA/Bug_2511_Regression/server.cpp
@@ -80,8 +80,7 @@ public:
::PortableServer::Servant preinvoke (const PortableServer::ObjectId &,
PortableServer::POA_ptr,
const char *,
- PortableServer::ServantLocator::Cookie &
- ACE_ENV_ARG_DECL)
+ PortableServer::ServantLocator::Cookie &)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::ForwardRequest));
@@ -89,8 +88,7 @@ public:
PortableServer::POA_ptr,
const char *,
PortableServer::ServantLocator::Cookie,
- PortableServer::Servant
- ACE_ENV_ARG_DECL)
+ PortableServer::Servant)
ACE_THROW_SPEC ((CORBA::SystemException));
test_i servant_;
@@ -105,8 +103,7 @@ Servant_Locator::Servant_Locator (PortableServer::POA_ptr poa)
Servant_Locator::preinvoke (const PortableServer::ObjectId &oid,
PortableServer::POA_ptr,
const char *op,
- PortableServer::ServantLocator::Cookie &
- ACE_ENV_ARG_DECL_NOT_USED)
+ PortableServer::ServantLocator::Cookie &)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::ForwardRequest))
{
@@ -139,8 +136,7 @@ Servant_Locator::postinvoke (const PortableServer::ObjectId &oid,
PortableServer::POA_ptr,
const char *op,
PortableServer::ServantLocator::Cookie,
- PortableServer::Servant
- ACE_ENV_ARG_DECL_NOT_USED)
+ PortableServer::Servant)
ACE_THROW_SPEC ((CORBA::SystemException))
{
++postCount;
@@ -164,21 +160,18 @@ main (int argc, char **argv)
{
int retval = 0;
- ACE_TRY_NEW_ENV
+ try
{
CORBA::ORB_var orb =
CORBA::ORB_init (argc,
argv,
- 0
- ACE_ENV_ARG_PARAMETER);
+ 0);
CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
PortableServer::POAManager_var poa_manager =
root_poa->the_POAManager ();
@@ -190,67 +183,58 @@ main (int argc, char **argv)
policies.length (current_length + 1);
policies[current_length++] =
- root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER);
policies.length (current_length + 1);
policies[current_length++] =
- root_poa->create_servant_retention_policy (PortableServer::NON_RETAIN
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_servant_retention_policy (PortableServer::NON_RETAIN);
policies.length (current_length + 1);
policies[current_length++] =
- root_poa->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_id_assignment_policy (PortableServer::USER_ID);
PortableServer::POA_var child_poa =
root_poa->create_POA ("child",
poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
Servant_Locator* servant_locator = new Servant_Locator(child_poa.in ()) ;
- child_poa->set_servant_manager (servant_locator
- ACE_ENV_ARG_PARAMETER);
+ child_poa->set_servant_manager (servant_locator);
PortableServer::ObjectId_var objectID =
PortableServer::string_to_ObjectId ("object");
CORBA::Object_var objectREF =
child_poa->create_reference_with_id (objectID.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
test_var testObject =
- test::_narrow (objectREF.in ()
- ACE_ENV_ARG_PARAMETER);
+ test::_narrow (objectREF.in ());
testObject->normal();
bool caught = false;
- ACE_TRY
+ try
{
testObject->exceptional();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
ACE_DEBUG ((LM_DEBUG, "exceptional() yielded exception\n"));
caught = true;
}
- ACE_ENDTRY;
if (!caught) ++errorCount;
caught = false;
- ACE_TRY
+ try
{
testObject->notexisting();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
ACE_DEBUG ((LM_DEBUG, "notexisting() yielded exception\n"));
caught = true;
}
- ACE_ENDTRY;
if (!caught) ++errorCount;
if (!errorCount)
@@ -263,12 +247,11 @@ main (int argc, char **argv)
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
+ ex._tao_print_exception ("Exception caught");
retval = -1;
}
- ACE_ENDTRY;
return retval;
}
diff --git a/TAO/tests/POA/Current/Current.cpp b/TAO/tests/POA/Current/Current.cpp
index 75a3fccd76d..a81a636773a 100644
--- a/TAO/tests/POA/Current/Current.cpp
+++ b/TAO/tests/POA/Current/Current.cpp
@@ -25,46 +25,39 @@
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);
CORBA::Object_var object;
object =
- orb->resolve_initial_references ("POACurrent"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("POACurrent");
PortableServer::Current_var current =
- PortableServer::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::Current::_narrow (object.in ());
object =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (object.in ());
ACE_DEBUG ((LM_DEBUG,
"%s successful\n",
argv[0]));
}
- 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;
}
diff --git a/TAO/tests/POA/Deactivate_Object/server.cpp b/TAO/tests/POA/Deactivate_Object/server.cpp
index c601d1dfb1f..9999f8b1483 100644
--- a/TAO/tests/POA/Deactivate_Object/server.cpp
+++ b/TAO/tests/POA/Deactivate_Object/server.cpp
@@ -10,16 +10,16 @@ ACE_RCSID (Hello,
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,
@@ -38,29 +38,26 @@ main (int argc, char *argv[])
poa_manager->activate ();
- PortableServer::ObjectId_var obj_id = root_poa->activate_object (hello_impl ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var obj_id = root_poa->activate_object (hello_impl);
- CORBA::Object_var obj_var = root_poa->id_to_reference (obj_id.in () ACE_ENV_ARG_PARAMETER);
+ CORBA::Object_var obj_var = root_poa->id_to_reference (obj_id.in ());
- PortableServer::ObjectId_var new_obj_id = root_poa->reference_to_id (obj_var.in () ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var new_obj_id = root_poa->reference_to_id (obj_var.in ());
// Invoke reference_to_servant(). Should retrieve servant.
PortableServer::ServantBase_var servant =
- root_poa->reference_to_servant (obj_var.in ()
- ACE_ENV_ARG_PARAMETER);
+ root_poa->reference_to_servant (obj_var.in ());
// Assert correctness.
ACE_ASSERT (hello_impl == servant.in());
- root_poa->deactivate_object (new_obj_id.in () ACE_ENV_ARG_PARAMETER);
+ root_poa->deactivate_object (new_obj_id.in ());
}
- 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;
}
diff --git a/TAO/tests/POA/Default_Servant/Default_Servant.cpp b/TAO/tests/POA/Default_Servant/Default_Servant.cpp
index 4e858447ae1..81ae916d22b 100644
--- a/TAO/tests/POA/Default_Servant/Default_Servant.cpp
+++ b/TAO/tests/POA/Default_Servant/Default_Servant.cpp
@@ -29,7 +29,7 @@ void
test_get_servant_manager (PortableServer::POA_ptr poa)
{
bool succeed = false;
- ACE_TRY_NEW_ENV
+ try
{
// Getting the servant manager should give a wrong policy exception
// exception
@@ -38,14 +38,13 @@ test_get_servant_manager (PortableServer::POA_ptr poa)
ACE_UNUSED_ARG (servant_manager);
}
- ACE_CATCH (PortableServer::POA::WrongPolicy, ex)
+ catch (const PortableServer::POA::WrongPolicy& )
{
succeed = true;
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
}
- ACE_ENDTRY;
if (!succeed)
{
@@ -58,20 +57,19 @@ void
test_set_servant_manager (PortableServer::POA_ptr poa)
{
bool succeed = false;
- ACE_TRY_NEW_ENV
+ try
{
// Setting the servant manager should give a wrong policy exception
// exception
- poa->set_servant_manager (PortableServer::ServantManager::_nil() ACE_ENV_ARG_PARAMETER);
+ poa->set_servant_manager (PortableServer::ServantManager::_nil());
}
- ACE_CATCH (PortableServer::POA::WrongPolicy, ex)
+ catch (const PortableServer::POA::WrongPolicy& )
{
succeed = true;
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
}
- ACE_ENDTRY;
if (!succeed)
{
@@ -84,7 +82,7 @@ void
test_get_servant_with_no_set (PortableServer::POA_ptr poa)
{
bool succeed = false;
- ACE_TRY_NEW_ENV
+ try
{
// Getting the default servant without one set whould give a NoServant
// exception
@@ -93,14 +91,13 @@ test_get_servant_with_no_set (PortableServer::POA_ptr poa)
ACE_UNUSED_ARG (servant);
}
- ACE_CATCH (PortableServer::POA::NoServant, ex)
+ catch (const PortableServer::POA::NoServant& )
{
succeed = true;
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
}
- ACE_ENDTRY;
if (!succeed)
{
@@ -110,24 +107,23 @@ test_get_servant_with_no_set (PortableServer::POA_ptr poa)
}
void
-test_reference_to_servant_active_object(PortableServer::POA_ptr root_poa
- ACE_ENV_ARG_DECL)
+test_reference_to_servant_active_object(PortableServer::POA_ptr root_poa)
{
test_i test;
CORBA::ULong expected_refcount = 1;
PortableServer::ObjectId* id =
- root_poa->activate_object (&test ACE_ENV_ARG_PARAMETER);
+ root_poa->activate_object (&test);
expected_refcount++;
CORBA::Object_var object =
- root_poa->id_to_reference (*id ACE_ENV_ARG_PARAMETER);
+ root_poa->id_to_reference (*id);
PortableServer::ServantBase_var servant =
- root_poa->reference_to_servant (object.in () ACE_ENV_ARG_PARAMETER);
+ root_poa->reference_to_servant (object.in ());
expected_refcount++;
- root_poa->deactivate_object (*id ACE_ENV_ARG_PARAMETER);
+ root_poa->deactivate_object (*id);
expected_refcount--;
CORBA::ULong refcount =
@@ -142,25 +138,21 @@ test_reference_to_servant_active_object(PortableServer::POA_ptr root_poa
int
main (int argc, char **argv)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
// Initialize the ORB.
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");
// Narrow to POA.
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 =
@@ -172,26 +164,22 @@ main (int argc, char **argv)
// Request Processing Policy.
policies[0] =
- root_poa->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT);
// Id Uniqueness Policy.
policies[1] =
- root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID);
// Servant Retention Policy.
policies[2] =
- root_poa->create_servant_retention_policy (PortableServer::NON_RETAIN
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_servant_retention_policy (PortableServer::NON_RETAIN);
// Create POA to host default servant.
ACE_CString name = "Default Servant";
PortableServer::POA_var default_servant_poa =
root_poa->create_POA (name.c_str (),
poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
// Destroy policies.
for (CORBA::ULong i = 0;
@@ -205,8 +193,7 @@ main (int argc, char **argv)
// Activate POA manager.
poa_manager->activate ();
- test_reference_to_servant_active_object(root_poa.in ()
- ACE_ENV_ARG_PARAMETER);
+ test_reference_to_servant_active_object(root_poa.in ());
// Test servant.
test_i test;
@@ -219,8 +206,7 @@ main (int argc, char **argv)
(void) test_set_servant_manager (default_servant_poa.in());
// Register default servant.
- default_servant_poa->set_servant (&test
- ACE_ENV_ARG_PARAMETER);
+ default_servant_poa->set_servant (&test);
expected_refcount++;
// Create dummy id.
@@ -229,13 +215,11 @@ main (int argc, char **argv)
// Create dummy object.
object =
- default_servant_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ default_servant_poa->create_reference ("IDL:test:1.0");
// Invoke id_to_servant(). Should retrieve default servant.
PortableServer::ServantBase_var servant =
- default_servant_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ default_servant_poa->id_to_servant (id.in ());
expected_refcount++;
// Assert correctness.
@@ -243,8 +227,7 @@ main (int argc, char **argv)
// Invoke reference_to_servant(). Should retrieve default servant.
servant =
- default_servant_poa->reference_to_servant (object.in ()
- ACE_ENV_ARG_PARAMETER);
+ default_servant_poa->reference_to_servant (object.in ());
expected_refcount++;
// Assert correctness.
@@ -264,12 +247,11 @@ main (int argc, char **argv)
// Destroy the ORB.
orb->destroy ();
}
- 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;
}
diff --git a/TAO/tests/POA/EndpointPolicy/Hello.cpp b/TAO/tests/POA/EndpointPolicy/Hello.cpp
index 65c22a9f8ed..3bb0a772b76 100644
--- a/TAO/tests/POA/EndpointPolicy/Hello.cpp
+++ b/TAO/tests/POA/EndpointPolicy/Hello.cpp
@@ -21,5 +21,5 @@ void
Hello::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+ this->orb_->shutdown (0);
}
diff --git a/TAO/tests/POA/EndpointPolicy/client.cpp b/TAO/tests/POA/EndpointPolicy/client.cpp
index c2d1c7593ce..2d0cf940897 100644
--- a/TAO/tests/POA/EndpointPolicy/client.cpp
+++ b/TAO/tests/POA/EndpointPolicy/client.cpp
@@ -44,29 +44,27 @@ main (int argc, char *argv[])
CORBA::ORB_var orb;
CORBA::Object_var tmp;
- ACE_TRY_NEW_ENV
+ try
{
- orb = CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
+ orb = CORBA::ORB_init (argc, argv, "");
if (parse_args (argc, argv) != 0)
return 1;
- tmp = orb->string_to_object(ior ACE_ENV_ARG_PARAMETER);
+ tmp = orb->string_to_object(ior);
}
- 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;
- ACE_TRY_NEW_ENV
+ try
{
ACE_DEBUG ((LM_DEBUG,"client: Invocation expecting to %s\n",
(bad_ior ? "fail" : "work")));
Test::Hello_var hello =
- Test::Hello::_narrow(tmp.in () ACE_ENV_ARG_PARAMETER);
+ Test::Hello::_narrow(tmp.in ());
if (CORBA::is_nil (hello.in ()))
{
@@ -89,17 +87,15 @@ main (int argc, char *argv[])
hello->shutdown ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
if (!bad_ior)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "client: Exception caught:");
+ ex._tao_print_exception ("client: Exception caught:");
return 1;
}
ACE_DEBUG ((LM_DEBUG, "client: success!\n"));
}
- ACE_ENDTRY;
orb->destroy ();
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;
}
diff --git a/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp b/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp
index b92532c9614..1bdba102e50 100644
--- a/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp
+++ b/TAO/tests/POA/Excessive_Object_Deactivations/Excessive_Object_Deactivations.cpp
@@ -35,7 +35,7 @@ public:
};
PortableServer::POA_ptr
-test_i::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED /*ACE_ENV_SINGLE_ARG_PARAMETER*/)
+test_i::_default_POA ( /**/)
{
return PortableServer::POA::_duplicate (this->poa_.in ());
}
@@ -44,28 +44,26 @@ void
test_i::deactivate_self (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->poa_->deactivate_object (this->id_
- ACE_ENV_ARG_PARAMETER);
+ this->poa_->deactivate_object (this->id_);
// Exception flag
int expected_exception_raised = 0;
- ACE_TRY
+ try
{
- this->poa_->deactivate_object (this->id_
- ACE_ENV_ARG_PARAMETER);
+ this->poa_->deactivate_object (this->id_);
}
- ACE_CATCH (PortableServer::POA::ObjectNotActive, ex)
+ catch (const PortableServer::POA::ObjectNotActive& )
{
// This is the correct exception! Ignore
expected_exception_raised = 1;
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught of incorrect type");
+ ex._tao_print_exception (
+ "Exception caught of incorrect type");
ACE_ASSERT (0);
}
- ACE_ENDTRY;
// Make sure an exception was raised and it was of the correct type.
ACE_ASSERT (expected_exception_raised);
@@ -75,8 +73,7 @@ test_i::deactivate_self (void)
void
test_object_deactivation (PortableServer::POA_ptr poa,
- const PortableServer::ObjectId &id
- ACE_ENV_ARG_DECL)
+ const PortableServer::ObjectId &id)
{
test_i servant;
int expected_exception_raised = 0;
@@ -84,23 +81,21 @@ test_object_deactivation (PortableServer::POA_ptr poa,
PortableServer::ObjectId_var invalid_id =
PortableServer::string_to_ObjectId ("invalid id");
- ACE_TRY_EX (invalid_id)
+ try
{
- poa->deactivate_object (invalid_id.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (invalid_id);
+ poa->deactivate_object (invalid_id.in ());
}
- ACE_CATCH (PortableServer::POA::ObjectNotActive, ex)
+ catch (const PortableServer::POA::ObjectNotActive& )
{
// This is the correct exception! Ignore
expected_exception_raised = 1;
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught of incorrect type");
+ ex._tao_print_exception (
+ "Exception caught of incorrect type");
ACE_ASSERT (0);
}
- ACE_ENDTRY;
// Make sure an exception was raised and it was of the correct
// type.
@@ -109,40 +104,35 @@ test_object_deactivation (PortableServer::POA_ptr poa,
poa->activate_object_with_id (id,
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
- poa->deactivate_object (id
- ACE_ENV_ARG_PARAMETER);
+ poa->deactivate_object (id);
// Reset flag
expected_exception_raised = 0;
- ACE_TRY_EX (double_deactivate)
+ try
{
- poa->deactivate_object (id
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (double_deactivate);
+ poa->deactivate_object (id);
}
- ACE_CATCH (PortableServer::POA::ObjectNotActive, ex)
+ catch (const PortableServer::POA::ObjectNotActive& )
{
// This is the correct exception! Ignore
expected_exception_raised = 1;
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught of incorrect type");
+ ex._tao_print_exception (
+ "Exception caught of incorrect type");
ACE_ASSERT (0);
}
- ACE_ENDTRY;
// Make sure an exception was raised and it was of the correct
// type.
ACE_ASSERT (expected_exception_raised);
poa->activate_object_with_id (id,
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
servant.poa_ =
PortableServer::POA::_duplicate (poa);
@@ -162,25 +152,21 @@ test_object_deactivation (PortableServer::POA_ptr poa,
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 obj =
- 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 (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
// Get the POAManager of the RootPOA.
PortableServer::POAManager_var poa_manager =
@@ -190,35 +176,29 @@ main (int argc, char **argv)
PortableServer::POA_var child_poa =
root_poa->create_POA ("child",
poa_manager.in (),
- empty_policies
- ACE_ENV_ARG_PARAMETER);
+ empty_policies);
poa_manager->activate ();
obj =
- root_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_reference ("IDL:test:1.0");
PortableServer::ObjectId_var id =
- root_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ root_poa->reference_to_id (obj.in ());
test_object_deactivation (root_poa.in (),
- id.in ()
- ACE_ENV_ARG_PARAMETER);
+ id.in ());
id = PortableServer::string_to_ObjectId ("good id");
test_object_deactivation (child_poa.in (),
- id.in ()
- ACE_ENV_ARG_PARAMETER);
+ id.in ());
}
- 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;
}
diff --git a/TAO/tests/POA/Identity/Identity.cpp b/TAO/tests/POA/Identity/Identity.cpp
index 28a88c7a4bb..1a2065754ef 100644
--- a/TAO/tests/POA/Identity/Identity.cpp
+++ b/TAO/tests/POA/Identity/Identity.cpp
@@ -46,64 +46,53 @@ create_poas (PortableServer::POA_ptr root_poa,
PortableServer::POA_out first_poa,
PortableServer::POA_out second_poa,
PortableServer::POA_out third_poa,
- PortableServer::POA_out forth_poa
- ACE_ENV_ARG_DECL)
+ PortableServer::POA_out forth_poa)
{
// Policies for the new POAs
CORBA::PolicyList policies (3);
policies.length (3);
- policies[0] = root_poa->create_lifespan_policy (lifespan_policy
- ACE_ENV_ARG_PARAMETER);
+ policies[0] = root_poa->create_lifespan_policy (lifespan_policy);
- policies[1] = root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID
- ACE_ENV_ARG_PARAMETER);
+ policies[1] = root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID);
- policies[2] = root_poa->create_id_assignment_policy (PortableServer::SYSTEM_ID
- ACE_ENV_ARG_PARAMETER);
+ policies[2] = root_poa->create_id_assignment_policy (PortableServer::SYSTEM_ID);
// Creation of the firstPOA
ACE_CString name = "firstPOA";
first_poa = root_poa->create_POA (name.c_str (),
PortableServer::POAManager::_nil (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
policies[1]->destroy ();
- policies[1] = root_poa->create_id_uniqueness_policy (PortableServer::UNIQUE_ID
- ACE_ENV_ARG_PARAMETER);
+ policies[1] = root_poa->create_id_uniqueness_policy (PortableServer::UNIQUE_ID);
// Creation of the secondPOA
name = "secondPOA";
second_poa = root_poa->create_POA (name.c_str (),
PortableServer::POAManager::_nil (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
policies[2]->destroy ();
- policies[2] = root_poa->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
+ policies[2] = root_poa->create_id_assignment_policy (PortableServer::USER_ID);
// Creation of the thirdPOA
name = "thirdPOA";
third_poa = root_poa->create_POA (name.c_str (),
PortableServer::POAManager::_nil (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
policies[1]->destroy ();
- policies[1] = root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID
- ACE_ENV_ARG_PARAMETER);
+ policies[1] = root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID);
// Creation of the forthPOA
name = "forthPOA";
forth_poa = root_poa->create_POA (name.c_str (),
PortableServer::POAManager::_nil (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
// Creation of the new POAs over, so destroy the policies
for (CORBA::ULong i = 0;
@@ -121,42 +110,33 @@ test_poas (CORBA::ORB_ptr orb,
PortableServer::POA_ptr second_poa,
PortableServer::POA_ptr third_poa,
PortableServer::POA_ptr forth_poa,
- int perform_deactivation_test
- ACE_ENV_ARG_DECL)
+ int perform_deactivation_test)
{
{
test_i servant (root_poa);
- CORBA::Object_var obj = root_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ CORBA::Object_var obj = root_poa->create_reference ("IDL:test:1.0");
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::String_var string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- PortableServer::ObjectId_var id = root_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id = root_poa->reference_to_id (obj.in ());
root_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
- obj = root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ obj = root_poa->id_to_reference (id.in ());
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
PortableServer::ServantBase_var servant_from_reference =
- root_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ root_poa->reference_to_servant (obj.in ());
PortableServer::ServantBase_var servant_from_id =
- root_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ root_poa->id_to_servant (id.in ());
if (servant_from_reference.in () != servant_from_id.in ()
|| servant_from_reference.in () != &servant)
@@ -166,105 +146,83 @@ test_poas (CORBA::ORB_ptr orb,
"servant_from_id and &servant\n"));
}
- obj = root_poa->servant_to_reference (&servant
- ACE_ENV_ARG_PARAMETER);
+ obj = root_poa->servant_to_reference (&servant);
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
obj = servant._this ();
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- PortableServer::ObjectId_var id_from_servant = root_poa->servant_to_id (&servant
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id_from_servant = root_poa->servant_to_id (&servant);
ACE_ASSERT (id_from_servant.in () == id.in ());
- root_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ root_poa->deactivate_object (id.in ());
if (perform_deactivation_test)
{
root_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
- servant_from_reference = root_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ servant_from_reference = root_poa->reference_to_servant (obj.in ());
ACE_ASSERT (servant_from_reference.in () == &servant);
- root_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ root_poa->deactivate_object (id.in ());
}
}
{
test_i servant (root_poa);
- PortableServer::ObjectId_var id = root_poa->activate_object (&servant
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id = root_poa->activate_object (&servant);
- CORBA::Object_var obj = root_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::Object_var obj = root_poa->id_to_reference (id.in ());
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::String_var string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
obj = root_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- root_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ root_poa->deactivate_object (id.in ());
}
{
test_i servant (first_poa);
- CORBA::Object_var obj = first_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ CORBA::Object_var obj = first_poa->create_reference ("IDL:test:1.0");
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::String_var string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- PortableServer::ObjectId_var id = first_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id = first_poa->reference_to_id (obj.in ());
first_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
- obj = first_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ obj = first_poa->id_to_reference (id.in ());
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
PortableServer::ServantBase_var servant_from_reference =
- first_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ first_poa->reference_to_servant (obj.in ());
PortableServer::ServantBase_var servant_from_id =
- first_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ first_poa->id_to_servant (id.in ());
if (servant_from_reference .in () != servant_from_id.in ()
|| servant_from_reference.in () != &servant)
@@ -274,85 +232,67 @@ test_poas (CORBA::ORB_ptr orb,
"servant_from_id and &servant\n"));
}
- first_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ first_poa->deactivate_object (id.in ());
if (perform_deactivation_test)
{
first_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
- servant_from_reference = first_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ servant_from_reference = first_poa->reference_to_servant (obj.in ());
ACE_ASSERT (servant_from_reference.in () == &servant);
- first_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ first_poa->deactivate_object (id.in ());
}
}
{
test_i servant (first_poa);
- PortableServer::ObjectId_var id = first_poa->activate_object (&servant
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id = first_poa->activate_object (&servant);
- CORBA::Object_var obj = first_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::Object_var obj = first_poa->id_to_reference (id.in ());
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::String_var string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
obj = first_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- first_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ first_poa->deactivate_object (id.in ());
}
{
test_i servant (second_poa);
- CORBA::Object_var obj = second_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ CORBA::Object_var obj = second_poa->create_reference ("IDL:test:1.0");
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::String_var string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- PortableServer::ObjectId_var id = second_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id = second_poa->reference_to_id (obj.in ());
second_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
- obj = second_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ obj = second_poa->id_to_reference (id.in ());
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
PortableServer::ServantBase_var servant_from_reference =
- second_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ second_poa->reference_to_servant (obj.in ());
PortableServer::ServantBase_var servant_from_id =
- second_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ second_poa->id_to_servant (id.in ());
if (servant_from_reference.in () != servant_from_id.in ()
|| servant_from_reference.in () != &servant)
@@ -362,70 +302,56 @@ test_poas (CORBA::ORB_ptr orb,
"servant_from_id and &servant\n"));
}
- obj = second_poa->servant_to_reference (&servant
- ACE_ENV_ARG_PARAMETER);
+ obj = second_poa->servant_to_reference (&servant);
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
obj = servant._this ();
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- PortableServer::ObjectId_var id_from_servant = second_poa->servant_to_id (&servant
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id_from_servant = second_poa->servant_to_id (&servant);
ACE_ASSERT (id_from_servant.in () == id.in ());
- second_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ second_poa->deactivate_object (id.in ());
if (perform_deactivation_test)
{
second_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
- servant_from_reference = second_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ servant_from_reference = second_poa->reference_to_servant (obj.in ());
ACE_ASSERT (servant_from_reference.in () == &servant);
- second_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ second_poa->deactivate_object (id.in ());
}
}
{
test_i servant (second_poa);
- PortableServer::ObjectId_var id = second_poa->activate_object (&servant
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id = second_poa->activate_object (&servant);
- CORBA::Object_var obj = second_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::Object_var obj = second_poa->id_to_reference (id.in ());
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::String_var string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
obj = second_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- second_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ second_poa->deactivate_object (id.in ());
}
{
@@ -433,16 +359,13 @@ test_poas (CORBA::ORB_ptr orb,
PortableServer::ObjectId_var id = PortableServer::string_to_ObjectId ("hello");
CORBA::Object_var obj = third_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::String_var string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- PortableServer::ObjectId_var id_from_reference = third_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id_from_reference = third_poa->reference_to_id (obj.in ());
string = PortableServer::ObjectId_to_string (id_from_reference.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
@@ -450,24 +373,19 @@ test_poas (CORBA::ORB_ptr orb,
ACE_ASSERT (id_from_reference.in () == id.in ());
third_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
- obj = third_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ obj = third_poa->id_to_reference (id.in ());
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
PortableServer::ServantBase_var servant_from_reference =
- third_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ third_poa->reference_to_servant (obj.in ());
PortableServer::ServantBase_var servant_from_id =
- third_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ third_poa->id_to_servant (id.in ());
if (servant_from_reference.in () != servant_from_id.in ()
|| servant_from_reference.in () != &servant)
@@ -477,45 +395,37 @@ test_poas (CORBA::ORB_ptr orb,
"servant_from_id and &servant\n"));
}
- obj = third_poa->servant_to_reference (&servant
- ACE_ENV_ARG_PARAMETER);
+ obj = third_poa->servant_to_reference (&servant);
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
obj = servant._this ();
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- PortableServer::ObjectId_var id_from_servant = third_poa->servant_to_id (&servant
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id_from_servant = third_poa->servant_to_id (&servant);
string = PortableServer::ObjectId_to_string (id_from_servant.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
ACE_ASSERT (id_from_servant.in () == id.in ());
- third_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ third_poa->deactivate_object (id.in ());
if (perform_deactivation_test)
{
third_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
- servant_from_reference = third_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ servant_from_reference = third_poa->reference_to_servant (obj.in ());
ACE_ASSERT (servant_from_reference.in () == &servant);
- third_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ third_poa->deactivate_object (id.in ());
}
}
@@ -524,16 +434,13 @@ test_poas (CORBA::ORB_ptr orb,
PortableServer::ObjectId_var id = PortableServer::string_to_ObjectId ("hello");
CORBA::Object_var obj = forth_poa->create_reference_with_id (id.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
- CORBA::String_var string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::String_var string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
- PortableServer::ObjectId_var id_from_reference = forth_poa->reference_to_id (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id_from_reference = forth_poa->reference_to_id (obj.in ());
string = PortableServer::ObjectId_to_string (id_from_reference.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
@@ -541,24 +448,19 @@ test_poas (CORBA::ORB_ptr orb,
ACE_ASSERT (id_from_reference.in () == id.in ());
forth_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
- obj = forth_poa->id_to_reference (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ obj = forth_poa->id_to_reference (id.in ());
- string = orb->object_to_string (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ string = orb->object_to_string (obj.in ());
ACE_DEBUG ((LM_DEBUG, "%s\n", string.in ()));
PortableServer::ServantBase_var servant_from_reference =
- forth_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ forth_poa->reference_to_servant (obj.in ());
PortableServer::ServantBase_var servant_from_id =
- forth_poa->id_to_servant (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ forth_poa->id_to_servant (id.in ());
if (servant_from_reference.in () != servant_from_id.in ()
|| servant_from_reference.in () != &servant)
@@ -573,16 +475,13 @@ test_poas (CORBA::ORB_ptr orb,
if (perform_deactivation_test)
{
forth_poa->activate_object_with_id (id.in (),
- &servant
- ACE_ENV_ARG_PARAMETER);
+ &servant);
- servant_from_reference = forth_poa->reference_to_servant (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ servant_from_reference = forth_poa->reference_to_servant (obj.in ());
ACE_ASSERT (servant_from_reference.in () == &servant);
- forth_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ forth_poa->deactivate_object (id.in ());
}
}
}
@@ -590,20 +489,16 @@ test_poas (CORBA::ORB_ptr orb,
int
main (int argc, char **argv)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0
- ACE_ENV_ARG_PARAMETER);
+ CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0);
// Obtain the RootPOA.
CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
- PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA_var root_poa = PortableServer::POA::_narrow (obj.in ());
const TAO_Server_Strategy_Factory::Active_Object_Map_Creation_Parameters &creation_parameters
= TAO_ORB_Core_instance ()->server_factory ()->active_object_map_creation_parameters ();
@@ -620,8 +515,7 @@ main (int argc, char **argv)
first_poa.out (),
second_poa.out (),
third_poa.out (),
- forth_poa.out ()
- ACE_ENV_ARG_PARAMETER);
+ forth_poa.out ());
test_poas (orb.in (),
root_poa.in (),
@@ -629,32 +523,26 @@ main (int argc, char **argv)
second_poa.in (),
third_poa.in (),
forth_poa.in (),
- perform_deactivation_test
- ACE_ENV_ARG_PARAMETER);
+ perform_deactivation_test);
first_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
+ 1);
second_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
+ 1);
third_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
+ 1);
forth_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
+ 1);
create_poas (root_poa.in (),
PortableServer::PERSISTENT,
first_poa.out (),
second_poa.out (),
third_poa.out (),
- forth_poa.out ()
- ACE_ENV_ARG_PARAMETER);
+ forth_poa.out ());
test_poas (orb.in (),
root_poa.in (),
@@ -662,20 +550,16 @@ main (int argc, char **argv)
second_poa.in (),
third_poa.in (),
forth_poa.in (),
- perform_deactivation_test
- ACE_ENV_ARG_PARAMETER);
+ perform_deactivation_test);
root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
+ 1);
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception!");
+ ex._tao_print_exception ("Exception!");
return -1;
}
- ACE_ENDTRY;
return 0;
}
diff --git a/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp b/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp
index 885007113bf..0b21b5fbcd3 100644
--- a/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp
+++ b/TAO/tests/POA/MT_Servant_Locator/MT_Servant_Locator.cpp
@@ -90,8 +90,7 @@ public:
::PortableServer::Servant preinvoke (const PortableServer::ObjectId &,
PortableServer::POA_ptr,
const char *,
- PortableServer::ServantLocator::Cookie &
- ACE_ENV_ARG_DECL)
+ PortableServer::ServantLocator::Cookie &)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::ForwardRequest));
@@ -99,8 +98,7 @@ public:
PortableServer::POA_ptr,
const char *,
PortableServer::ServantLocator::Cookie,
- PortableServer::Servant
- ACE_ENV_ARG_DECL)
+ PortableServer::Servant)
ACE_THROW_SPEC ((CORBA::SystemException));
test_i servant_;
@@ -115,8 +113,7 @@ Servant_Locator::Servant_Locator (PortableServer::POA_ptr poa)
Servant_Locator::preinvoke (const PortableServer::ObjectId &oid,
PortableServer::POA_ptr,
const char *,
- PortableServer::ServantLocator::Cookie &
- ACE_ENV_ARG_DECL_NOT_USED)
+ PortableServer::ServantLocator::Cookie &)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::ForwardRequest))
{
@@ -150,8 +147,7 @@ Servant_Locator::postinvoke (const PortableServer::ObjectId &oid,
PortableServer::POA_ptr,
const char *,
PortableServer::ServantLocator::Cookie,
- PortableServer::Servant
- ACE_ENV_ARG_DECL_NOT_USED)
+ PortableServer::Servant)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CORBA::String_var name =
@@ -181,24 +177,22 @@ bool
set_nil_servant_manager (PortableServer::POA_ptr poa)
{
bool succeed = false;
- ACE_TRY_NEW_ENV
+ try
{
// Setting a nil servant manager should give an OBJ_Adapter exception with
// minor code 4
- poa->set_servant_manager (PortableServer::ServantManager::_nil()
- ACE_ENV_ARG_PARAMETER);
+ poa->set_servant_manager (PortableServer::ServantManager::_nil());
}
- ACE_CATCH (CORBA::OBJ_ADAPTER, ex)
+ catch (const CORBA::OBJ_ADAPTER& ex)
{
if ((ex.minor() & 0xFFFU) == 4)
{
succeed = true;
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
}
- ACE_ENDTRY;
if (!succeed)
{
@@ -213,26 +207,24 @@ bool
overwrite_servant_manager (PortableServer::POA_ptr poa)
{
bool succeed = false;
- ACE_TRY_NEW_ENV
+ try
{
Servant_Locator servant_locator (poa);
// Setting a servant manager after it is already set should give
// obj_adapter with minor code 6
- poa->set_servant_manager (&servant_locator
- ACE_ENV_ARG_PARAMETER);
+ poa->set_servant_manager (&servant_locator);
}
- ACE_CATCH (CORBA::BAD_INV_ORDER, ex)
+ catch (const CORBA::BAD_INV_ORDER& ex)
{
if ((ex.minor() & 0xFFFU) == 6)
{
succeed = true;
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
}
- ACE_ENDTRY;
if (!succeed)
{
@@ -248,21 +240,18 @@ main (int argc, char **argv)
{
int retval = 0;
- ACE_TRY_NEW_ENV
+ try
{
CORBA::ORB_var orb =
CORBA::ORB_init (argc,
argv,
- 0
- ACE_ENV_ARG_PARAMETER);
+ 0);
CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
PortableServer::POAManager_var poa_manager =
root_poa->the_POAManager ();
@@ -274,31 +263,26 @@ main (int argc, char **argv)
policies.length (current_length + 1);
policies[current_length++] =
- root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER);
policies.length (current_length + 1);
policies[current_length++] =
- root_poa->create_servant_retention_policy (PortableServer::NON_RETAIN
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_servant_retention_policy (PortableServer::NON_RETAIN);
policies.length (current_length + 1);
policies[current_length++] =
- root_poa->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_id_assignment_policy (PortableServer::USER_ID);
PortableServer::POA_var child_poa =
root_poa->create_POA ("child",
poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
if (!set_nil_servant_manager (child_poa.in()))
retval = -1;
Servant_Locator servant_locator (child_poa.in ());
- child_poa->set_servant_manager (&servant_locator
- ACE_ENV_ARG_PARAMETER);
+ child_poa->set_servant_manager (&servant_locator);
if (!overwrite_servant_manager (child_poa.in()))
retval = -1;
@@ -308,24 +292,20 @@ main (int argc, char **argv)
CORBA::Object_var first_object =
child_poa->create_reference_with_id (first_oid.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
test_var first_test =
- test::_narrow (first_object.in ()
- ACE_ENV_ARG_PARAMETER);
+ test::_narrow (first_object.in ());
PortableServer::ObjectId_var second_oid =
PortableServer::string_to_ObjectId ("second");
CORBA::Object_var second_object =
child_poa->create_reference_with_id (second_oid.in (),
- "IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ "IDL:test:1.0");
test_var second_test =
- test::_narrow (second_object.in ()
- ACE_ENV_ARG_PARAMETER);
+ test::_narrow (second_object.in ());
first_task.object (first_test.in ());
second_task.object (second_test.in ());
@@ -337,19 +317,17 @@ main (int argc, char **argv)
second_task.wait ();
root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
+ 1);
ACE_DEBUG ((LM_DEBUG,
"%s successful\n",
argv[0]));
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
+ ex._tao_print_exception ("Exception caught");
retval = -1;
}
- ACE_ENDTRY;
return retval;
}
diff --git a/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp b/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp
index ea08b02a671..4e484a4119f 100644
--- a/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp
+++ b/TAO/tests/POA/Nested_Non_Servant_Upcalls/Nested_Non_Servant_Upcalls.cpp
@@ -85,7 +85,7 @@ Object_Activator::Object_Activator (ACE_Thread_Manager &thread_manager,
int
Object_Activator::svc (void)
{
- ACE_TRY_NEW_ENV
+ try
{
test_i *servant =
new test_i (this->poa_.in ());
@@ -93,20 +93,18 @@ Object_Activator::svc (void)
PortableServer::ServantBase_var safe_servant (servant);
PortableServer::ObjectId_var id =
- this->poa_->activate_object (servant
- ACE_ENV_ARG_PARAMETER);
+ this->poa_->activate_object (servant);
this->object_activated_.signal ();
- this->poa_->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->poa_->deactivate_object (id.in ());
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught in activator thread");
+ ex._tao_print_exception (
+ "Exception caught in activator thread");
return -1;
}
- ACE_ENDTRY;
return 0;
}
@@ -121,8 +119,7 @@ public:
Servant_Activator (PortableServer::POA_ptr poa);
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));
@@ -130,8 +127,7 @@ 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::POA_var poa_;
@@ -147,8 +143,7 @@ Servant_Activator::Servant_Activator (PortableServer::POA_ptr poa)
PortableServer::Servant
Servant_Activator::incarnate (const PortableServer::ObjectId &,
- PortableServer::POA_ptr
- ACE_ENV_ARG_DECL)
+ PortableServer::POA_ptr)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableServer::ForwardRequest))
{
@@ -158,11 +153,9 @@ Servant_Activator::incarnate (const PortableServer::ObjectId &,
PortableServer::ServantBase_var safe_servant (servant);
this->id_ =
- this->poa_->activate_object (servant
- ACE_ENV_ARG_PARAMETER);
+ this->poa_->activate_object (servant);
- this->poa_->deactivate_object (this->id_.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->poa_->deactivate_object (this->id_.in ());
int result =
global_object_activator->activate ();
@@ -204,8 +197,7 @@ Servant_Activator::etherealize (const PortableServer::ObjectId &,
PortableServer::POA_ptr,
PortableServer::Servant servant,
CORBA::Boolean,
- CORBA::Boolean
- ACE_ENV_ARG_DECL)
+ CORBA::Boolean)
ACE_THROW_SPEC ((CORBA::SystemException))
{
servant->_remove_ref ();
@@ -214,21 +206,18 @@ Servant_Activator::etherealize (const PortableServer::ObjectId &,
int
main (int argc, char **argv)
{
- ACE_TRY_NEW_ENV
+ try
{
CORBA::ORB_var orb =
CORBA::ORB_init (argc,
argv,
- 0
- ACE_ENV_ARG_PARAMETER);
+ 0);
CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
PortableServer::POAManager_var poa_manager =
root_poa->the_POAManager ();
@@ -240,30 +229,24 @@ main (int argc, char **argv)
policies.length (current_length + 1);
policies[current_length++] =
- 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);
Servant_Activator servant_activator (child_poa.in ());
- child_poa->set_servant_manager (&servant_activator
- ACE_ENV_ARG_PARAMETER);
+ child_poa->set_servant_manager (&servant_activator);
CORBA::Object_var first_object =
- child_poa->create_reference ("IDL:test:1.0"
- ACE_ENV_ARG_PARAMETER);
+ child_poa->create_reference ("IDL:test:1.0");
test_var first_test =
- test::_narrow (first_object.in ()
- ACE_ENV_ARG_PARAMETER);
+ test::_narrow (first_object.in ());
PortableServer::ObjectId_var id =
- child_poa->reference_to_id (first_object.in ()
- ACE_ENV_ARG_PARAMETER);
+ child_poa->reference_to_id (first_object.in ());
ACE_Thread_Manager thread_manager;
@@ -275,22 +258,19 @@ main (int argc, char **argv)
first_test->method ();
- child_poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ child_poa->deactivate_object (id.in ());
// Wait for the Object_Activator thread to exit.
thread_manager.wait ();
root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
+ 1);
}
- 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;
}
diff --git a/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp b/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp
index 86d60cf1a65..ecac2227ab3 100644
--- a/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp
+++ b/TAO/tests/POA/Non_Servant_Upcalls/Non_Servant_Upcalls.cpp
@@ -49,47 +49,40 @@ test_i::~test_i (void)
if (this->other_)
{
- ACE_TRY_NEW_ENV
+ try
{
PortableServer::POA_var poa = this->_default_POA ();
- PortableServer::ObjectId_var id = poa->servant_to_id (this->other_
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id = poa->servant_to_id (this->other_);
ACE_DEBUG ((LM_DEBUG, "(%t) Deactivating other servant\n"));
- poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ poa->deactivate_object (id.in ());
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "test_i::~test_i");
+ ex._tao_print_exception ("test_i::~test_i");
}
- ACE_ENDTRY;
}
}
int
main (int argc, char **argv)
{
- ACE_TRY_NEW_ENV
+ 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 obj =
- 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 (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
// Get the POAManager of the RootPOA.
PortableServer::POAManager_var poa_manager =
@@ -101,32 +94,27 @@ main (int argc, char **argv)
test_i *servant2 = new test_i (servant1);
PortableServer::ObjectId_var id1 =
- root_poa->activate_object (servant1
- ACE_ENV_ARG_PARAMETER);
+ root_poa->activate_object (servant1);
// Give ownership to POA.
servant1->_remove_ref ();
PortableServer::ObjectId_var id2 =
- root_poa->activate_object (servant2
- ACE_ENV_ARG_PARAMETER);
+ root_poa->activate_object (servant2);
// Give ownership to POA.
servant2->_remove_ref ();
- root_poa->deactivate_object (id2.in ()
- ACE_ENV_ARG_PARAMETER);
+ root_poa->deactivate_object (id2.in ());
root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
+ 1);
}
- 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;
}
diff --git a/TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp b/TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp
index 60682e114db..98a931f25e0 100644
--- a/TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp
+++ b/TAO/tests/POA/Object_Reactivation/Object_Reactivation.cpp
@@ -74,14 +74,12 @@ test_i::deactivate_self (void)
{
PortableServer::POA_var poa = this->_default_POA ();
- PortableServer::ObjectId_var id = poa->servant_to_id (this
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var id = poa->servant_to_id (this);
if (debug)
ACE_DEBUG ((LM_DEBUG, "(%t) Deactivating servant\n"));
- poa->deactivate_object (id.in ()
- ACE_ENV_ARG_PARAMETER);
+ poa->deactivate_object (id.in ());
if (debug)
ACE_DEBUG ((LM_DEBUG, "(%t) Deactivation complete: signaling main thread and going to sleep\n"));
@@ -144,31 +142,27 @@ Activator::svc (void)
if (debug)
ACE_DEBUG ((LM_DEBUG, "(%t) Deactivation complete, trying to activate\n"));
- ACE_TRY_NEW_ENV
+ try
{
if (this->task_id_ == "first thread")
{
PortableServer::ObjectId_var id =
- this->poa_->activate_object (this->servant_
- ACE_ENV_ARG_PARAMETER);
+ this->poa_->activate_object (this->servant_);
}
else
{
this->poa_->activate_object_with_id (this->id_,
- this->servant_
- ACE_ENV_ARG_PARAMETER);
+ this->servant_);
}
if (debug)
ACE_DEBUG ((LM_DEBUG, "(%t) Activation complete\n"));
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Activator::svc");
+ ex._tao_print_exception ("Activator::svc");
return -1;
}
- ACE_ENDTRY;
return 0;
}
@@ -190,32 +184,28 @@ Deactivator::Deactivator (test_ptr t)
int
Deactivator::svc (void)
{
- ACE_TRY_NEW_ENV
+ try
{
this->test_->deactivate_self ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Deactivator::svc");
+ ex._tao_print_exception ("Deactivator::svc");
return -1;
}
- ACE_ENDTRY;
return 0;
}
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);
int parse_args_result =
parse_args (argc, argv);
@@ -225,13 +215,11 @@ main (int argc, char **argv)
// Obtain the RootPOA.
CORBA::Object_var obj =
- 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 (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
// Get the POAManager of the RootPOA.
PortableServer::POAManager_var poa_manager =
@@ -285,15 +273,13 @@ main (int argc, char **argv)
return result;
root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
+ 1);
}
- 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;
}
diff --git a/TAO/tests/POA/POAManagerFactory/POAManagerFactory.cpp b/TAO/tests/POA/POAManagerFactory/POAManagerFactory.cpp
index b1969e4d810..be4f89f1607 100644
--- a/TAO/tests/POA/POAManagerFactory/POAManagerFactory.cpp
+++ b/TAO/tests/POA/POAManagerFactory/POAManagerFactory.cpp
@@ -70,29 +70,25 @@ parse_args (int argc, char *argv[])
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,
- "POAManagerFactoryTest"
- ACE_ENV_ARG_PARAMETER);
+ "POAManagerFactoryTest");
if (parse_args (argc, argv) != 0)
return 1;
// Obtain the RootPOA.
CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
// Narrow to POA.
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
if (verbose)
ACE_DEBUG ((LM_DEBUG,
@@ -121,8 +117,7 @@ main (int argc, char **argv)
// Explicitly create a POAManager - "POAManager1" .
PortableServer::POAManager_var poa_manager_1
= poa_manager_factory->create_POAManager ("POAManager1",
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
VERIFY_CONDITION (!CORBA::is_nil(poa_manager_1.in()));
if (verbose)
@@ -137,19 +132,16 @@ main (int argc, char **argv)
ACE_TEXT("Prevent duplicated POAManagers: ")));
pretest = fail;
CORBA::Boolean got_expected_exception = false;
- ACE_TRY_EX (create)
+ try
{
PortableServer::POAManager_var poa_manager
= poa_manager_factory->create_POAManager ("POAManager1",
- policies
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK_EX (create);
+ policies);
}
- ACE_CATCH (PortableServer::POAManagerFactory::ManagerAlreadyExists, mae)
+ catch (const PortableServer::POAManagerFactory::ManagerAlreadyExists& )
{
got_expected_exception = true;
}
- ACE_ENDTRY;
VERIFY_CONDITION (got_expected_exception);
if (verbose)
@@ -169,8 +161,7 @@ main (int argc, char **argv)
PortableServer::POA_var child_poa =
root_poa->create_POA ("childPOA2",
PortableServer::POAManager::_nil (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
PortableServer::POAManager_var poa_manager_2
= child_poa->the_POAManager ();
@@ -246,7 +237,7 @@ main (int argc, char **argv)
pretest = fail;
PortableServer::POAManager_var manager
- = poa_manager_factory->find ("POAManager1" ACE_ENV_ARG_PARAMETER);
+ = poa_manager_factory->find ("POAManager1");
CORBA::String_var name = manager->get_id ();
@@ -267,8 +258,7 @@ main (int argc, char **argv)
PortableServer::POA_var child_poa =
root_poa->create_POA ("childPOA",
poa_manager_1.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
poa_manager_1->activate ();
@@ -277,14 +267,13 @@ main (int argc, char **argv)
if (verbose)
ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("passed\n")));
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
fail++;
if (verbose)
ACE_DEBUG ((LM_DEBUG,ACE_TEXT ("failed\n")));
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught");
+ ex._tao_print_exception ("Exception caught");
}
- ACE_ENDTRY;
ACE_DEBUG ((LM_DEBUG, ACE_TEXT("POAManagerFactory %s\n"),
(pretest == fail) ? ACE_TEXT ("succeeded") : ACE_TEXT ("failed")));
diff --git a/TAO/tests/POA/POA_Destruction/POA_Destruction.cpp b/TAO/tests/POA/POA_Destruction/POA_Destruction.cpp
index 831234c8537..899d8fae6ee 100644
--- a/TAO/tests/POA/POA_Destruction/POA_Destruction.cpp
+++ b/TAO/tests/POA/POA_Destruction/POA_Destruction.cpp
@@ -35,32 +35,27 @@ test_i::destroy_poa (void)
CORBA::Boolean etherealize_objects = 1;
CORBA::Boolean wait_for_completion = 0;
poa->destroy (etherealize_objects,
- wait_for_completion
- ACE_ENV_ARG_PARAMETER);
+ wait_for_completion);
}
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 obj =
- 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 (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
// Get the POAManager of the RootPOA.
PortableServer::POAManager_var poa_manager =
@@ -74,12 +69,11 @@ main (int argc, char **argv)
test_object->destroy_poa ();
}
- 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;
}
diff --git a/TAO/tests/POA/Persistent_ID/client.cpp b/TAO/tests/POA/Persistent_ID/client.cpp
index 0813be7b6b5..4b22ec2ca25 100644
--- a/TAO/tests/POA/Persistent_ID/client.cpp
+++ b/TAO/tests/POA/Persistent_ID/client.cpp
@@ -61,15 +61,13 @@ parse_args (int argc, char **argv)
int
main (int argc, char **argv)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
CORBA::ORB_var orb =
CORBA::ORB_init (argc,
argv,
- 0
- ACE_ENV_ARG_PARAMETER);
+ 0);
int parse_args_result =
parse_args (argc, argv);
@@ -77,12 +75,10 @@ main (int argc, char **argv)
return parse_args_result;
CORBA::Object_var object =
- orb->string_to_object (IOR
- ACE_ENV_ARG_PARAMETER);
+ orb->string_to_object (IOR);
test_var test1 =
- test::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
+ test::_narrow (object.in ());
test1->method ();
@@ -105,12 +101,11 @@ main (int argc, char **argv)
test1->shutdown ();
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Error!");
+ ex._tao_print_exception ("Error!");
return -1;
}
- ACE_ENDTRY;
return 0;
}
diff --git a/TAO/tests/POA/Persistent_ID/server.cpp b/TAO/tests/POA/Persistent_ID/server.cpp
index 6ee388c43f1..4a947ab13cc 100644
--- a/TAO/tests/POA/Persistent_ID/server.cpp
+++ b/TAO/tests/POA/Persistent_ID/server.cpp
@@ -64,12 +64,10 @@ test_i::method (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
CORBA::Object_var obj =
- this->orb_->resolve_initial_references ("POACurrent"
- ACE_ENV_ARG_PARAMETER);
+ this->orb_->resolve_initial_references ("POACurrent");
PortableServer::Current_var current =
- PortableServer::Current::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::Current::_narrow (obj.in ());
PortableServer::POA_var poa =
current->get_POA ();
@@ -86,8 +84,7 @@ void
test_i::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->orb_->shutdown (0
- ACE_ENV_ARG_PARAMETER);
+ this->orb_->shutdown (0);
}
PortableServer::POA_ptr
@@ -104,12 +101,10 @@ test_i::create_POA (void)
policies.length (2);
policies[0] =
- this->poa_->create_id_assignment_policy (PortableServer::SYSTEM_ID
- ACE_ENV_ARG_PARAMETER);
+ this->poa_->create_id_assignment_policy (PortableServer::SYSTEM_ID);
policies[1] =
- this->poa_->create_lifespan_policy (PortableServer::PERSISTENT
- ACE_ENV_ARG_PARAMETER);
+ this->poa_->create_lifespan_policy (PortableServer::PERSISTENT);
PortableServer::POAManager_var poa_manager =
this->poa_->the_POAManager ();
@@ -118,8 +113,7 @@ test_i::create_POA (void)
this->child_poa_ =
this->poa_->create_POA (name.c_str (),
poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
// Destroy the policies
for (CORBA::ULong i = 0;
@@ -138,14 +132,12 @@ test_i::create_POA (void)
if (this->oid_.ptr () == 0)
{
this->oid_ =
- this->child_poa_->activate_object (servant
- ACE_ENV_ARG_PARAMETER);
+ this->child_poa_->activate_object (servant);
}
else
{
this->child_poa_->activate_object_with_id (this->oid_.in (),
- servant
- ACE_ENV_ARG_PARAMETER);
+ servant);
}
test_var test =
@@ -158,8 +150,7 @@ void
test_i::destroy_POA (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- this->child_poa_->destroy (1, 0
- ACE_ENV_ARG_PARAMETER);
+ this->child_poa_->destroy (1, 0);
}
const char *ior_file = "ior";
@@ -221,27 +212,23 @@ write_ior_to_file (const char *ior)
int
main (int argc, char **argv)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
CORBA::ORB_var orb =
CORBA::ORB_init (argc,
argv,
- 0
- ACE_ENV_ARG_PARAMETER);
+ 0);
int result = parse_args (argc, argv);
if (result != 0)
return result;
CORBA::Object_var obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
PortableServer::POAManager_var poa_manager =
root_poa->the_POAManager ();
@@ -253,7 +240,7 @@ main (int argc, char **argv)
servant._this ();
CORBA::String_var ior =
- orb->object_to_string (test.in () ACE_ENV_ARG_PARAMETER);
+ orb->object_to_string (test.in ());
int write_result =
write_ior_to_file (ior.in ());
@@ -264,12 +251,11 @@ main (int argc, char **argv)
orb->run ();
}
- 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;
}
diff --git a/TAO/tests/POA/Policies/Policies.cpp b/TAO/tests/POA/Policies/Policies.cpp
index a1f067968ca..1aa17eabfcd 100644
--- a/TAO/tests/POA/Policies/Policies.cpp
+++ b/TAO/tests/POA/Policies/Policies.cpp
@@ -28,26 +28,22 @@
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 obj =
- orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
+ orb->resolve_initial_references ("RootPOA");
// Narrow to POA.
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
// Get the POAManager of the POA.
PortableServer::POAManager_var poa_manager =
@@ -59,20 +55,17 @@ main (int argc, char **argv)
{
PortableServer::ThreadPolicy_var policy1 =
- root_poa->create_thread_policy (PortableServer::ORB_CTRL_MODEL
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_thread_policy (PortableServer::ORB_CTRL_MODEL);
CORBA::Any policy_value;
policy_value <<= PortableServer::ORB_CTRL_MODEL;
CORBA::Policy_var policy =
orb->create_policy (PortableServer::THREAD_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
+ policy_value);
PortableServer::ThreadPolicy_var policy2 =
- PortableServer::ThreadPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ThreadPolicy::_narrow (policy.in ());
ACE_ASSERT (policy1->value () == policy2->value ());
}
@@ -81,60 +74,51 @@ main (int argc, char **argv)
{
PortableServer::LifespanPolicy_var policy1 =
- root_poa->create_lifespan_policy (PortableServer::TRANSIENT
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_lifespan_policy (PortableServer::TRANSIENT);
CORBA::Any policy_value;
policy_value <<= PortableServer::TRANSIENT;
CORBA::Policy_var policy =
orb->create_policy (PortableServer::LIFESPAN_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
+ policy_value);
PortableServer::LifespanPolicy_var policy2 =
- PortableServer::LifespanPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::LifespanPolicy::_narrow (policy.in ());
ACE_ASSERT (policy1->value () == policy2->value ());
}
{
PortableServer::IdUniquenessPolicy_var policy1 =
- root_poa->create_id_uniqueness_policy (PortableServer::UNIQUE_ID
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_id_uniqueness_policy (PortableServer::UNIQUE_ID);
CORBA::Any policy_value;
policy_value <<= PortableServer::UNIQUE_ID;
CORBA::Policy_var policy =
orb->create_policy (PortableServer::ID_UNIQUENESS_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
+ policy_value);
PortableServer::IdUniquenessPolicy_var policy2 =
- PortableServer::IdUniquenessPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::IdUniquenessPolicy::_narrow (policy.in ());
ACE_ASSERT (policy1->value () == policy2->value ());
}
{
PortableServer::IdAssignmentPolicy_var policy1 =
- root_poa->create_id_assignment_policy (PortableServer::USER_ID
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_id_assignment_policy (PortableServer::USER_ID);
CORBA::Any policy_value;
policy_value <<= PortableServer::USER_ID;
CORBA::Policy_var policy =
orb->create_policy (PortableServer::ID_ASSIGNMENT_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
+ policy_value);
PortableServer::IdAssignmentPolicy_var policy2 =
- PortableServer::IdAssignmentPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::IdAssignmentPolicy::_narrow (policy.in ());
ACE_ASSERT (policy1->value () == policy2->value ());
}
@@ -143,60 +127,51 @@ main (int argc, char **argv)
{
PortableServer::ImplicitActivationPolicy_var policy1 =
- root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION);
CORBA::Any policy_value;
policy_value <<= PortableServer::IMPLICIT_ACTIVATION;
CORBA::Policy_var policy =
orb->create_policy (PortableServer::IMPLICIT_ACTIVATION_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
+ policy_value);
PortableServer::ImplicitActivationPolicy_var policy2 =
- PortableServer::ImplicitActivationPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ImplicitActivationPolicy::_narrow (policy.in ());
ACE_ASSERT (policy1->value () == policy2->value ());
}
{
PortableServer::ServantRetentionPolicy_var policy1 =
- root_poa->create_servant_retention_policy (PortableServer::RETAIN
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_servant_retention_policy (PortableServer::RETAIN);
CORBA::Any policy_value;
policy_value <<= PortableServer::RETAIN;
CORBA::Policy_var policy =
orb->create_policy (PortableServer::SERVANT_RETENTION_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
+ policy_value);
PortableServer::ServantRetentionPolicy_var policy2 =
- PortableServer::ServantRetentionPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::ServantRetentionPolicy::_narrow (policy.in ());
ACE_ASSERT (policy1->value () == policy2->value ());
}
{
PortableServer::RequestProcessingPolicy_var policy1 =
- root_poa->create_request_processing_policy (PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_request_processing_policy (PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY);
CORBA::Any policy_value;
policy_value <<= PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY;
CORBA::Policy_var policy =
orb->create_policy (PortableServer::REQUEST_PROCESSING_POLICY_ID,
- policy_value
- ACE_ENV_ARG_PARAMETER);
+ policy_value);
PortableServer::RequestProcessingPolicy_var policy2 =
- PortableServer::RequestProcessingPolicy::_narrow (policy.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::RequestProcessingPolicy::_narrow (policy.in ());
ACE_ASSERT (policy1->value () == policy2->value ());
}
@@ -208,12 +183,11 @@ main (int argc, char **argv)
argv[0]));
}
- 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;
}
diff --git a/TAO/tests/POA/Reference_Counting/test.cpp b/TAO/tests/POA/Reference_Counting/test.cpp
index 37f8c315906..6f4b1e859ce 100644
--- a/TAO/tests/POA/Reference_Counting/test.cpp
+++ b/TAO/tests/POA/Reference_Counting/test.cpp
@@ -21,7 +21,6 @@ public:
}
virtual void moo (
- ACE_ENV_SINGLE_ARG_DECL_NOT_USED
)
ACE_THROW_SPEC ((
CORBA::SystemException
@@ -31,7 +30,7 @@ public:
};
CORBA::ULong
-getRefCount (PortableServer::ServantBase * sb ACE_ENV_ARG_DECL)
+getRefCount (PortableServer::ServantBase * sb)
{
return sb->_refcount_value ();
}
@@ -39,16 +38,16 @@ getRefCount (PortableServer::ServantBase * sb ACE_ENV_ARG_DECL)
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 poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (poa_object.in ());
if (CORBA::is_nil (poa.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -62,7 +61,7 @@ main (int argc, char * argv[])
ACE_DEBUG ((LM_DEBUG, "Before activation: %d\n", before_act));
- PortableServer::ObjectId_var oid = poa->activate_object (h ACE_ENV_ARG_PARAMETER);
+ PortableServer::ObjectId_var oid = poa->activate_object (h);
CORBA::ULong after_act = h->_refcount_value ();
@@ -83,7 +82,7 @@ main (int argc, char * argv[])
ACE_DEBUG ((LM_DEBUG, "Before id_to_servant: %d\n", refCountBeforeIdToServant));
- PortableServer::ServantBase_var srv = poa->id_to_servant (oid.in() ACE_ENV_ARG_PARAMETER);
+ PortableServer::ServantBase_var srv = poa->id_to_servant (oid.in());
CORBA::ULong refCountAfterIdToServant =
srv->_refcount_value ();;
@@ -105,7 +104,7 @@ main (int argc, char * argv[])
ACE_DEBUG ((LM_DEBUG, "Before deactivate_object: %d\n", before_deact));
- poa->deactivate_object (oid.in() ACE_ENV_ARG_PARAMETER);
+ poa->deactivate_object (oid.in());
/*
* Because id_to_servant did not increment the reference count, but
@@ -121,18 +120,15 @@ main (int argc, char * argv[])
h->_remove_ref ();
- orb->shutdown (1
- ACE_ENV_ARG_PARAMETER);
+ orb->shutdown (1);
orb->destroy ();
}
- 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;
}
diff --git a/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp b/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp
index c1478b9964a..7626b224f3c 100644
--- a/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp
+++ b/TAO/tests/POA/Single_Threaded_POA/Single_Threaded_POA.cpp
@@ -93,16 +93,15 @@ Worker::Worker (test_ptr t)
int
Worker::svc (void)
{
- ACE_TRY_NEW_ENV
+ try
{
this->test_->method ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught in thread");
+ ex._tao_print_exception ("Exception caught in thread");
return -1;
}
- ACE_ENDTRY;
return 0;
}
@@ -110,22 +109,19 @@ Worker::svc (void)
int
main (int argc, char **argv)
{
- ACE_TRY_NEW_ENV
+ 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 obj = orb->resolve_initial_references ("RootPOA"
- ACE_ENV_ARG_PARAMETER);
+ CORBA::Object_var obj = orb->resolve_initial_references ("RootPOA");
// Get the POA_var object from Object_var.
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
// Get the POAManager of the RootPOA.
PortableServer::POAManager_var poa_manager =
@@ -136,19 +132,16 @@ main (int argc, char **argv)
policies.length (2);
policies[0] =
- root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_implicit_activation_policy (PortableServer::IMPLICIT_ACTIVATION);
policies[1] =
- root_poa->create_thread_policy (PortableServer::SINGLE_THREAD_MODEL
- ACE_ENV_ARG_PARAMETER);
+ root_poa->create_thread_policy (PortableServer::SINGLE_THREAD_MODEL);
// Creation of the child POA.
PortableServer::POA_var child_poa =
root_poa->create_POA ("child",
poa_manager.in (),
- policies
- ACE_ENV_ARG_PARAMETER);
+ policies);
// Destroy the policies
for (CORBA::ULong i = 0;
@@ -182,15 +175,13 @@ main (int argc, char **argv)
ACE_UNUSED_ARG (result);
root_poa->destroy (1,
- 1
- ACE_ENV_ARG_PARAMETER);
+ 1);
}
- 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;
}
diff --git a/TAO/tests/POA/wait_for_completion/wait_for_completion.cpp b/TAO/tests/POA/wait_for_completion/wait_for_completion.cpp
index cc0249af4b4..b640b83b7c6 100644
--- a/TAO/tests/POA/wait_for_completion/wait_for_completion.cpp
+++ b/TAO/tests/POA/wait_for_completion/wait_for_completion.cpp
@@ -42,31 +42,26 @@ test_i::destroy_poa (void)
CORBA::Boolean etherealize_objects = 1;
CORBA::Boolean wait_for_completion = 1;
this->poa_->destroy (etherealize_objects,
- wait_for_completion
- ACE_ENV_ARG_PARAMETER);
+ wait_for_completion);
}
PortableServer::POA_ptr
init_orb (int argc,
char **argv,
- const char *orb_name
- ACE_ENV_ARG_DECL)
+ const char *orb_name)
{
// Initialize the ORB first.
CORBA::ORB_var orb = CORBA::ORB_init (argc,
argv,
- orb_name
- ACE_ENV_ARG_PARAMETER);
+ orb_name);
// Obtain the RootPOA.
CORBA::Object_var obj =
- 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 (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ PortableServer::POA::_narrow (obj.in ());
// Get the POAManager of the RootPOA.
PortableServer::POAManager_var poa_manager =
@@ -81,45 +76,41 @@ int
main (int argc,
char **argv)
{
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
PortableServer::POA_var first_poa =
init_orb (argc,
argv,
- "first ORB"
- ACE_ENV_ARG_PARAMETER);
+ "first ORB");
PortableServer::POA_var second_poa =
init_orb (argc,
argv,
- "second ORB"
- ACE_ENV_ARG_PARAMETER);
+ "second ORB");
test_i servant;
test_var test_object = servant._this ();
int expected_exception_raised = 0;
- ACE_TRY_EX (first_poa)
+ try
{
servant.test_poa (first_poa.in ());
test_object->destroy_poa ();
- ACE_TRY_CHECK_EX (first_poa);
}
- ACE_CATCH (CORBA::BAD_INV_ORDER, ex)
+ catch (const CORBA::BAD_INV_ORDER& )
{
// This is the correct exception! Ignore
expected_exception_raised = 1;
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Exception caught of incorrect type");
+ ex._tao_print_exception (
+ "Exception caught of incorrect type");
return -1;
}
- ACE_ENDTRY;
// Make sure an exception was raised and it was of the correct
// type.
@@ -132,14 +123,13 @@ main (int argc,
test_object->destroy_poa ();
- first_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
+ first_poa->destroy (1, 1);
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Unexpected exception caught");
+ ex._tao_print_exception ("Unexpected exception caught");
return -1;
}
- ACE_ENDTRY;
return 0;
}