[omniORB] RE: omniORB-list Digest, Vol 5, Issue 12
Jelle
jelle at defekt.nl
Wed Sep 17 01:52:15 BST 2003
Quoting Jelle (jelle at defekt.nl):
> Quoting JHJE (Jan Holst Jensen) (jhje at novonordisk.com):
> > > I'm confused regarding the use of CORBA::release() and object lifespan
> >
> > Well, haven't we all been there :-) ?
>
> :-)
Actually, I've found out some email that answers some of my questions:
http://www.orbacus.com/pipermail/ob-users/2002-March/021316.html
> > In the "remove()" or "destroy()" method, the servant must deactivate the
> > CORBA object(s) that point to the servant by doing something like this (Java
> > server code):
> >
> > byte[] oid = rootPOA.servant_to_id(this);
> > rootPOA.deactivate_object(oid);
> >
> > When all POA references to the servant are gone, and no more invocations are
> > in progress on that servant, the ORB is free to delete the servant (whenever
> > it sees fit - depends on the ORB implementation).
>
> Does this apply to *every* constructed (new Hello_i()) servant (so not
> only the HelloFactory(Server) servant, but also the Hello servant).
>
> And, finally ;-), does this have anything to do with the
> RefCountServantBase class?
If I am not mistaken, every Servant that inherits RefCountServantBase
and then uses rootPOA.deactivate_object() in a "destroy" method gets
destructed automatically, right?
The following questions are still unanswered.
> And does this also mean that every servant needs to be registered to the
> rootPOA or something?
> And should I pass the rootPOA from servant to servant or is there
> a more convenient way to do this? (In the visibroker example I saw
> a method _default_POA())
Thanks a lot for your help again,
bye Jelle
More information about the omniORB-list
mailing list