| 84 | } |
| 85 | |
| 86 | void |
| 87 | InfoRepo::finalize() |
| 88 | { |
| 89 | if (this->finalized_) { |
| 90 | return; |
| 91 | } |
| 92 | |
| 93 | if (!this->servant_finalized_) { |
| 94 | // reached if the ImR caused the ORB to shut down, |
| 95 | // which bypasses InfoRepo::handle_exception() |
| 96 | this->info_servant_->finalize(); |
| 97 | this->federator_.finalize(); |
| 98 | info_servant_->cleanup_all_built_in_topics(); // Used by federator_->finalize |
| 99 | const DDS::ReturnCode_t shutdown_error = TheServiceParticipant->shutdown(); |
| 100 | if (shutdown_error) { |
| 101 | ACE_ERROR((LM_ERROR, "(%P|%t) ERROR: InfoRepo::finalize: " |
| 102 | "TheServiceParticipant->shutdown returned: %C\n", |
| 103 | OpenDDS::DCPS::retcode_to_string(shutdown_error))); |
| 104 | } |
| 105 | this->servant_finalized_ = true; |
| 106 | } |
| 107 | |
| 108 | if (!CORBA::is_nil(this->orb_)) { |
| 109 | try { |
| 110 | this->orb_->destroy(); |
| 111 | } |
| 112 | catch (const CORBA::Exception&) { |
| 113 | //finalizing anyway, not an issue. |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | this->finalized_ = true; |
| 118 | } |
| 119 | |
| 120 | int |
| 121 | InfoRepo::handle_exception(ACE_HANDLE /* fd */) |
no test coverage detected