[omniORB] Interceptors and exceptions (python)
Duncan Grisby
duncan at grisby.org
Tue Apr 18 16:45:24 BST 2006
On Saturday 15 April, "Sander Steffann" wrote:
> On the server side, I would like to raise an exception (NO_PERMISSION)
> when an error occurs in processing the received service contexts
> (ServerReceiveRequest), and I would like to add a service context to
> that exception (ServerSendException).
>
> Since these are two different interceptors, what would be the best way
> to add the service context?
>
> I was thinking about storing the data in thread-specific storage in
> the ServerReceiveRequest interceptor, and then using that data from
> the ServerSendException interceptor. I think this might work, provided
> both interceptors are called in the same thread, and that I can be
> sure that multiple calls are not handled interleaved on that
> thread. Can I make these assumptions?
Yes, that should work fine, and I think it's the best way to do it.
It's always the same thread that receives the request, processes it, and
marshals the reply, and that thread doesn't do anything else along the
way.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list