[omniORB] How to get file descriptor from a CORBA request?

Duncan Grisby duncan at grisby.org
Fri Sep 29 18:35:36 BST 2006


On Monday 25 September, Tuyen Chau wrote:

> Are you saying that the client should use a clientSendRequest
> interceptor to add a service context, and the server should use a
> serverReceiveRequest interceptor to read the context?  The part that I
> don't understand is that if I'm in a CORBA request, say,
> 
>     Account BankManager_i::openAccount(String name) {
>     }
> 
> How do I get the service context to figure out which client this is?
> Do I need to somehow store the service context somewhere in the
> servant object first when I'm in the interceptor, and then when I'm in
> the CORBA request, I'll just read the context back from the object?

The normal approach is to put something in per-thread state. You don't
want to put it on the servant object because multiple clients could call
a single servant concurrently.

Cheers,

Duncan.

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



More information about the omniORB-list mailing list