[omniORB] Explicit object activation

Duncan Grisby duncan at grisby.org
Thu May 28 12:06:35 BST 2009


On Wednesday 20 May, "Ghassemi, Omeed" wrote:

> I have a question about explicit object activation with a child poa.
> 
> I am using activate_object() on this poa to activate the servant and then
> _this() on the servant to get the object reference.
> 
> I understand that using _this() implicity leads to ambiguity with which poa is
> being used as it always goes to the root poa.

There is only some ambiguity if you don't implement _default_POA() to
return your POA. If you don't implement _default_POA, omniORB will still
return an object reference for your explicit activation in your child
POA; some other ORBs will activate it again in the Root POA.

> However, seeing that the servant has been activated with the child poa, I am
> assuming this is not an issue. What I don’t understand is how does it know to
> go to the child poa to find the object details? Does it search through all the
> active object maps? Does it even need to go back to the poa to get the
> reference? Or is it actually going to the root poa? If it’s the latter then
> how can it find the object details?

omniORB knows which POA(s) your servant is activated in, so it doesn't
need to go searching for it or anything. It just goes directly to it.

> I basically need to know this as I want to make sure my object will acting
> according to the policies in the child poa.

Implement _default_POA() then you're guaranteed to be safe in calling
_this(), whatever CORBA implementation you use.

Cheers,

Duncan.

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



More information about the omniORB-list mailing list