<div class="gmail_quote"><br><div class="gmail_quote"><div class="im">On Mon, Mar 23, 2009 at 11:17 AM, Duncan Grisby <span dir="ltr"><<a href="mailto:duncan@grisby.org" target="_blank">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;">
Like many things, it's a matter of interpretation. _this is defined in<br>
the C++ mapping specification. In the 1.2 version of the mapping, in<br>
section 4.40.2, it says:</blockquote></div><div><br>Yes exactly this section I had in mind...<br><br> <br></div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
"3. Outside the context of a request invocation on the target object<br>
represented by the servant, it will return the object reference for a<br>
servant that has already been activated, as long as the servant is<br>
not incarnating multiple CORBA objects."<br>
<br>
That's exactly what omniORB does.</blockquote><div></div></div><div><br>I see no point in checking number of activations then... (activations_.size() == 1)<br><br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
However, that section then goes on to say<br>
<br>
"This requires the POA with which the servant was activated to have<br>
been created with the UNIQUE_ID and RETAIN policies. If the POA was<br>
created with the MULTIPLE_ID or NON_RETAIN policies, the<br>
PortableServer::WrongPolicy exception is thrown. The POA is gotten by<br>
invoking _default_POA() on the servant."<br>
<br>
Depending on how you read it, that may or may not override the earlier<br>
bit.</blockquote></div><div><br>I would say second part does not override anything -- it just specifies how that new reference should be created, i.e.:<br>- call _defaultPOA()<br>- check policies<br>- throw or duplicate a reference<br>
<br>though here is some amount of confusion -- which POA they refer to in "This requires the POA with which the servant was activated to have"? if this is POA where object is already activated -- it does not make sense in case if object is activated in multiple POAs. If they mean _defaultPOA() -- they worded it rather bad.<br>
<br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Once a servant is activated in one or more POAs, talking about the<br>
one returned by _default_POA is rather nonsensical.</blockquote></div><div><br>I see nothing nonsensical about this behaviour -- since given object is not a target of the current request and user (instead of properly duplicating existing reference) tries to create new reference without specifying POA -- default one will be used.<br>
<br> </div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> omniORB is definitely not going to change in this<br>
respect. To change it would break an enormous amount of code.<br>
<div></div></blockquote></div><div><br>:-) I knew it... I bet this enormous amount of code has the same problem we do -- if for some reason _this() is called on deactivated object it will be (unexpectedly) activated in the RootPOA.<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>> The question is how many times etherealize() method of ServantManager<br>
> should call _remove_ref() when called with remaining_activations = true? It<br>
> works with one call -- but is it guaranteed?<br>
<br>
</div></div><div class="im">Certainly in omniORB you should call it just once.<br>
</div></blockquote><div><br>Thanks!<br></div></div><br>-- <br>Sincerely yours,<br><font color="#888888">Michael.<br>
</font></div><br>