<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>omniORB server application shutdown</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT FACE="Arial">Dear Sir,</FONT>
<BR><FONT FACE="Arial">just a question to be sure I am doing the right things.</FONT>
<BR><FONT FACE="Arial">****</FONT>
<BR><FONT FACE="Arial">-> I develop server application supplying some interfaces using following:</FONT>
<BR><FONT FACE="Arial">orb1 = CORBA::ORB_init();</FONT>
<BR><FONT FACE="Arial">orb1->resolve_initial_references("RootPOA")</FONT>
<BR><FONT FACE="Arial">poa->activate_object(...);</FONT>
<BR><FONT FACE="Arial">poa->the_POAManager()->activate();</FONT>
<BR><FONT FACE="Arial">orb1->run();</FONT>
<BR><FONT FACE="Arial">****</FONT>
<BR><FONT FACE="Arial">-> This server acts as client calling some remote interfaces as well using following:</FONT>
<BR><FONT FACE="Arial">orb2 = CORBA::ORB_init();</FONT>
<BR><FONT FACE="Arial">rootContext = orb2->resolve_initial_references("NameService");</FONT>
<BR><FONT FACE="Arial">obj = rootContext->resolve_str(...);</FONT>
<BR><FONT FACE="Arial">obj->doSomemting(...);</FONT>
<BR><FONT FACE="Arial">orb2->destroy();</FONT>
<BR><FONT FACE="Arial">****</FONT>
<BR><FONT FACE="Arial">-> To shutdown the appliction I call orb1->shutdown(true) (unblocking orb1->run())</FONT>
<BR><FONT FACE="Arial">-> orb1->destroy() looks to be a part of shutdown()</FONT>
<BR><FONT FACE="Arial">-> Calls running by orb2 are canceled as well (exception handling is done)</FONT>
<BR><FONT FACE="Arial">-> Appication goes down (as desired :-)</FONT>
<BR><FONT FACE="Arial">****</FONT>
<BR><FONT FACE="Arial">-> Questions :</FONT>
<BR><FONT FACE="Arial">Is it the right way to shutdown an application having several activ ORBs doing orb->shutdown() on one of them ?</FONT>
<BR><FONT FACE="Arial">Are some side effects possible ?</FONT>
</P>
<P><FONT FACE="Arial">Kind Regards</FONT>
<BR><FONT FACE="Arial">Evgeni Rojkov</FONT>
</P>
</BODY>
</HTML>