[omniORB] Orbix's registerIOCallback feature
Peter Bauer
PBHD@compuserve.com
Wed, 29 Sep 1999 16:24:06 -0400
Hello,
when porting some Orbix-stuff to omniORB, one may encounter =
several problems. :-=3D)
One of them is the CORBA(Orbix).registerIOCallback-feature:
Orbix maintains for each Addressspace (ASP) <-> ASP connection
one TCP-Connection, which can be identified in the local =
process by its int filedescriptor (fd). Applications can
register for open and close of such fd's, therefore being
able to monitor startup and shutdown of remote ASP's (or, =
more precise, the connect and disconnect of remote ASP's to
the local ASP). On the other hand, you can query an orbix-
proxy for its fd, an therefore, you are able to do some =
housekeeping on objects of an remote ASP by monitoring
the closeage of it's fd (For example, you may have opened
a database-session on behalf of a remote ASP and want to
throw away that session again if that ASP dies (=3D=3Ddisconnects)
without the needs for implementing some alive-check mechanism).
So, my question is: is there a mechanism available in omniORB, =
which yields the same functionality? Currently, I think no, but
with the following changes, maybe:
In omniORB, the connection between ASP's are shutdown and
reopenend as they are needed, but this feature can be disabled
by setting idleConnectionScanPeriod to infinite (Would this =
affect omniORB::callTimeOutPeriod? Dont hope so). =
Then, each time a connection is started or shutdown, one
could call a user-callback. But for my opinion, the parameter
passed to the user callback should not be the socket-fd, but
the rope or rope-id, because one Rope can have more than one
Socket-connection (theoretically). When is a Rope deleted?
When the last connection to the remote ASP is broken? When
this is true, a Rope-Id would be the perfect replacement for
the fd (the Rope-Pointer would not, because the pointer could
be allocated for another Rope to annother ASP), and the Rope =
constructor and destructor would be the place to put in the
invocation of the user-callback.
Could somebody please comment on that???
Gruss Peter Bauer