[omniORB] omniORB Interceptor
Duncan Grisby
duncan at grisby.org
Thu Mar 3 12:39:48 GMT 2005
On Tuesday 15 February, Serguei Kolos wrote:
> The CORBA portable server side interceptor is able to get the target
> object repository ID (as ServerRequestInfo :
> RequestInfo::target_most_derived_interface). Is it possible to get
> this information inside the omniORB specific serverReceiveRequest
> interceptor?
Not especially easily. The interceptor runs before omniORB has figured
out how to invoke on the object, and therefore before it knows if
there's a servant for it at all. Look at handleRequest() in GIOP_S.cc.
In the simple case of an activated object, you can just duplicate the
code that looks the object key up in the object table, then access the
servant through the omniLocalIdentity object, and call the servant's
_mostDerivedRepoId method.
If you have a POA with a ServantLocator, for example, it's not until
preinvoke has been called that you have the servant available to ask it
what its repoID is. Perhaps omniORB needs to grow another interception
point at that stage. The difficulty is that you want to be able to do
things like reject or forward calls at the interceptor, and it's a bit
late if you've already activated a servant for the call.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list