[omniORB] Question about object ID

Patrick Hubert hubert@discreet.com
Wed, 4 Apr 2001 08:53:58 -0400 (EDT)



Dear omniORB list,


I am currently using OmniORB300.

In my current work, it seemed that the use a default servant was the most
efficient route to take.

But alas, in OmniORB300 the PortableServer::Current interface is not
implemented. Since my servant need to know the ObjectID of the object they
are incarnating (is that even a verb?) to do their work, I had to find a
workaround.

I instead went with a POA_PortableServer::ServantLocator that would create
servants as needed, passing the ObjectID as a parameter in the
constructor in the 'preinvoke' call. The servant being destroyed in the
'postinvoke' call of the locator. I am a bit unhappy with the fact that I
keep creating and destroying servants for every request... Using the
evictor pattern would be a potential optimisation...


My question being: is that a correct 'workaround'?

Updating to OmniORB303 is unfortunately not an option yet...


Thanks

Patrick


--
Patrick Hubert
Work: +1.514.954.7233
Fax : +1.514.393.0110