summaryrefslogtreecommitdiff
path: root/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp')
-rw-r--r--CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp170
1 files changed, 70 insertions, 100 deletions
diff --git a/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp b/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp
index 258b580a4d7..afbb5c9bcc6 100644
--- a/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp
+++ b/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp
@@ -16,7 +16,7 @@ CIAO::NodeApplication_Impl::~NodeApplication_Impl (void)
CORBA::Long
-CIAO::NodeApplication_Impl::init (void)
+CIAO::NodeApplication_Impl::init ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
/// @todo initialize this NodeApplication properties
@@ -26,7 +26,6 @@ CIAO::NodeApplication_Impl::init (void)
CORBA::Long
CIAO::NodeApplication_Impl::create_all_containers (
const ::Deployment::ContainerImplementationInfos & container_infos
- ACE_ENV_ARG_DECL_NOT_USED
)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -61,8 +60,7 @@ void
CIAO::NodeApplication_Impl::finishLaunch (
const Deployment::Connections & providedReference,
CORBA::Boolean start,
- CORBA::Boolean add_connection
- ACE_ENV_ARG_DECL)
+ CORBA::Boolean add_connection)
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::StartError,
Deployment::InvalidConnection))
@@ -78,15 +76,14 @@ void
CIAO::NodeApplication_Impl::finishLaunch_i (
const Deployment::Connections & connections,
CORBA::Boolean start,
- CORBA::Boolean add_connection
- ACE_ENV_ARG_DECL)
+ CORBA::Boolean add_connection)
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::StartError,
Deployment::InvalidConnection))
{
ACE_UNUSED_ARG (start);
- ACE_TRY
+ try
{
CORBA::ULong const length = connections.length ();
@@ -118,7 +115,7 @@ CIAO::NodeApplication_Impl::finishLaunch_i (
"invalid port name [%s] in instance [%s] \n",
connections[i].portName.in (),
name.c_str ()));
- ACE_TRY_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
Components::EventConsumerBase_var consumer;
@@ -166,22 +163,20 @@ CIAO::NodeApplication_Impl::finishLaunch_i (
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
"CIAO::NodeApplication_Impl::finishLaunch_i: "
"Unsupported event port type encounted\n"));
- ACE_TRY_THROW (CORBA::NO_IMPLEMENT ());
+ throw CORBA::NO_IMPLEMENT ();
}
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "NodeApplication_Impl::finishLaunch\t\n");
- ACE_RE_THROW;
+ ex._tao_print_exception ("NodeApplication_Impl::finishLaunch\t\n");
+ throw;
}
- ACE_ENDTRY;
}
void
-CIAO::NodeApplication_Impl::ciao_preactivate (void)
+CIAO::NodeApplication_Impl::ciao_preactivate ()
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::StartError))
{
@@ -200,7 +195,7 @@ CIAO::NodeApplication_Impl::ciao_preactivate (void)
}
void
-CIAO::NodeApplication_Impl::start (void)
+CIAO::NodeApplication_Impl::start ()
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::StartError))
{
@@ -219,7 +214,7 @@ CIAO::NodeApplication_Impl::start (void)
}
void
-CIAO::NodeApplication_Impl::ciao_postactivate (void)
+CIAO::NodeApplication_Impl::ciao_postactivate ()
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::StartError))
{
@@ -238,7 +233,7 @@ CIAO::NodeApplication_Impl::ciao_postactivate (void)
}
void
-CIAO::NodeApplication_Impl::ciao_passivate (void)
+CIAO::NodeApplication_Impl::ciao_passivate ()
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::StopError))
{
@@ -256,8 +251,7 @@ CIAO::NodeApplication_Impl::ciao_passivate (void)
Deployment::ComponentInfos *
CIAO::NodeApplication_Impl::install (
- const ::Deployment::NodeImplementationInfo & node_impl_info
- ACE_ENV_ARG_DECL)
+ const ::Deployment::NodeImplementationInfo & node_impl_info)
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::UnknownImplId,
Deployment::ImplEntryPointNotFound,
@@ -265,7 +259,7 @@ CIAO::NodeApplication_Impl::install (
Components::InvalidConfiguration))
{
Deployment::ComponentInfos_var retv;
- ACE_TRY
+ try
{
// Extract ORB resource def here.
this->configurator_.init_resource_manager (node_impl_info.nodeapp_config);
@@ -311,8 +305,7 @@ CIAO::NodeApplication_Impl::install (
{
Deployment::ComponentInfos_var comp_infos =
this->container_set_.at(i+old_set_size)->
- install (container_infos[i]
- ACE_ENV_ARG_PARAMETER);
+ install (container_infos[i]);
// Append the return sequence to the *big* return sequence
CORBA::ULong curr_len = retv->length ();
@@ -348,26 +341,23 @@ CIAO::NodeApplication_Impl::install (
"error binding component instance [%s] "
"into the map. \n",
retv[len].component_instance_name.in ()));
- ACE_TRY_THROW (
- Deployment::InstallationFailure ("NodeApplication_Imp::install",
- "Duplicate component instance name"));
+ throw Deployment::InstallationFailure (
+ "NodeApplication_Imp::install",
+ "Duplicate component instance name");
}
}
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "CIAO_NodeApplication::install error\t\n");
- ACE_RE_THROW;
+ ex._tao_print_exception ("CIAO_NodeApplication::install error\t\n");
+ throw;
}
- ACE_ENDTRY;
return retv._retn ();
}
void
-CIAO::NodeApplication_Impl::remove_component (const char * inst_name
- ACE_ENV_ARG_DECL)
+CIAO::NodeApplication_Impl::remove_component (const char * inst_name)
ACE_THROW_SPEC ((::CORBA::SystemException,
::Components::RemoveFailure))
{
@@ -383,7 +373,7 @@ CIAO::NodeApplication_Impl::remove_component (const char * inst_name
"CIAO::NodeApplication_Impl::remove_component, "
"invalid instance [%s] in the component_container_map.\n",
inst_name));
- ACE_TRY_THROW (::Components::RemoveFailure ());
+ throw ::Components::RemoveFailure ();
}
// Remove this component instance from the node application
@@ -394,8 +384,7 @@ CIAO::NodeApplication_Impl::remove_component (const char * inst_name
}
void
-CIAO::NodeApplication_Impl::passivate_component (const char * name
- ACE_ENV_ARG_DECL)
+CIAO::NodeApplication_Impl::passivate_component (const char * name)
ACE_THROW_SPEC ((::CORBA::SystemException,
::Components::RemoveFailure))
{
@@ -408,7 +397,7 @@ CIAO::NodeApplication_Impl::passivate_component (const char * name
"CIAO::NodeApplication_Impl::passivate_component, "
"invalid instance [%s] \n",
name));
- ACE_TRY_THROW (Components::RemoveFailure ());
+ throw Components::RemoveFailure ();
}
if (CORBA::is_nil (comp_state.objref_.in ()))
@@ -421,8 +410,7 @@ CIAO::NodeApplication_Impl::passivate_component (const char * name
}
void
-CIAO::NodeApplication_Impl::activate_component (const char * name
- ACE_ENV_ARG_DECL)
+CIAO::NodeApplication_Impl::activate_component (const char * name)
ACE_THROW_SPEC ((::CORBA::SystemException,
::Deployment::StartError))
{
@@ -435,7 +423,7 @@ CIAO::NodeApplication_Impl::activate_component (const char * name
"CIAO::NodeApplication_Impl::activate_component, "
"invalid instance [%s] \n",
name));
- ACE_TRY_THROW (Deployment::StartError ());
+ throw Deployment::StartError ();
}
if (CORBA::is_nil (comp_state.objref_.in ()))
@@ -455,7 +443,7 @@ CIAO::NodeApplication_Impl::activate_component (const char * name
void
-CIAO::NodeApplication_Impl::remove (void)
+CIAO::NodeApplication_Impl::remove ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
// If we still have components installed, then do nothing
@@ -492,7 +480,7 @@ CIAO::NodeApplication_Impl::remove (void)
// For static deployment, ORB will be shutdown in the Static_NodeManager
if (this->static_entrypts_maps_ == 0)
{
- this->orb_->shutdown (0 ACE_ENV_ARG_PARAMETER);
+ this->orb_->shutdown (0);
ACE_DEBUG ((LM_DEBUG, "NA: shutdown\n"));
}
}
@@ -501,8 +489,7 @@ CIAO::NodeApplication_Impl::remove (void)
// Create a container interface, which will be hosted in this NodeApplication.
::Deployment::Container_ptr
CIAO::NodeApplication_Impl::create_container (
- const ::Deployment::Properties &properties
- ACE_ENV_ARG_DECL)
+ const ::Deployment::Properties &properties)
ACE_THROW_SPEC ((CORBA::SystemException,
::Components::CreateFailure,
::Components::InvalidConfiguration))
@@ -529,23 +516,19 @@ CIAO::NodeApplication_Impl::create_container (
// suggest how to install the components. Each such data stucture
// should be correspond to one <process_collocation> tag in the XML
// file to describe the deployment plan.
- container_servant->init (policies.ptr ()
- ACE_ENV_ARG_PARAMETER);
+ container_servant->init (policies.ptr ());
PortableServer::ObjectId_var oid
- = this->poa_->activate_object (container_servant
- ACE_ENV_ARG_PARAMETER);
+ = this->poa_->activate_object (container_servant);
CORBA::Object_var obj
- = this->poa_->id_to_reference (oid.in ()
- ACE_ENV_ARG_PARAMETER);
+ = this->poa_->id_to_reference (oid.in ());
::Deployment::Container_var ci
- = ::Deployment::Container::_narrow (obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ = ::Deployment::Container::_narrow (obj.in ());
// Cached the objref in its servant.
- container_servant->set_objref (ci.in () ACE_ENV_ARG_PARAMETER);
+ container_servant->set_objref (ci.in ());
{
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, 0);
@@ -561,8 +544,7 @@ CIAO::NodeApplication_Impl::create_container (
// Remove a container interface.
void
-CIAO::NodeApplication_Impl::remove_container (::Deployment::Container_ptr cref
- ACE_ENV_ARG_DECL)
+CIAO::NodeApplication_Impl::remove_container (::Deployment::Container_ptr cref)
ACE_THROW_SPEC ((CORBA::SystemException,
::Components::RemoveFailure))
{
@@ -571,23 +553,21 @@ CIAO::NodeApplication_Impl::remove_container (::Deployment::Container_ptr cref
if (this->container_set_.object_in_set (cref) == 0)
{
- ACE_THROW (Components::RemoveFailure());
+ throw Components::RemoveFailure();
}
cref->remove ();
// @@ Deactivate object.
PortableServer::ObjectId_var oid
- = this->poa_->reference_to_id (cref
- ACE_ENV_ARG_PARAMETER);
+ = this->poa_->reference_to_id (cref);
- this->poa_->deactivate_object (oid.in ()
- ACE_ENV_ARG_PARAMETER);
+ this->poa_->deactivate_object (oid.in ());
// Should we remove the server still, even if the previous call failed.
if (this->container_set_.remove (cref) == -1)
{
- ACE_THROW (::Components::RemoveFailure ());
+ throw ::Components::RemoveFailure ();
}
ACE_DEBUG ((LM_DEBUG, "LEAVING: NodeApplication_Impl::remove_container()\n"));
@@ -595,7 +575,7 @@ CIAO::NodeApplication_Impl::remove_container (::Deployment::Container_ptr cref
// Get containers
::Deployment::Containers *
-CIAO::NodeApplication_Impl::get_containers (void)
+CIAO::NodeApplication_Impl::get_containers ()
ACE_THROW_SPEC ((CORBA::SystemException))
{
return 0;
@@ -603,12 +583,11 @@ CIAO::NodeApplication_Impl::get_containers (void)
CIAO::CIAO_Event_Service *
CIAO::NodeApplication_Impl::
-install_es (const ::CIAO::DAnCE::EventServiceDeploymentDescription & es_info
- ACE_ENV_ARG_DECL)
+install_es (const ::CIAO::DAnCE::EventServiceDeploymentDescription & es_info)
ACE_THROW_SPEC ((::CORBA::SystemException,
::Deployment::InstallationFailure))
{
- ACE_TRY
+ try
{
ACE_DEBUG ((LM_DEBUG, "\nNodeApplication_Impl::install_es() called.\n\n"));
@@ -623,7 +602,7 @@ ACE_THROW_SPEC ((::CORBA::SystemException,
::CIAO::CIAO_RT_Event_Service::_narrow (ciao_es.in ());
if (CORBA::is_nil (ciao_rtes.in ()))
- ACE_THROW (::Deployment::InstallationFailure ());
+ throw ::Deployment::InstallationFailure ();
// Set up the event channel federations
for (CORBA::ULong j = 0; j < es_info.addr_servs.length (); ++j)
@@ -671,14 +650,12 @@ ACE_THROW_SPEC ((::CORBA::SystemException,
}
return ciao_es._retn ();
}
- ACE_CATCHANY
+ catch (const CORBA::Exception& ex)
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "NodeApplication_Impl::finishLaunch\t\n");
+ ex._tao_print_exception ("NodeApplication_Impl::finishLaunch\t\n");
ACE_THROW_RETURN (::Deployment::InstallationFailure (), 0);
}
- ACE_ENDTRY;
}
@@ -724,8 +701,7 @@ handle_facet_receptable_connection (
{
::Components::Cookie_var cookie =
comp->connect (connection.portName.in (),
- connection.endpoint.in ()
- ACE_ENV_ARG_PARAMETER);
+ connection.endpoint.in ());
ACE_CString key = (*create_connection_key (connection));
if (CIAO::debug_level () > 10)
@@ -757,7 +733,7 @@ handle_facet_receptable_connection (
if (this->cookie_map_.find (key, cookie) != 0)
{
ACE_ERROR ((LM_ERROR, "Error: Cookie Not Found!\n"));
- ACE_TRY_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
comp->disconnect (connection.portName.in (),
@@ -788,8 +764,7 @@ handle_emitter_consumer_connection (
Deployment::InvalidConnection))
{
Components::EventConsumerBase_var consumer =
- Components::EventConsumerBase::_narrow (connection.endpoint.in ()
- ACE_ENV_ARG_PARAMETER);
+ Components::EventConsumerBase::_narrow (connection.endpoint.in ());
if (CORBA::is_nil (consumer.in ()))
{
@@ -800,7 +775,7 @@ handle_emitter_consumer_connection (
"there is an invalid endPoint. \n",
connection.portName.in (),
connection.instanceName.in ()));
- ACE_TRY_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
if (CIAO::debug_level () > 11)
@@ -816,8 +791,7 @@ handle_emitter_consumer_connection (
if (add_connection)
{
comp->connect_consumer (connection.portName.in (),
- consumer.in ()
- ACE_ENV_ARG_PARAMETER);
+ consumer.in ());
if (CIAO::debug_level () > 6)
{
@@ -836,7 +810,8 @@ handle_emitter_consumer_connection (
// Operation not implemented by the CIDLC.
// comp->disconnect_consumer (connection.portName.in (),
// 0
-// ACE_ENV_ARG_PARAMETER);
+//);
+// ACE_TRY_CHECK;
if (CIAO::debug_level () > 6)
{
@@ -863,8 +838,7 @@ handle_publisher_consumer_connection (
Deployment::InvalidConnection))
{
Components::EventConsumerBase_var consumer =
- Components::EventConsumerBase::_narrow (connection.endpoint.in ()
- ACE_ENV_ARG_PARAMETER);
+ Components::EventConsumerBase::_narrow (connection.endpoint.in ());
if (CORBA::is_nil (consumer.in ()))
{
@@ -875,7 +849,7 @@ handle_publisher_consumer_connection (
"there is an invalid endPoint. \n",
connection.portName.in (),
connection.instanceName.in ()));
- ACE_TRY_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
if (CIAO::debug_level () > 11)
@@ -892,8 +866,7 @@ handle_publisher_consumer_connection (
{
::Components::Cookie_var cookie =
comp->subscribe (connection.portName.in (),
- consumer.in ()
- ACE_ENV_ARG_PARAMETER);
+ consumer.in ());
ACE_CString key = (*create_connection_key (connection));
this->cookie_map_.rebind (key, cookie);
@@ -921,12 +894,11 @@ handle_publisher_consumer_connection (
if (this->cookie_map_.find (key, cookie) != 0)
{
ACE_ERROR ((LM_ERROR, "Error: Cookie Not Found!\n"));
- ACE_TRY_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
comp->unsubscribe (connection.portName.in (),
- cookie.in ()
- ACE_ENV_ARG_PARAMETER);
+ cookie.in ());
this->cookie_map_.unbind (key);
if (CIAO::debug_level () > 6)
@@ -959,7 +931,7 @@ handle_publisher_es_connection (
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
"CIAO::NodeApplication_Impl::handle_publisher_es_connection: "
"Unsupported event connection type\n"));
- ACE_THROW (CORBA::NO_IMPLEMENT ());
+ throw CORBA::NO_IMPLEMENT ();
}
const CIAO::CIAO_Event_Service_ptr event_service =
@@ -968,7 +940,7 @@ handle_publisher_es_connection (
if (CORBA::is_nil (event_service))
{
ACE_DEBUG ((LM_DEBUG, "Nil event_service\n"));
- ACE_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
// supplier ID
@@ -1017,7 +989,7 @@ handle_publisher_es_connection (
if (this->cookie_map_.find (key, cookie) != 0)
{
ACE_ERROR ((LM_ERROR, "Error: Cookie Not Found!\n"));
- ACE_TRY_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
comp->unsubscribe (connection.portName.in (),
@@ -1054,7 +1026,7 @@ handle_es_consumer_connection (
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
"CIAO::NodeApplication_Impl::handle_es_consumer_connection: "
"Unsupported event connection type\n"));
- ACE_THROW (CORBA::NO_IMPLEMENT ());
+ throw CORBA::NO_IMPLEMENT ();
}
// Get ES object
@@ -1067,7 +1039,7 @@ handle_es_consumer_connection (
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
"CIAO::NodeApplication_Impl::handle_es_consumer_connection: "
"NIL event_service\n"));
- ACE_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
// Get consumer object
@@ -1080,7 +1052,7 @@ handle_es_consumer_connection (
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
"CIAO::NodeApplication_Impl::handle_es_consumer_connection: "
"Nil consumer port object reference\n"));
- ACE_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
// consumer ID
@@ -1158,8 +1130,7 @@ handle_es_consumer_connection (
void
CIAO::NodeApplication_Impl::build_event_connection (
const Deployment::Connection & connection,
- bool add_or_remove
- ACE_ENV_ARG_DECL)
+ bool add_or_remove)
ACE_THROW_SPEC ((Deployment::InvalidConnection,
CORBA::SystemException))
{
@@ -1189,13 +1160,12 @@ CIAO::NodeApplication_Impl::build_event_connection (
// Get the consumer port object reference and put it into "consumer"
Components::EventConsumerBase_var consumer =
- Components::EventConsumerBase::_narrow (connection.endpoint.in ()
- ACE_ENV_ARG_PARAMETER);
+ Components::EventConsumerBase::_narrow (connection.endpoint.in ());
if (CORBA::is_nil (consumer.in ()))
{
ACE_DEBUG ((LM_DEBUG, "Nil consumer port object reference\n"));
- ACE_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
// Get the supplier component object reference.
@@ -1206,7 +1176,7 @@ CIAO::NodeApplication_Impl::build_event_connection (
if (this->component_state_map_.find (supplier_comp_name, comp_state) != 0)
{
ACE_DEBUG ((LM_DEBUG, "Nil source component object reference\n"));
- ACE_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
// Get the consumer component object reference.
@@ -1217,7 +1187,7 @@ CIAO::NodeApplication_Impl::build_event_connection (
if (CORBA::is_nil (event_service))
{
ACE_DEBUG ((LM_DEBUG, "Nil event_service\n"));
- ACE_THROW (Deployment::InvalidConnection ());
+ throw Deployment::InvalidConnection ();
}
// supplier ID