summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/ImplRepo/scale/server_i.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/ImplRepo/scale/server_i.cpp')
-rw-r--r--TAO/orbsvcs/tests/ImplRepo/scale/server_i.cpp44
1 files changed, 10 insertions, 34 deletions
diff --git a/TAO/orbsvcs/tests/ImplRepo/scale/server_i.cpp b/TAO/orbsvcs/tests/ImplRepo/scale/server_i.cpp
index 21edebb203f..622fec14c14 100644
--- a/TAO/orbsvcs/tests/ImplRepo/scale/server_i.cpp
+++ b/TAO/orbsvcs/tests/ImplRepo/scale/server_i.cpp
@@ -23,17 +23,13 @@ public:
}
virtual ~test_i () {
}
- virtual CORBA::Long get (ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) {
+ virtual CORBA::Long get (void) ACE_THROW_SPEC ((CORBA::SystemException)) {
++n_;
CORBA::Object_var obj = orb_->resolve_initial_references("POACurrent" ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN(0);
PortableServer::Current_var cur = PortableServer::Current::_narrow(obj.in() ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN(0);
ACE_ASSERT(! CORBA::is_nil(cur.in()));
- PortableServer::POA_var poa = cur->get_POA(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN(0);
- CORBA::String_var poaname = poa->the_name(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN(0);
+ PortableServer::POA_var poa = cur->get_POA();
+ CORBA::String_var poaname = poa->the_name();
ACE_DEBUG((LM_DEBUG, "%s: get() %d\n", poaname.in(), n_));
return n_;
@@ -100,7 +96,6 @@ Server_i::init (int argc, char** argv ACE_ENV_ARG_DECL)
ACE_TRY
{
this->orb_ = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
int retval = this->parse_args (argc, argv);
if (retval != 0)
@@ -108,21 +103,16 @@ Server_i::init (int argc, char** argv ACE_ENV_ARG_DECL)
CORBA::Object_var obj =
this->orb_->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
this->root_poa_ =
PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
ACE_ASSERT(! CORBA::is_nil(this->root_poa_.in()));
PortableServer::POAManager_var poa_manager =
- this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->root_poa_->the_POAManager ();
obj = this->orb_->resolve_initial_references ("IORTable" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
IORTable::Table_var ior_table =
IORTable::Table::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
ACE_ASSERT(! CORBA::is_nil(ior_table.in()));
// If -orbuseimr 1 is specified then all persistent poas will be
@@ -130,9 +120,7 @@ Server_i::init (int argc, char** argv ACE_ENV_ARG_DECL)
CORBA::PolicyList policies (2);
policies.length (2);
policies[0] = this->root_poa_->create_id_assignment_policy (PortableServer::USER_ID ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
policies[1] = this->root_poa_->create_lifespan_policy (PortableServer::PERSISTENT ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
test_i* test_svt;
ACE_NEW_RETURN (test_svt, test_i(orb_.in()), -1);
@@ -152,26 +140,19 @@ Server_i::init (int argc, char** argv ACE_ENV_ARG_DECL)
poa_manager.in (),
policies
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
poa->activate_object_with_id (server_id.in (), test_svt ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
TAO_Root_POA* tmp_poa = dynamic_cast<TAO_Root_POA*>(poa.in());
obj = tmp_poa->id_to_reference_i (server_id.in (), false ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::String_var ior = this->orb_->object_to_string (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
ior_table->bind (name.c_str(), ior.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
}
- policies[0]->destroy(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- policies[1]->destroy(ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ policies[0]->destroy();
+ policies[1]->destroy();
}
ACE_CATCHANY
{
@@ -180,22 +161,19 @@ Server_i::init (int argc, char** argv ACE_ENV_ARG_DECL)
}
ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
return 0;
}
int
-Server_i::run (ACE_ENV_SINGLE_ARG_DECL)
+Server_i::run (void)
{
ACE_TRY
{
PortableServer::POAManager_var poa_manager =
- this->root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->root_poa_->the_POAManager ();
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ poa_manager->activate ();
// We have potentially lots of IORs, so just write out a simple text
// file that the run_test.pl can use to know we're done.
@@ -210,8 +188,7 @@ Server_i::run (ACE_ENV_SINGLE_ARG_DECL)
this->server_name_.c_str(),
this->count_));
- this->orb_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ this->orb_->run ();
this->root_poa_->destroy(1, 1);
this->orb_->destroy();
@@ -223,7 +200,6 @@ Server_i::run (ACE_ENV_SINGLE_ARG_DECL)
}
ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
return 0;
}