[omniORB] Issues with persistent objects

Duncan Grisby duncan at grisby.org
Fri Feb 4 18:12:27 GMT 2011


On Fri, 2011-01-28 at 09:53 +0530, anirudh nair wrote:

[...]
> Now, when the client calls a method after a server restart,
> a COMM_FAILURE exception
> is raised. The interesting thing here is that when the client catches
> the exception and issues
> another call to server, the server method is executed.
> 
> So, basically only the first call after the server restart raises an
> exception. All calls henceforth 
> works fine.

That is intentional. What happens is that the client does not notice
that the connection has broken until after it has sent its request. You
snipped the bit of the omniORB log that shows the exception details but
you'll see that it has a completion status of COMPLETION_MAYBE. i.e. the
ORB knows it did not get a reply, but it does not know whether or not
the server received the call. The application might need to know that,
so the COMM_FAILURE exception is thrown.

If it had been the case that the call parameters were quite large, the
client may have received the connection error while it was transmitting
data. In that case, it would have known the completion status was
COMPLETED_NO, and it would have automatically retried the call with a
new connection, since it would know that was definitely safe to do.

If you want to automatically retry without explicitly doing so around
each call, you can register a COMM_FAILURE exception handler that
retries once. See 

http://omniorb.sourceforge.net/omni41/omniORB/omniORB004.html#toc25

Cheers,

Duncan.

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





More information about the omniORB-list mailing list