summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp')
-rw-r--r--TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp56
1 files changed, 17 insertions, 39 deletions
diff --git a/TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp b/TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp
index eca1cfc94de..33418851873 100644
--- a/TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp
+++ b/TAO/orbsvcs/tests/Bug_2287_Regression/server.cpp
@@ -17,7 +17,7 @@ ACE_RCSID (Hello,
const char *ior_output_file = "test.ior";
TAO_IOP::TAO_IOR_Manipulation_var iorm = 0;
-
+
int
parse_args (int argc, char *argv[])
{
@@ -52,10 +52,9 @@ make_iogr (const char* domain_id, CORBA::ULongLong group_id, CORBA::ULong group_
TAO_IOP::TAO_IOR_Manipulation::IORList iors (1);
iors.length(1);
iors [0] = CORBA::Object::_duplicate (ref);
-
+
CORBA::Object_var new_ref =
iorm->merge_iors (iors ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
// Property values
@@ -80,7 +79,6 @@ make_iogr (const char* domain_id, CORBA::ULongLong group_id, CORBA::ULong group_
CORBA::Boolean retval = iorm->set_property (&iogr_prop,
new_ref.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
// Set the primary
// See we are setting the second ior as the primary
@@ -90,7 +88,6 @@ make_iogr (const char* domain_id, CORBA::ULongLong group_id, CORBA::ULong group_
new_ref.in (),
new_ref.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (0);
}
return new_ref._retn ();
@@ -110,19 +107,15 @@ main (int argc, char *argv[])
PortableInterceptor::register_orb_initializer (orb_initializer.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
+
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;
PortableServer::POA_var root_poa =
PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (CORBA::is_nil (root_poa.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -130,9 +123,8 @@ main (int argc, char *argv[])
1);
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
+ root_poa->the_POAManager ();
+
CORBA::PolicyList policies (2);
policies.length (2);
@@ -144,21 +136,18 @@ main (int argc, char *argv[])
policies[1] =
root_poa->create_lifespan_policy (PortableServer::PERSISTENT
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POA_var my_poa =
root_poa->create_POA ("my_poa",
poa_manager.in (),
policies
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Creation of the new POA is over, so destroy the Policy_ptr's.
for (CORBA::ULong i = 0; i < policies.length (); ++i)
{
CORBA::Policy_ptr policy = policies[i];
- policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ policy->destroy ();
}
@@ -169,42 +158,35 @@ main (int argc, char *argv[])
ACE_NEW_RETURN (hello_impl,
Hello (orb.in (), Test::Hello::_nil ()),
1);
-
+
PortableServer::ObjectId_var server_id =
PortableServer::string_to_ObjectId ("server_id");
my_poa->activate_object_with_id (server_id.in (),
hello_impl
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
CORBA::Object_var hello =
my_poa->id_to_reference (server_id.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
+
CORBA::String_var ior =
orb->object_to_string (hello.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
+
// Get a ref to the IORManipulation object
CORBA::Object_var IORM =
orb->resolve_initial_references (TAO_OBJID_IORMANIPULATION,
0
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Narrow
iorm =
TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM.in() ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
+
CORBA::Object_var iogr = make_iogr ("Domain_1", 1, 1, orb->string_to_object (ior.in ()) ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
+
CORBA::String_var iorgr_string =
orb->object_to_string (iogr.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
+
// Output the IOR to the <ior_output_file>
FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
if (output_file == 0)
@@ -214,22 +196,18 @@ main (int argc, char *argv[])
1);
ACE_OS::fprintf (output_file, "%s", iorgr_string.in ());
ACE_OS::fclose (output_file);
-
+
TAO249_ServerRequest_Interceptor2::server_iogr_ = CORBA::Object::_duplicate (iogr.in ());
-
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ poa_manager->activate ();
+
+ orb->run ();
ACE_DEBUG ((LM_DEBUG, "(%P|%t) server - event loop finished\n"));
root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- orb->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->destroy ();
}
ACE_CATCHANY
{