summaryrefslogtreecommitdiff
path: root/TAO/examples/Event_Comm/Notifier_Server.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/examples/Event_Comm/Notifier_Server.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/examples/Event_Comm/Notifier_Server.cpp')
-rw-r--r--TAO/examples/Event_Comm/Notifier_Server.cpp30
1 files changed, 11 insertions, 19 deletions
diff --git a/TAO/examples/Event_Comm/Notifier_Server.cpp b/TAO/examples/Event_Comm/Notifier_Server.cpp
index 201fa8ccba4..d2fe8321f33 100644
--- a/TAO/examples/Event_Comm/Notifier_Server.cpp
+++ b/TAO/examples/Event_Comm/Notifier_Server.cpp
@@ -24,11 +24,10 @@ Notifier_Server::~Notifier_Server (void)
int
Notifier_Server::close (void)
{
- ACE_TRY_NEW_ENV
+ try
{
// disconnect all the consumers.
- this->servant_.disconnect ("notifier shutdown."
- ACE_ENV_ARG_PARAMETER);
+ this->servant_.disconnect ("notifier shutdown.");
// Name the object.
CosNaming::Name notifier_obj_name (1);
@@ -36,17 +35,15 @@ Notifier_Server::close (void)
notifier_obj_name[0].id =
CORBA::string_dup (NOTIFIER_BIND_NAME);
- this->naming_server_->unbind (notifier_obj_name
- ACE_ENV_ARG_PARAMETER);
+ this->naming_server_->unbind (notifier_obj_name);
// Instruct the ORB to shutdown.
this->orb_manager_.orb ()->shutdown ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
return -1;
}
- ACE_ENDTRY;
return 0;
}
@@ -57,7 +54,7 @@ Notifier_Server::close (void)
int
Notifier_Server::init_naming_service (void)
{
- ACE_TRY
+ try
{
CORBA::ORB_var orb = this->orb_manager_.orb ();
@@ -80,16 +77,14 @@ Notifier_Server::init_naming_service (void)
// Now, attach the object name to the context.
this->naming_server_->bind (notifier_obj_name,
- notifier_obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ notifier_obj.in ());
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ ACE_PRINT_EXCEPTION (ex,
"Notifier_Server::init_naming_service\n");
return -1;
}
- ACE_ENDTRY;
return 0;
}
@@ -98,16 +93,14 @@ Notifier_Server::init_naming_service (void)
// Initialize the server.
int
Notifier_Server::init (int argc,
- char *argv[]
- ACE_ENV_ARG_DECL)
+ char *argv[])
{
// Call the init of <TAO_ORB_Manager> to initialize the ORB and
// create the 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",
@@ -119,8 +112,7 @@ Notifier_Server::init (int argc,
// Activate the servant in the POA.
CORBA::String_var str =
this->orb_manager_.activate_under_child_poa (NOTIFIER_BIND_NAME,
- &this->servant_
- ACE_ENV_ARG_PARAMETER);
+ &this->servant_);
return this->init_naming_service ();
}