summaryrefslogtreecommitdiff
path: root/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp')
-rw-r--r--TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp69
1 files changed, 29 insertions, 40 deletions
diff --git a/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp b/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp
index 571f68354fd..412b73befa7 100644
--- a/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp
+++ b/TAO/tests/NestedUpcall/Triangle_Test/initiator.cpp
@@ -121,15 +121,13 @@ Initiator_Server::parse_args (void)
int
Initiator_Server::init (int argc,
- char** argv
- ACE_ENV_ARG_DECL)
+ char** argv)
{
// Call the init of TAO_ORB_Manager to create a child POA
// under the root POA.
this->orb_manager_.init_child_poa (argc,
argv,
- "child_poa"
- ACE_ENV_ARG_PARAMETER);
+ "child_poa");
this->argc_ = argc;
this->argv_ = argv;
@@ -143,16 +141,15 @@ Initiator_Server::init (int argc,
this->argv_[0]),
-1);
- ACE_TRY
+ try
{
// Get Object A
CORBA::Object_var object_A_obj_var =
- this->orb_manager_.orb()->string_to_object (this->object_A_key_
- ACE_ENV_ARG_PARAMETER);
+ this->orb_manager_.orb()->string_to_object (this->object_A_key_);
this->object_A_var_ =
- Object_A::_narrow (object_A_obj_var.in() ACE_ENV_ARG_PARAMETER);
+ Object_A::_narrow (object_A_obj_var.in());
if (CORBA::is_nil (this->object_A_var_.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -171,11 +168,10 @@ Initiator_Server::init (int argc,
// Get Object B
CORBA::Object_var object_B_obj_var =
- this->orb_manager_.orb()->string_to_object (this->object_B_key_
- ACE_ENV_ARG_PARAMETER);
+ this->orb_manager_.orb()->string_to_object (this->object_B_key_);
this->object_B_var_ =
- Object_B::_narrow (object_B_obj_var.in() ACE_ENV_ARG_PARAMETER);
+ Object_B::_narrow (object_B_obj_var.in());
if (CORBA::is_nil (this->object_B_var_.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -193,17 +189,16 @@ Initiator_Server::init (int argc,
this->orb_manager_.activate_poa_manager ();
}
- ACE_CATCH (CORBA::SystemException, sysex)
+ catch (const CORBA::SystemException& sysex)
{
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
+ sysex._tao_print_exception ("System Exception");
return -1;
}
- ACE_CATCH (CORBA::UserException, userex)
+ catch (const CORBA::UserException& userex)
{
- ACE_PRINT_EXCEPTION (userex, "User Exception");
+ userex._tao_print_exception ("User Exception");
return -1;
}
- ACE_ENDTRY;
ACE_NEW_RETURN (this->initiator_i_ptr_,
Initiator_i(this->object_A_var_.in(),
@@ -211,8 +206,7 @@ Initiator_Server::init (int argc,
-1);
this->str_ =
- this->orb_manager_.activate (this->initiator_i_ptr_
- ACE_ENV_ARG_PARAMETER);
+ this->orb_manager_.activate (this->initiator_i_ptr_);
#if 0
ACE_DEBUG ((LM_DEBUG,
@@ -227,7 +221,7 @@ Initiator_Server::init (int argc,
int
Initiator_Server::run (void)
{
- ACE_TRY
+ try
{
ACE_DEBUG ((LM_DEBUG,
"Initiator_Server::run: Trying to invoke "
@@ -236,22 +230,21 @@ Initiator_Server::run (void)
Initiator_var initiator =
this->initiator_i_ptr_->_this();
- this->object_A_var_->foo (initiator.in () ACE_ENV_ARG_PARAMETER);
+ this->object_A_var_->foo (initiator.in ());
ACE_DEBUG ((LM_DEBUG,
"Initiator_Server::run: Returned from invoke "
"foo on Object A\n"));
}
- ACE_CATCH (CORBA::SystemException, sysex)
+ catch (const CORBA::SystemException& sysex)
{
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
+ sysex._tao_print_exception ("System Exception");
return -1;
}
- ACE_CATCH (CORBA::UserException, userex)
+ catch (const CORBA::UserException& userex)
{
- ACE_PRINT_EXCEPTION (userex, "User Exception");
+ userex._tao_print_exception ("User Exception");
return -1;
}
- ACE_ENDTRY;
return 0;
}
@@ -263,17 +256,15 @@ Initiator_Server::~Initiator_Server (void)
if (this->object_B_key_ != 0)
ACE_OS::free (this->object_B_key_);
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
- this->orb_manager_.deactivate (this->str_.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->orb_manager_.deactivate (this->str_.in ());
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Initiator_Server::~Initiator_Server");
+ ex._tao_print_exception (
+ "Initiator_Server::~Initiator_Server");
}
- ACE_ENDTRY;
delete this->initiator_i_ptr_;
}
@@ -284,13 +275,12 @@ main (int argc, char *argv[])
ACE_DEBUG ((LM_DEBUG,
"\n \t NestedUpCalls.Triangle_Test: Initiator Server \n \n"));
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
Initiator_Server initiator_Server;
int retval =
- initiator_Server.init (argc, argv ACE_ENV_ARG_PARAMETER);
+ initiator_Server.init (argc, argv);
if (retval == -1)
return 1;
@@ -299,16 +289,15 @@ main (int argc, char *argv[])
initiator_Server.run ();
}
}
- ACE_CATCH (CORBA::SystemException, sysex)
+ catch (const CORBA::SystemException& sysex)
{
- ACE_PRINT_EXCEPTION (sysex, "System Exception");
+ sysex._tao_print_exception ("System Exception");
return -1;
}
- ACE_CATCH (CORBA::UserException, userex)
+ catch (const CORBA::UserException& userex)
{
- ACE_PRINT_EXCEPTION (userex, "User Exception");
+ userex._tao_print_exception ("User Exception");
return -1;
}
- ACE_ENDTRY;
return 0;
}