summaryrefslogtreecommitdiff
path: root/TAO/tests/OBV/Simple/Simple_util.cpp
diff options
context:
space:
mode:
authorelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-25 18:17:52 +0000
committerelliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2007-01-25 18:17:52 +0000
commit2ee7b7eed4c0cc10f4ec25b186b04202af01b565 (patch)
tree08a8a649c90559cf5b2228c1caad15515902613e /TAO/tests/OBV/Simple/Simple_util.cpp
parentc979767a00db4ea1299af482033a68829cc16675 (diff)
downloadATCD-2ee7b7eed4c0cc10f4ec25b186b04202af01b565.tar.gz
ChangeLogTag: Thu Jan 25 17:39:59 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/tests/OBV/Simple/Simple_util.cpp')
-rw-r--r--TAO/tests/OBV/Simple/Simple_util.cpp33
1 files changed, 12 insertions, 21 deletions
diff --git a/TAO/tests/OBV/Simple/Simple_util.cpp b/TAO/tests/OBV/Simple/Simple_util.cpp
index e20e22eb249..b4048168fa0 100644
--- a/TAO/tests/OBV/Simple/Simple_util.cpp
+++ b/TAO/tests/OBV/Simple/Simple_util.cpp
@@ -69,15 +69,13 @@ Server<Servant>::parse_args (void)
template <class Servant> int
Server<Servant>::init (const char *servant_name,
int argc,
- char *argv[]
- ACE_ENV_ARG_DECL)
+ char *argv[])
{
// Call the init of <TAO_ORB_Manager> to initialize the ORB and
// create a child POA under the root POA.
if (this->orb_manager_.init_child_poa (argc,
argv,
- "child_poa"
- ACE_ENV_ARG_PARAMETER) == -1)
+ "child_poa") == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"%p\n",
"init_child_poa"),
@@ -101,12 +99,11 @@ Server<Servant>::init (const char *servant_name,
// Make sure that you check for failures here via the ACE_TRY
// macros?!
- ACE_TRY
+ try
{
CORBA::String_var str =
this->orb_manager_.activate_under_child_poa (servant_name,
- &this->servant_
- ACE_ENV_ARG_PARAMETER);
+ &this->servant_);
ACE_DEBUG ((LM_DEBUG,
"The IOR is: <%s>\n",
@@ -121,13 +118,11 @@ Server<Servant>::init (const char *servant_name,
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Exception in activation of POA");
+ ex._tao_print_exception ("Exception in activation of POA");
return -1;
}
- ACE_ENDTRY;
return 0;
}
@@ -239,15 +234,13 @@ Client<InterfaceObj, Var>::init (const char *name,
this->argv_ = argv;
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ try
{
// Retrieve the ORB.
this->orb_ = CORBA::ORB_init (this->argc_,
this->argv_,
- name
- ACE_ENV_ARG_PARAMETER);
+ name);
// Parse command line and verify parameters.
if (this->parse_args () == -1)
@@ -258,7 +251,7 @@ Client<InterfaceObj, Var>::init (const char *name,
if(this->ior_ != 0)
{
CORBA::Object_var server_object =
- this->orb_->string_to_object (this->ior_ ACE_ENV_ARG_PARAMETER);
+ this->orb_->string_to_object (this->ior_);
if (CORBA::is_nil (server_object.in ()))
@@ -266,8 +259,7 @@ Client<InterfaceObj, Var>::init (const char *name,
"invalid ior <%s>\n",
this->ior_),
-1);
- this->server_ = InterfaceObj::_narrow (server_object.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->server_ = InterfaceObj::_narrow (server_object.in ());
}
else
ACE_ERROR_RETURN ((LM_ERROR,
@@ -276,12 +268,11 @@ Client<InterfaceObj, Var>::init (const char *name,
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "Client_i::init");
+ ex._tao_print_exception ("Client_i::init");
return -1;
}
- ACE_ENDTRY;
return 0;