<br><br><div class="gmail_quote">On Wed, Mar 25, 2009 at 6:28 AM, Duncan Grisby <span dir="ltr"><<a href="mailto:duncan@grisby.org">duncan@grisby.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">> I see no point in checking number of activations then... (activations_.size()<br>
> == 1)<br>
<br>
</div>That's essential for the "as long as the servant is not incarnating<br>
multiple CORBA objects" bit.<br>
<div class="im"></div></blockquote><div><br>Hmm... According to my understanding of terminology "CORBA object" is a virtual entity described by an interface in idl file. Servant instance is an incarnation of CORBA object (i.e. it implements given interface). When servant implements multiple interfaces -- this is what called "incarnates multiple CORBA objects". I.e. number of activations have nothing to do with it. But I could be wrong, of course...<br>
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
</div>I think the confusion is around the intention of the _this() method.<br>
_this() is not intended to return *a* reference corresponding to a<br>
servant, it's intended to return *the* reference corresponding to a<br>
servant. i.e. the one single reference that makes sense for a servant.<br>
If a servant is activated once in one POA, that is clearly the reference<br>
you want. If a servant is activated multiple times (regardless of<br>
whether in just one POA or multiple POAs), there is no single correct<br>
reference to return, so _this() throws an exception.<br>
<br>
It's only in the case that a servant is not activated at all that the<br>
question of "which POA?" arises. If you have to ask "which POA?", then<br>
the answer is the one returned by _default_POA(). That's why it's called<br>
default -- it's the one to use if you don't have any other POA to<br>
choose.<br>
<div class="im"></div></blockquote><div><br>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.<br>
<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
> :-) I knew it... I bet this enormous amount of code has the same problem we do<br>
> -- if for some reason _this() is called on deactivated object it will be<br>
> (unexpectedly) activated in the RootPOA.<br>
<br>
</div>Yes, but it's not omniORB's job to protect you from all bugs in<br>
application code. There is plenty of code out there that looks just like<br>
the simple example I've used above, and that is trivially correct.<br>
</blockquote><div><br>Majority of code probably does not create additional POAs (no POAs -- no problems). <br>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.<br>
</div></div><br>-- <br>Sincerely yours,<br>Michael.<br>