[omniORB] COMM_FAILURE vs TRANSIENT in omniorb v3

Neil Pilgrim omniorb@kepier.clara.net
Wed Oct 2 00:54:01 2002


I've just come across an interesting situation using omni3 (debian
packages, v3.0.4.1-8). The following code leads to "SystemException:
COMM_FAILURE" being output. The object reference (obj) is derived from a
stringified ior, checked to be non-nil, and I know that the server
containing that reference is no longer running. According to the book by
Henning & Vinoski, COMM_FAILURE is appropriate only if failure occurs in
the middle of an operation, whereas TRANSIENT is used when the server
cannot be contacted at all - which should be the case here AFAICT.

----
CORBA::Object_var obj = ...;
try
{
  if (obj->_non_existent()) do_something();
}
catch (CORBA::TRANSIENT const &)
{
  cout << "transient" << endl;
}
catch (CORBA::SystemException const &e)
{
  cout << "SystemException: " << e << endl;
}
catch (...)
{
  cout << "oh dear" << endl;
}
----

Could someone comment on this analysis, ie. whether this is a bug in
omniorb or I have misinterpreted the literature.

Thanks,

-- 
Neil
PS Sorry if this gets posted twice; seemed to be rejected before :(