summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/ORT/gateway_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/ORT/gateway_server.cpp')
-rw-r--r--TAO/orbsvcs/examples/ORT/gateway_server.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/TAO/orbsvcs/examples/ORT/gateway_server.cpp b/TAO/orbsvcs/examples/ORT/gateway_server.cpp
index d52bc63f0f2..c5efc7af294 100644
--- a/TAO/orbsvcs/examples/ORT/gateway_server.cpp
+++ b/TAO/orbsvcs/examples/ORT/gateway_server.cpp
@@ -44,7 +44,6 @@ main (int argc, char *argv[])
argv,
"gateway_server_orb"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
if (parse_args (argc, argv) != 0)
return -1;
@@ -53,12 +52,10 @@ main (int argc, char *argv[])
CORBA::Object_var obj =
orb->resolve_initial_references ("RootPOA"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
/// Narrow it down correctly.
PortableServer::POA_var root_poa =
PortableServer::POA::_narrow (obj.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
/// Check for nil references
if (CORBA::is_nil (root_poa.in ()))
@@ -68,12 +65,10 @@ main (int argc, char *argv[])
/// Get poa_manager reference
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ root_poa->the_POAManager ();
/// Activate it.
- poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ poa_manager->activate ();
///@}
@@ -83,25 +78,21 @@ main (int argc, char *argv[])
policies [0] =
root_poa->create_servant_retention_policy (PortableServer::RETAIN
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
policies [1] =
root_poa->create_request_processing_policy (PortableServer::USE_DEFAULT_SERVANT
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
policies [2] =
root_poa->create_id_uniqueness_policy (PortableServer::MULTIPLE_ID
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
PortableServer::POA_var gateway_poa =
root_poa->create_POA ("Gateway_POA",
poa_manager.in (),
policies
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
for (CORBA::ULong i = 0; i != policies.length (); ++i) {
policies[i]->destroy ();
@@ -111,13 +102,11 @@ main (int argc, char *argv[])
obj =
orb->resolve_initial_references ("POACurrent"
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Narrow the object reference to a POA Current reference
PortableServer::Current_var poa_current =
PortableServer::Current::_narrow (obj.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
Gateway_i *gateway;
@@ -125,10 +114,8 @@ main (int argc, char *argv[])
Gateway_i (orb.in (),
poa_current.in ()),
CORBA::NO_MEMORY ());
- ACE_TRY_CHECK;
gateway_poa->set_servant (gateway ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
/// Get the ObjectID
PortableServer::ObjectId_var oid =
@@ -141,13 +128,11 @@ main (int argc, char *argv[])
Object_Factory_i (orb.in (),
gateway_poa.in ()),
CORBA::NO_MEMORY ());
- ACE_TRY_CHECK;
/// Activate the Object_Factory_i Object
gateway_poa->activate_object_with_id (oid.in (),
object_factory
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
// Get the object reference.
CORBA::Object_var gateway_object_factory =
@@ -157,7 +142,6 @@ main (int argc, char *argv[])
CORBA::String_var ior =
orb->object_to_string (gateway_object_factory.in ()
ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
/// If the ior_output_file exists, output the IOR to it.
if (ior_output_file != 0)
@@ -173,8 +157,7 @@ main (int argc, char *argv[])
ACE_OS::fclose (output_file);
}
- orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->run ();
}
ACE_CATCHANY
{