[omniORB] How to implement the destroy() method of an Iterator?

JHJE (Jan Holst Jensen) jhje at novonordisk.com
Thu Mar 4 10:02:02 GMT 2004


> From: "Sean Ho" <hex at ict.ac.cn>
> Subject: [omniORB] How to implement the destroy() method of an
> 	Iterator?
> To: <omniORB-list at omniorb-support.com>
> Message-ID: <006401c4018f$81be4ce0$6b42a8c0 at hexiong>
> Content-Type: text/plain; charset="gb2312"
> 
> When I want to implement get a large array of Strings, I use 
> an iterator interface for the array.
> 
> The iterator has a destroy() method. How to implement the method?
> 
> Please help! Thanks a million.

Hi Sean.

I assume you mean "how to deactivate the CORBA object and delete the
servant" ? Take a look in the omniORB source at
src/appl/omniNames/BindingIterator_i.h and look at its destroy() method.

Note that the servant is not explicitly deleted in destroy() since a
servant may be shared among multiple CORBA objects. Also note the use of
a POA with explicitly set policies to ensure that the servant is
actually deleted at some point (or at least has its refcount
decremented) after deactivating the CORBA object.

Hope this helps.

Cheers

-- Jan Holst Jensen, Novo Nordisk A/S, Denmark



More information about the omniORB-list mailing list