[omniORB] Issues related with Shared libs shared the static variables.

Duncan Grisby duncan@grisby.org
Wed Feb 5 17:25:02 2003


On Tuesday 4 February, "S. Sahayaraj" wrote:

[...]
> 	Then, I watched this problem more deeply in omniORB level and could
> see the actual problem lies in omniORB source while ORB destroying time(Most
> probably, I could say FinalCleanup time). For that, I modified the code
> little bit in ORB_init(..) and destroy(..) function of corbaOrb.cc file .
> In this case, all my changes are related with orb_count as two application
> are sharing one static ORB.
> 
> 	It is working fine and no crahses right now because of my changes.
> I'm sending you those changes in attached file.

Your changes are not CORBA compliant. The spec says that when
destroy() returns, the ORB has definitely been destroyed. Your change
breaks that. It sounds like you have no reason to ever call destroy().

The orb_count static variable you are using is intended for use if
omniORB ever supports having more than one ORB active at once, not for
counting references to the current singleton ORB.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --