[omniORB] User exception from preinvoke

Duncan Grisby duncan@grisby.org
Sun Jul 28 22:09:00 2002


On Saturday 27 July, "Arnault Bonafos" wrote:

> We used to throw a UserException with omniORB2 when a client tried to
> contact an object with an invalid id. Now we use omniORB4 and the preinvoke
> mechanism to load objects, the standard says, and so omniORB4 implements it,
> that only CORBA::SystemException or ForwardRequest can be thrown from the
> preinvoke implementation.
> 
> By any chance does someone know of a trick to be able to continue to throw
> user exception in that situation (preinvoke + invalid object id).

Create a servant that does nothing but throw the user exception in
response to all operations, and return that from preinvoke().

Cheers,

Duncan.

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