comp.lang.ada
 help / color / mirror / Atom feed
From: SpamSpamSpam <spam@spam.com>
Subject: Re: Extended comm loss and TCP/IP
Date: 1999/04/15
Date: 1999-04-15T00:00:00+00:00	[thread overview]
Message-ID: <3715C3E5.46C5704B@spam.com> (raw)
In-Reply-To: 37142321.E3B0C8BE@pacbell.net

Hi Mark,

Your problem is CORBA specific, though if ORBExpress raised a COMMS_FAILURE
exception within the client this would help! Theres a book "CORBA Design
Patterns" that
you might consider.  Its on my list..........

For an Ada view :)...

You could make ALL the calls "oneway" and then enter a guarded "select"
which accepts
a callback with the specified delay period or assumes a comms failure, but
this requires alot
of extra work for an exceptional condition the ORB should detect and report.

It would be better if ORBExpress on the client side "polled" the server
while awaiting responses,
raising the COMMS_FAILURE  exception if the ORB server side failed to
respond. After all this
is all meant to be invisible to you (including the TCP/IP networking).
Alternative - Wrap your calls
in tasks, assume comms failure and surprise yourself with a completion
exception !

-------------------------------------------------------------------------------------------

 with CorbaCallXWrap ;
procedure Client is
begin

    -- blar, blar , blar .....
    declare
       CorbaCall : CorbaCallXWrap.Object ; -- kick off call
       RoughTimeout : constant Duration := 600 ;
    begin
       Delay ( RoughTimeout ) ;
       -- Comms fail code here
       -- raise COMMS_FAILURE for example
    exception
       when CorbaCallXWrap.Finished => null ;
    end ;
    -- blar, blar , blar
end Client ;
---------------------------------------------------------------------------------

package CorbaCallXWrap is

    task type Object ;
    Finished : exception ;

end CorbaCallXWrap ;

-----------------------------------------------------------------------------------

package body CorbaCallXWrap is

    -- Dummy real would with in
    procedure CorbaCall is begin null ; end ;

    task body Object is
       Finished : exception ;
    begin
          CorbaCall ;
          raise Finished ;
    end Object ;

end CorbaCallXWrap ;

Cheers Glen






  parent reply	other threads:[~1999-04-15  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-13  0:00 Extended comm loss and TCP/IP Mark McKercher
1999-04-15  0:00 ` tim gilbert
1999-04-15  0:00 ` Corey Ashford
1999-04-15  0:00 ` SpamSpamSpam [this message]
1999-04-15  0:00   ` SpamSpamSpam
1999-04-15  0:00   ` SpamSpamSpam
1999-04-15  0:00   ` SpamSpamSpam
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox