[omniORB] How to convert an object reference to a servant?

JHJE (Jan Holst Jensen) jhje at novonordisk.com
Thu Sep 21 22:19:20 BST 2006


> Just a small question though.  I'm using the default POA 
> policy so there should be only POA in this application.  Is 
> there a way to query the object reference for its POA?  If 
> not, I can keep the POA in a global place but just thought 
> that if there was a way to get to it, I wouldn't even have to do that.

Hi Tuyen.

I can't say that I know of a standard way of getting a servant's POA by
querying it. There is _default_POA(), but that returns the root POA and
not necessarily the servant's POA. _default_POA() can be overridden, but
is that a good idea, considering its name ?

I'd say go with the global reference to the POA or keep it in a servant
member variable. Check for instance omniNames - look in
NamingContext_i.cc, search for "nc_poa".

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



More information about the omniORB-list mailing list