[omniORB] Antw: Re: How to destroy objects

Stefan Walter Stefan.Walter at lisec.com
Wed Jul 3 10:42:15 BST 2013


Dear Duncan,
 
I mean how to release the object reference on client side.
 
Regards,
Stefan

>>> 


Von: Duncan Grisby <duncan at grisby.org>
An:Stefan Walter <Stefan.Walter at lisec.com>
CC:<omniorb-list at omniorb-support.com>
Datum: 03.07.2013 13:38
Betreff: Re: [omniORB] How to destroy objects
On Tue, 2013-07-02 at 15:18 +0200, Stefan Walter wrote:

> how do I destroy objects in omniORB which are not longer required.

Can you clarify what you are talking about destroying?  There are at
least two things you might mean:

1. On the client side, release the object reference.
2. On the server side, deactivate the object and delete the servant.

In CORBA, those two things are totally separate concerns. Client
object
references are reference counted, and the Echo_var holder
automatically
releases its reference when it goes out of scope.

The lifetime of server-side object activations is completely
unaffected
by whether any clients hold object references. If you want to get rid
of
the server-side objects, you must write server-side code to do so. It
is
common to define a destroy() method in your IDL, for example, so a
client can dispose of an object when it has finished with it. To
deactivate an object, you call deactivate_object on the POA it is
activated within.

In more complex situations, you might want to implement some sort of
evictor or timeout that automatically deactivates objects that are no
longer in use. It all depends upon what you want the semantics to be.

Cheers,

Duncan.

-- 
-- Duncan Grisby		 --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --




__________________________________________
The content of this e-mail is confidential and restricted for the use of
the intended recipient only. If you are not the intended recipient
please inform the sender immediately and delete this e-mail and any
attachments. We cannot accept liability for any damage incurred as a
result of software viruses and advise that you carry out your own virus
checks before opening any attachment.

Der Inhalt dieses E-Mails ist vertraulich und für die alleinige
Verwendung durch den beabsichtigten Empfänger bestimmt. Falls Sie nicht
der beabsichtigte Empfänger sind, bitten wir Sie den Absender umgehend
zu informieren und dieses E-Mail samt angeschlossenen Dateien zu
löschen. Wir können keine Haftung für allfällige Schäden übernehmen,
die aufgrund von Software-Viren entstehen, und empfehlen Ihnen, selbst
Virenprüfungen durchzuführen, bevor Sie eine Anlage öffnen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20130703/73e28d4e/attachment.html>


More information about the omniORB-list mailing list