MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / finalize

Method finalize

dds/InfoRepo/DCPSInfoRepoServ.cpp:86–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void
87InfoRepo::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
120int
121InfoRepo::handle_exception(ACE_HANDLE /* fd */)

Callers 4

InfoRepoMethod · 0.95
~InfoRepoMethod · 0.95
runMethod · 0.95
handle_exceptionMethod · 0.45

Calls 4

retcode_to_stringFunction · 0.85
shutdownMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected