summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp')
-rw-r--r--TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp24
1 files changed, 8 insertions, 16 deletions
diff --git a/TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp b/TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp
index 2b39bda82e3..da28207b229 100644
--- a/TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp
+++ b/TAO/orbsvcs/examples/Security/SecurityLevel1/server.cpp
@@ -11,17 +11,15 @@ const char *ior_output_file = 0;
int
main (int argc, char *argv[])
{
- ACE_TRY_NEW_ENV
+ try
{
/// Our regular ORB Initialization.
CORBA::ORB_var orb =
- CORBA::ORB_init (argc, argv, "" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ CORBA::ORB_init (argc, argv, "");
/// Get a reference to the RootPOA.
CORBA::Object_var poa_object =
- orb->resolve_initial_references ("RootPOA" ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->resolve_initial_references ("RootPOA");
if (CORBA::is_nil (poa_object.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -30,19 +28,15 @@ main (int argc, char *argv[])
/// Narrow down the reference to the currect interface.
PortableServer::POA_var root_poa =
- PortableServer::POA::_narrow (poa_object.in () ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ PortableServer::POA::_narrow (poa_object.in ());
SLevel1_Server_i level1_server ();
SLevel1_Server_var server =
- level1_server._this (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ level1_server._this ();
CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ orb->object_to_string (server.in ());
// If the ior_output_file exists, output the ior to it
if (ior_output_file != 0)
@@ -60,16 +54,14 @@ main (int argc, char *argv[])
// Start the ORB
orb->run ();
- root_poa->destroy (1, 1 ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ root_poa->destroy (1, 1);
}
- ACE_CATCH (CORBA::SytemException, ex)
+ catch (const CORBA::SytemException& )
{
ACE_DEBUG ((LM_DEBUG,
"System Exception raised: %s", ex));
}
- ACE_ENDTRY;
return 0;
}