<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Nachricht</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=477381509-12062007><FONT face=Arial
color=#0000ff size=2>With omniORB, the ORB is a singleton object.
</FONT></SPAN><SPAN class=477381509-12062007><FONT face=Arial color=#0000ff
size=2>ORB_init() will do real initialisation only for the first call.
In subsequent calls it just increments the refcount and returns a pointer
to 'the' ORB, so you will get the same pointer with every call. Most probably it
does no harm calling it more than once, but it is of not much use
either.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=477381509-12062007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=477381509-12062007><FONT face=Arial
color=#0000ff size=2>Experts please correct me if I'm wrong.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=477381509-12062007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=477381509-12062007><FONT face=Arial
color=#0000ff size=2>Wernke</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=477381509-12062007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma><FONT size=2><SPAN
class=477381509-12062007><FONT face=Arial
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Tahoma><FONT size=2><SPAN
class=477381509-12062007> </SPAN><STRONG>Subject:</STRONG> AW: [omniORB]
omniORB server application shutdown<BR></FONT></FONT></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV><SPAN class=745360309-12062007><FONT face=Arial color=#0000ff>Thank you
for advise !</FONT></SPAN></DIV>
<DIV><SPAN class=745360309-12062007><FONT face=Arial color=#0000ff>Is it
something omniORB specific ?</FONT></SPAN></DIV>
<DIV><SPAN class=745360309-12062007><FONT face=Arial color=#0000ff>Actually I
have several ORB_init()s in one process in my Java-Application
running (Java 2, Suns JavaIDL).</FONT></SPAN></DIV>
<DIV><SPAN class=745360309-12062007><FONT face=Arial color=#0000ff>I could not
reproduce any troubles (yet ?).</FONT></SPAN></DIV>
<DIV><SPAN class=745360309-12062007><FONT face=Arial color=#0000ff>Kind
Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=745360309-12062007><FONT face=Arial
color=#0000ff>Evgeni</FONT></SPAN></DIV>
<DIV><SPAN class=745360309-12062007></SPAN><SPAN
class=745360309-12062007><FONT face=Arial
color=#0000ff></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left><FONT face=Tahoma
size=2>-----Ursprüngliche Nachricht-----<BR><B>Betreff:</B> RE: [omniORB]
omniORB server application shutdown<BR><BR></FONT></DIV>
<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></BLOCKQUOTE><BR>______________________________________________________________________<BR>This
email has been scanned by the MessageLabs Email Security System.<BR>For more
information please visit http://www.messagelabs.com/email
<BR>______________________________________________________________________<BR></BLOCKQUOTE></BODY></HTML>