Fwd: Re: [omniORB] about corba object destroy

Slava Garelin garelin@ukr.net
Sun, 24 Mar 2002 19:30:57 +0200


On Sunday 24 March 2002 19:02, zhang ji wrote:
> Hi Slava,
>
> Thanks for your email reply.
> My questions is how to transform the Poa to class
> test_impl?
> As my understanding, for destroy() there are no input
> parameter for Poa, so we need to hold the Poa as one
> of the class member for test_impl like below:
>
> PortableServer::POA* Poa;

You can use global variable for instance.

> but I don't know what the destroy() will affect the
> Poa,if POA also holds other CORBA object, whether the
> other CORBA objects will be affected for the destroy()
> call?

Poa stored map for pairs objectID<->servant pointer (test_impl)
and Poa->deactivate_object() will remove map row for that instance and
call _remove_ref() for servant pointer (if default Policyes used).
If your servant inherited PortableServer_RefCountServantBase and reference
counter is 0, sevant to be removed after all requests ending.

--
Slava Garelin