[omniORB] Omni_mutex and static global object

Frederic Prin frederic.prin at silvaco.com
Wed Sep 15 12:15:25 BST 2004


Hi,

I make instensive use of auto-instanciated static singleton object...
I ran into errors when making some omniORB API calls from constructors
of my global static objects (on windows).
It's always an omni_mutex_lock::omni_mutex_lock(omni_mutex & ) crash.

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...
- But maybe this crash is due to static objects from the omniORB core
that are not yet instanciated ?
- Or it is a bug that is fixed in 4.0.4 (I use omniORB 4.0.3)
- Or I must refrain from doing omniORB API calls in my static singleton
constructor.

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 !
I know it's more a programmation issue but
 !
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


Thanks for your help, ideas, hints or even answers!

Fred



                              (
     Frédéric Prin          )
     Senior Software Engineer /
          S I L V A C O      (
     Grenoble REsearch CEnter \
     Tel 04 56 38 10 33        )
    __________________________/___
   /__/__/__/__/__/__/__/__/__/__/
  /__/__/__/__/__/__/__/__/_____/
 /__/__/__/__/__/__/__/__/__/__/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20040915/397d255a/attachment.htm


More information about the omniORB-list mailing list