[omniORB] dispose or not dispose, that's the quest
Ralf Walther
rw@neurotec.de
Mon, 28 Sep 98 18:23:00 +
Hi CORBAholics,
did you ever have problems with object construction or destruction?
Imagine following situation:
You have 20 different object classes, who don't know anything about
CORBA.
In the next step you design for every class (for example class A) a base
class
A_Interface_i, which inherits from a skeleton class _sk_A_Interface.
In this situation you have a low level class layer without CORBA at all
and a CORBA interface layer, which delegates all requests to the low
level methods.
_sk_A_Interface (idl: interface A_Interface { ...} )
^
|
A_Interface_i (this class delegates every request to appropriate
methods in A)
^
|
A (class A, which doesn' have any CORBA knowledge)
PROBLEM1: Every time a new Object of class A is created, it should be
registered to the BOA
(no problem, can be done in the constructor of A_Interface_i)
BUT on every object the _dispose() method should be called
instead of delete.
Obviously, it's not allowed to call _dispose in the
~A_Interface_i().
The consequence is: Every CORBA object have to be constructed
with new AND
the low level layer should handle CORBA
objects via _dispose()
(not so pretty, isn't it?)
PROBLEM2: Temporary objects have to be created with new, too. So, the
nice functionality
of object destruction via 'out of scope' is not available any
more.
I think other ORB's handle this internaly. But it should exist an
acceptable solution for omniORB, too?
Does anybody have a good idea? Think of a pile of object classes, which
have to be adjusted
to this omniORB mechanism.
Regards
Ralf Walther
-----------------------------
Neurotec Hochtechnologie GmbH
Intelligente Systeme
Ralf Walther
Ehlerstrasse 15
D-88046 Friedrichshafen
Tel: (+49) 7541 / 3012-153
Fax: (+49) 7541 / 33013
Email: rw@neurotec.de
URL: http://www.neurotec.de