[omniORB] rebinding after communication failure

Chris Hafey chafey@prowess.com
Tue, 25 May 1999 13:19:50 -0700


At 03:49 PM 5/25/99 -0400, Constantin Adam wrote:
>Hi,
>
>I have the following problem:
>
>  - Client C binds to server S, stores the object reference to S and
>    uses it to invoke operations on S later.
>
>  - C invokes an operation on S.  
>
>  - S fails, and it is being restarted.  
>
>  - C tries to invoke an operation on S using the old object
>    reference.  It fails, even though the server is alive.
>
>
>One solution to this problem is to catch COMM_FAILURE exception and
>rebind to the server. 
>
>Is there a better way to handle this situation, an automatic way to
>deal with it?

You can have S rebind to the same port/object key each time.  See omninames
for an example of how to do this.  If this isn't acceptable, I think you
will have to catch COMM_FAILURE exceptions and rebind.  It sure would be
nice to have a virtual function _rebind() that you could override to rebind
to the server object in case COMM_FAILURE is thrown.  I suppose you could
add this kind of feature since you have the source.

Chris Hafey
Prowess Systems