<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.4630.0">
<TITLE>Omni_mutex and static global object</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I make instensive use of auto-instanciated static singleton object...</FONT>
<BR><FONT SIZE=2 FACE="Arial">I ran into errors when making some omniORB API calls from constructors of my global static objects (on windows).</FONT>
<BR><FONT SIZE=2 FACE="Arial">It's always an omni_mutex_lock::omni_mutex_lock(omni_mutex & ) crash.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">So I know, that using static global singleton is not THE good way to do, especially regarding their instanciation order but I do not care about order in my code...</FONT></P>
<P><FONT SIZE=2 FACE="Arial">- But maybe this crash is due to static objects from the omniORB core that are not yet instanciated ?</FONT>
<BR><FONT SIZE=2 FACE="Arial">- Or it is a bug that is fixed in 4.0.4 (I use omniORB 4.0.3)</FONT>
<BR><FONT SIZE=2 FACE="Arial">- Or I must refrain from doing omniORB API calls in my static singleton constructor.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">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>
<P><FONT SIZE=2 FACE="Arial">I know it's more a programmation issue but… !</FONT>
<BR><FONT SIZE=2 FACE="Arial">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>
<P><FONT SIZE=2 FACE="Arial">Thanks for your help, ideas, hints or even answers!</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Fred</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2 FACE="Courier New"> (</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> <B></B></FONT><B> <FONT FACE="Courier New">Frédéric Prin</FONT></B><FONT SIZE=2 FACE="Courier New"> )</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> Senior Software Engineer /</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> S I L V A C O (</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> Grenoble REsearch CEnter \</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> Tel 04 56 38 10 33 )</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> __________________________/___</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> /__/__/__/__/__/__/__/__/__/__/</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> /__/__/__/__/__/__/__/__/_____/</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> /__/__/__/__/__/__/__/__/__/__/</FONT>
</P>
</BODY>
</HTML>