<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV><SPAN class=015244912-15092004><FONT face=Arial color=#0000ff size=2>Thanks
for your answer!</FONT></SPAN></DIV>
<DIV><SPAN class=015244912-15092004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=015244912-15092004><FONT face=Arial color=#0000ff size=2><FONT
face="Times New Roman" color=#000000 size=3>>... wouldn't expect omniORB
to be setup yet since you haven't even called orb_init().
</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=015244912-15092004><FONT face=Arial color=#0000ff size=2><FONT
face="Times New Roman" color=#000000 size=3>Yes you are right. But it is
orb_init() itself that crash (when internaly invoke omni_mutex)
!</FONT></FONT></SPAN></DIV>
<DIV><SPAN class=015244912-15092004><FONT face=Arial color=#0000ff size=2><FONT
face="Times New Roman" color=#000000 size=3></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=015244912-15092004>Thanks for your suggestion. This was the
only <SPAN class=078505412-15092004>idea </SPAN>I got but the idea to
add a call into EVERY method<SPAN class=078505412-15092004>s</SPAN>
call was just frightening me and I was looking for another
one.</SPAN></DIV>
<DIV><SPAN class=015244912-15092004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=015244912-15092004><FONT face=Arial color=#0000ff
size=2>Fred</FONT></SPAN></DIV></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
ssredige@rockwellcollins.com [mailto:ssredige@rockwellcollins.com]
<BR><B>Sent:</B> mercredi 15 septembre 2004 14:42<BR><B>To:</B>
frederic.prin@silvaco.com<BR><B>Cc:</B>
omniorb-list@omniorb-support.com<BR><B>Subject:</B> Re: [omniORB] Omni_mutex
and static global object<BR><BR></FONT></DIV><BR><FONT face=sans-serif
size=2>>> </FONT><FONT face=Arial size=2>I ran into errors when making
some omniORB API calls from constructors of my global static objects (on
windows).</FONT><FONT face="Times New Roman" size=3> </FONT><BR><BR><FONT
face="Times New Roman" size=3>If you have a global static object, it is
instanciated before main() enters. Therefore, I wouldn't expect omniORB to be
setup yet since you haven't even called orb_init().</FONT> <BR>
<P><FONT face=Arial size=2>>> If the last point is the good one, is
someone knows another way to instanciate my singleton class without an
explicit call to a Singleton::GetInstance() method !</FONT>
<P><FONT face=Arial size=2>>>The reason is that I'm providing a library
that encapsulate omniORB and provide another object API that do not have a
kind of Initialize methods that MUST be called first prior of others
calls…</FONT>
<P><FONT face=Arial size=2>You could just have your API keep an internal
initialized flag and for every method call into it, make sure it is
initialized, and if not, call the GetInstance() method first...</FONT>
<P>
<P><FONT face=Arial size=2>ScottR</FONT></P></BLOCKQUOTE></BODY></HTML>