summaryrefslogtreecommitdiff
path: root/TAO/tests/MProfile_Forwarding
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-01-24 15:39:09 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-01-24 15:39:09 +0000
commitc801f87e59c00f72bdeb5ce7bd0d276674665bac (patch)
tree70bff03d1cf156ecf05ee4c5c338d8ce423e64ee /TAO/tests/MProfile_Forwarding
parent98c0b37d4714ff774fc3ada8c9ee893c719af714 (diff)
downloadATCD-c801f87e59c00f72bdeb5ce7bd0d276674665bac.tar.gz
Wed Jan 24 14:00:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tests/MProfile_Forwarding')
-rw-r--r--TAO/tests/MProfile_Forwarding/Manager.cpp46
-rw-r--r--TAO/tests/MProfile_Forwarding/Manager.h8
-rw-r--r--TAO/tests/MProfile_Forwarding/Servant_Locator.cpp1
-rw-r--r--TAO/tests/MProfile_Forwarding/client.cpp11
-rw-r--r--TAO/tests/MProfile_Forwarding/server.cpp17
-rw-r--r--TAO/tests/MProfile_Forwarding/test_i.cpp4
-rw-r--r--TAO/tests/MProfile_Forwarding/test_i.h4
7 files changed, 24 insertions, 67 deletions
diff --git a/TAO/tests/MProfile_Forwarding/Manager.cpp b/TAO/tests/MProfile_Forwarding/Manager.cpp
index 7336bc42523..07a9376ceeb 100644
--- a/TAO/tests/MProfile_Forwarding/Manager.cpp
+++ b/TAO/tests/MProfile_Forwarding/Manager.cpp
@@ -63,19 +63,15 @@ main (int argc,
manager.init (argc,
argv
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (parse_args (argc, argv) == -1)
return -1;
- manager.activate_servant (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ manager.activate_servant ();
- manager.make_iors_register (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ manager.make_iors_register ();
- manager.run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ manager.run ();
}
ACE_CATCHANY
{
@@ -104,25 +100,20 @@ Manager::init (int argc,
argv,
0
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Obtain the RootPOA.
CORBA::Object_var obj_var =
this->orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Get the POA_var object from Object_var.
PortableServer::POA_var root_poa_var =
PortableServer::POA::_narrow (obj_var.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Get the POAManager of the RootPOA.
PortableServer::POAManager_var poa_manager_var =
- root_poa_var->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ root_poa_var->the_POAManager ();
- poa_manager_var->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ poa_manager_var->activate ();
// Policies for the childPOA to be created.
CORBA::PolicyList policies (4);
@@ -133,25 +124,21 @@ Manager::init (int argc,
policies[0] =
root_poa_var->create_id_assignment_policy (PortableServer::USER_ID
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Lifespan policy
policies[1] =
root_poa_var->create_lifespan_policy (PortableServer::PERSISTENT
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Tell the POA to use a servant manager
policies[2] =
root_poa_var->create_request_processing_policy (PortableServer::USE_SERVANT_MANAGER
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Servant Retention Policy -> Use a locator
policies[3] =
root_poa_var->create_servant_retention_policy (PortableServer::NON_RETAIN
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
ACE_CString name = "newPOA";
@@ -160,7 +147,6 @@ Manager::init (int argc,
poa_manager_var.in (),
policies
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Creation of childPOAs is over. Destroy the Policy objects.
for (CORBA::ULong i = 0;
@@ -168,8 +154,7 @@ Manager::init (int argc,
++i)
{
CORBA::Policy_ptr policy = policies[i];
- policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ policy->destroy ();
}
return 0;
@@ -177,13 +162,12 @@ Manager::init (int argc,
int
-Manager::activate_servant (ACE_ENV_SINGLE_ARG_DECL)
+Manager::activate_servant (void)
{
ACE_NEW_THROW_EX (this->servant_locator_,
Servant_Locator (this->orb_.in ()),
CORBA::NO_MEMORY ());
- ACE_CHECK_RETURN (-1);
this->servant_locator_var_ = this->servant_locator_;
@@ -191,7 +175,6 @@ Manager::activate_servant (ACE_ENV_SINGLE_ARG_DECL)
// secondPOA.
this->new_poa_var_->set_servant_manager (this->servant_locator_
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Try to create a reference with user created ID in new_poa
// which uses ServantLocator.
@@ -202,26 +185,23 @@ Manager::activate_servant (ACE_ENV_SINGLE_ARG_DECL)
this->new_manager_ior_ =
new_poa_var_->create_reference_with_id (second_foo_oid_var.in (),
"IDL:Simple_Server:1.0" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
return 0;
}
int
-Manager::make_iors_register (ACE_ENV_SINGLE_ARG_DECL)
+Manager::make_iors_register (void)
{
// First server
CORBA::Object_var object_primary =
this->orb_->string_to_object (first_ior
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
//Second server
CORBA::Object_var object_secondary =
this->orb_->string_to_object (second_ior
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
if (third_ior == 0)
ACE_DEBUG ((LM_DEBUG,
@@ -230,18 +210,15 @@ Manager::make_iors_register (ACE_ENV_SINGLE_ARG_DECL)
CORBA::Object_var object_tertiary =
this->orb_->string_to_object (third_ior
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Get an object reference for the ORBs IORManipultion object!
CORBA::Object_ptr IORM =
this->orb_->resolve_initial_references (TAO_OBJID_IORMANIPULATION,
0
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
TAO_IOP::TAO_IOR_Manipulation_ptr iorm =
TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
// Create the list
@@ -254,7 +231,6 @@ Manager::make_iors_register (ACE_ENV_SINGLE_ARG_DECL)
// Create a merged set 1;
CORBA::Object_var merged_set1 =
iorm->merge_iors (iors ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
if (object_secondary.in () == 0)
ACE_DEBUG ((LM_DEBUG,
@@ -273,7 +249,6 @@ Manager::make_iors_register (ACE_ENV_SINGLE_ARG_DECL)
// Create merged set 2
CORBA::Object_var merged_set2 =
iorm->merge_iors (iors_again ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
CORBA::String_var iorref1 =
this->orb_->object_to_string (merged_set1.in ());
@@ -297,10 +272,9 @@ Manager::make_iors_register (ACE_ENV_SINGLE_ARG_DECL)
int
-Manager::run (ACE_ENV_SINGLE_ARG_DECL)
+Manager::run (void)
{
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ this->orb_->run ();
return 0;
}
diff --git a/TAO/tests/MProfile_Forwarding/Manager.h b/TAO/tests/MProfile_Forwarding/Manager.h
index 6f14588b3a3..f84401427cf 100644
--- a/TAO/tests/MProfile_Forwarding/Manager.h
+++ b/TAO/tests/MProfile_Forwarding/Manager.h
@@ -18,15 +18,15 @@ class Manager
// Initialize the ORB, POA etc.
- int init_register_name_service (ACE_ENV_SINGLE_ARG_DECL);
+ int init_register_name_service (void);
// Initialize the Name service, tegister the combined IOR with it
- int activate_servant (ACE_ENV_SINGLE_ARG_DECL);
+ int activate_servant (void);
// Activate the servant etc.
- int make_iors_register (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
+ int make_iors_register (void);
- int run (ACE_ENV_SINGLE_ARG_DECL);
+ int run (void);
// Run the ORB event loop..
private:
CORBA::ORB_var orb_;
diff --git a/TAO/tests/MProfile_Forwarding/Servant_Locator.cpp b/TAO/tests/MProfile_Forwarding/Servant_Locator.cpp
index fc690fa5cf4..c3ed9260942 100644
--- a/TAO/tests/MProfile_Forwarding/Servant_Locator.cpp
+++ b/TAO/tests/MProfile_Forwarding/Servant_Locator.cpp
@@ -62,7 +62,6 @@ Servant_Locator::preinvoke (const PortableServer::ObjectId &oid,
Simple_Server_var server =
Simple_Server::_narrow (this->objref_.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
ACE_DEBUG ((LM_DEBUG,
"Got the narrowed secondary server too... \n"));
diff --git a/TAO/tests/MProfile_Forwarding/client.cpp b/TAO/tests/MProfile_Forwarding/client.cpp
index 610899838a9..b8a4919b495 100644
--- a/TAO/tests/MProfile_Forwarding/client.cpp
+++ b/TAO/tests/MProfile_Forwarding/client.cpp
@@ -47,14 +47,12 @@ main (int argc, char *argv[])
{
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (parse_args (argc, argv) == -1)
return -1;
CORBA::Object_var objref =
orb->string_to_object (ior_input_file);
- ACE_TRY_CHECK;
if (objref.in () == 0)
{
@@ -65,7 +63,6 @@ main (int argc, char *argv[])
Simple_Server_var server =
Simple_Server::_narrow (objref.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (CORBA::is_nil (server.in ()))
{
@@ -75,7 +72,6 @@ main (int argc, char *argv[])
}
run_test (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
}
ACE_CATCHANY
{
@@ -98,8 +94,7 @@ void run_test (Simple_Server_ptr server
ACE_OS::sleep (2);
// Make a remote call
- server->remote_call (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ server->remote_call ();
/*ACE_DEBUG ((LM_DEBUG,
"Kill the primary . . . "));
@@ -107,8 +102,7 @@ void run_test (Simple_Server_ptr server
ACE_DEBUG ((LM_DEBUG, " hope you did\n")); */
ACE_DEBUG ((LM_DEBUG,
"I am going to shutdown \n"));
- server->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ server->shutdown ();
ACE_OS::sleep (23);
}
ACE_CATCH (CORBA::UserException, x)
@@ -132,6 +126,5 @@ void run_test (Simple_Server_ptr server
ACE_RE_THROW;
}
ACE_ENDTRY;
- ACE_CHECK;
}
}
diff --git a/TAO/tests/MProfile_Forwarding/server.cpp b/TAO/tests/MProfile_Forwarding/server.cpp
index 04c27ae739f..b973dc29da8 100644
--- a/TAO/tests/MProfile_Forwarding/server.cpp
+++ b/TAO/tests/MProfile_Forwarding/server.cpp
@@ -41,11 +41,9 @@ main (int argc, char *argv[])
{
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::Object_var poa_object =
orb->resolve_initial_references("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (CORBA::is_nil (poa_object.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -54,15 +52,12 @@ main (int argc, char *argv[])
PortableServer::POA_var root_poa =
PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Get the POAManager of the RootPOA.
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ root_poa->the_POAManager ();
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ poa_manager->activate ();
if (parse_args (argc, argv) != 0)
return 1;
@@ -70,12 +65,10 @@ main (int argc, char *argv[])
Simple_Server_i server_impl (orb.in ());
Simple_Server_var server =
- server_impl._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ server_impl._this ();
CORBA::String_var ior =
orb->object_to_string (server.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
@@ -93,13 +86,11 @@ main (int argc, char *argv[])
}
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->run ();
ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
ACE_OS::sleep (5);
}
diff --git a/TAO/tests/MProfile_Forwarding/test_i.cpp b/TAO/tests/MProfile_Forwarding/test_i.cpp
index a3f647d2cb3..1ef2fd374ec 100644
--- a/TAO/tests/MProfile_Forwarding/test_i.cpp
+++ b/TAO/tests/MProfile_Forwarding/test_i.cpp
@@ -15,7 +15,7 @@ Simple_Server_i::Simple_Server_i (void)
}
void
-Simple_Server_i::remote_call (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Simple_Server_i::remote_call (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG,
@@ -24,7 +24,7 @@ Simple_Server_i::remote_call (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
void
-Simple_Server_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Simple_Server_i::shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
this->orb_->shutdown (0);
diff --git a/TAO/tests/MProfile_Forwarding/test_i.h b/TAO/tests/MProfile_Forwarding/test_i.h
index 59156bee2ba..5568f94a471 100644
--- a/TAO/tests/MProfile_Forwarding/test_i.h
+++ b/TAO/tests/MProfile_Forwarding/test_i.h
@@ -34,10 +34,10 @@ public:
// ctor
// = The Simple_Server methods.
- void remote_call (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ void remote_call (void)
ACE_THROW_SPEC ((CORBA::SystemException));
- void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+ void shutdown (void)
ACE_THROW_SPEC ((CORBA::SystemException));
private: