[omniORB] strange behavior of '_this()' method

Michael Kilburn crusader.mike at gmail.com
Tue Mar 31 02:16:45 BST 2009


On Thu, Mar 26, 2009 at 6:31 AM, Nigel Rantor <wiggly at wiggly.org> wrote:

>  All this is confusing and dangerous, even we we asume that there s no
>> logical problems in standard's wording... I would prefer simple and
>> straightforward approach -- if not current, then grab default POA, check
>> policies then return ref or throw.
>>
>
> This seems to be a difference of opinion then. I agree with Duncan's
> interpretation of the standard. Can you explain why the above does not seem
> straightforward to you?


-- see below --

 I do not try to tell that omniORB has to protect me from this, this is
>> standard's job -- just wanted to know why omniORB's behaviour is different
>> from what my eyes see in standard -- clearly there is at least one problem
>> in the document.
>>
>
> As above, I think this is opinion then. You interpret the spec one way.
> Other people interpret it in a different way. How about checking out other
> vendor's implementations/interpretations?
>

Standard should be unambiguous source of truth (if it is not -- this is a
holy scripture then :-) ). Here is the piece from C+ mappings 4.40.2.p3:

Outside the context of a request invocation on the target object represented
by the servant, it will return the object reference for a servant that has
already been activated, as long as the servant is not incarnating multiple
CORBA objects. This requires *[* the POA with which the servant was
activated *]* to have been created with the UNIQUE_ID and RETAIN policies.
If the POA was created with the MULTIPLE_ID or NON_RETAIN policies, the
PortableServer::WrongPolicy exception is thrown. *[*The POA is gotten by
invoking _default_POA() on the servant. *]*

I selected pieces of interest with *[* *]*. If you'd say that this is not
confusing at all and clear as day -- I'll go and check my mental health with
my doctor. Of course, you can have "an interpretation" but it is as useful
as any other interpretation, if text is not clear.

E.g. I am used to reading from right to left :-) therefore for me we are
supposed to get default_POA, check policies and then either throw or
duplicate a reference. And it seems to me way simpler and obvious than
behaviour expressed by omniORB, which is far from being obvious and
predictable at the place where you invoke _this().

The wording used by standard seems to suggest that _defaultPOA() is supposed
to return POA servant was activated in... But no clear details (to me). :(

-- 
Sincerely yours,
Michael.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20090331/6b81a333/attachment.htm


More information about the omniORB-list mailing list