<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>omniORB server application shutdown</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=932253908-12062007>Hello,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=932253908-12062007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=932253908-12062007><FONT face=Arial
color=#0000ff size=2>You should not call ORB_init() more than once. Use the same
ORB for both server and client roles.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=932253908-12062007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=932253908-12062007><FONT face=Arial
color=#0000ff size=2>Regards, Wernke</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=932253908-12062007><FONT face=Arial
color=#0000ff size=2> </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=932253908-12062007> </SPAN></DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma size=2><B>From:</B>
omniorb-list-bounces@omniorb-support.com
[mailto:omniorb-list-bounces@omniorb-support.com] <BR><B>Sent:</B> 12 June 2007
10:25<BR><B>Subject:</B> [omniORB] omniORB server application
shutdown<BR></FONT><BR></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV><!-- 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></BLOCKQUOTE></BODY></HTML>