Re[2]: [omniORB] ServantBase or RefCountServantBase possible bug in omniidl?

David Scott djs@uk.research.att.com
Fri, 14 Jul 2000 15:07:54 +0100 (BST)


On Fri, 14 Jul 2000, Alex Shabarshoff wrote:

> ...
> Ok. But i'm using tie interfaces. 
> ...
> 
> The question was *should* omniidl generate inheritance from
> ServantBase or from RefCountServantBase?
>
According to the spec, a C++ tie interface class for an IDL interface A
should derive from POA_A which should derive from ServantBase.

I think omniidl's behaviour is correct.

However this does mean that you must make sure not to delete the object
while it is still active. For reference, the tie template example in
src/examples/echo/eg3_tieimpl.cc constructs the object on the stack where
it will not be deleted until after the ORB has been shutdown.

Alternatively you could perhaps construct your own tie template which
added inheritance from the mixin class RefCountServantBase.

-- 
  Dave Scott, Research Engineer, AT&T Laboratories Cambridge UK