[omniORB] RE: interceptors usage again

JHJE (Jan Holst Jensen) jhje@novonordisk.com
Thu Jan 16 14:13:02 2003


With the risk of being slightly off-topic since the answers are not fully
omniORB-specific...

> - can we invoke operations on generic local/remote objects from within
> interceptor code ?

Don't know about any omniORB-specific issues, but it seems rather silly to
me if you could not use other CORBA objects in interceptors for e.g. user
validation. It works in MT_DORB (ORB for Object Pascal) and I can hardly
imagine that omniORB would be less functional.

> - can we throw system/user exceptions from within interceptor code ?

Yup. An access check that fails will look like this in MT_DORB (intercepting
a request):

    env.set_exception(SystemException.Create_type(st_NO_PERMISSION));
    result := INVOKE_ABORT;

Guess it must be similar in C++.

>- are we allowed to play (read/update) with call parameters as exposed by
>the giopStream ? If yes, can anyone post an example of it ?

MT_DORB has an example of intercepting parameters and encrypting/decrypting
them on the fly. If reading Pascal code does not put you off :-), download
MT_DORB from http://www.m-g.ru/index/lang/eng/parent_id/30/level/1 and look
at the /demo/intercept/Server.dpr code.

Cheers

-- Jan Holst Jensen, Novo Nordisk A/S, Denmark