diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2014-12-08 19:33:53 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2014-12-08 19:33:53 +0100 |
commit | 5ed9067deb2728b38cddf4bae0683b831a99771c (patch) | |
tree | 1ed4a2c6c53ac8c99acfd58e305ef8c8f0af332d /TAO/orbsvcs/ImplRepo_Service | |
parent | 60d1212e4c59a398cceaf3e3b82be5f433b88b53 (diff) | |
download | ATCD-5ed9067deb2728b38cddf4bae0683b831a99771c.tar.gz |
Handle comm_failure and transient during shutdown of a server, we do clear the status when we get those
* TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp:
Diffstat (limited to 'TAO/orbsvcs/ImplRepo_Service')
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp | 47 |
1 files changed, 39 insertions, 8 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp index 3907f428504..12409930db1 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp @@ -1012,7 +1012,7 @@ ImR_Locator_i::shutdown_server // in which case the shutdown will need to be reissued. info.edit ()->reset_runtime (); } - catch (CORBA::TIMEOUT &to_ex) + catch (const CORBA::TIMEOUT &ex) { info.edit ()->reset_runtime (); // Note : This is a good thing. It means we didn't waste our time waiting for @@ -1023,11 +1023,43 @@ ImR_Locator_i::shutdown_server ACE_TEXT ("ImR: Timeout while waiting for <%C> shutdown.\n"), id)); } - ImplementationRepository::AMH_AdministrationExceptionHolder h (to_ex._tao_duplicate()); + ImplementationRepository::AMH_AdministrationExceptionHolder h (ex._tao_duplicate()); _tao_rh->shutdown_server_excep (&h); return; } - catch (CORBA::Exception &ex) + catch (const CORBA::COMM_FAILURE& ex) + { + info.edit ()->reset_runtime (); + if (debug_ > 1) + { + ORBSVCS_DEBUG ((LM_DEBUG, + ACE_TEXT ("ImR: COMM_FAILURE while waiting for <%C> shutdown.\n"), + id)); + } + if (this->opts_->throw_shutdown_exceptions ()) + { + ImplementationRepository::AMH_AdministrationExceptionHolder h (ex._tao_duplicate()); + _tao_rh->shutdown_server_excep (&h); + return; + } + } + catch (const CORBA::TRANSIENT& ex) + { + info.edit ()->reset_runtime (); + if (debug_ > 1) + { + ORBSVCS_DEBUG ((LM_DEBUG, + ACE_TEXT ("ImR: TRANSIENT while waiting for <%C> shutdown.\n"), + id)); + } + if (this->opts_->throw_shutdown_exceptions ()) + { + ImplementationRepository::AMH_AdministrationExceptionHolder h (ex._tao_duplicate()); + _tao_rh->shutdown_server_excep (&h); + return; + } + } + catch (const CORBA::Exception &ex) { if (debug_ > 1) { @@ -1043,7 +1075,6 @@ ImR_Locator_i::shutdown_server } } - _tao_rh->shutdown_server (); } @@ -1156,8 +1187,8 @@ ImR_Locator_i::server_is_running void ImR_Locator_i::server_is_shutting_down -(ImplementationRepository::AMH_AdministrationResponseHandler_ptr _tao_rh, - const char* fqname) + (ImplementationRepository::AMH_AdministrationResponseHandler_ptr _tao_rh, + const char* fqname) { UpdateableServerInfo info (this->repository_.get(), fqname); if (info.null ()) @@ -1195,8 +1226,8 @@ ImR_Locator_i::server_is_shutting_down void ImR_Locator_i::find -(ImplementationRepository::AMH_AdministrationResponseHandler_ptr _tao_rh, - const char* id) + (ImplementationRepository::AMH_AdministrationResponseHandler_ptr _tao_rh, + const char* id) { Server_Info_Ptr si = this->repository_->get_active_server (id); ImplementationRepository::ServerInformation_var imr_info; |