<div>Hi,</div>
<div> </div>
<div>Thanks for the info.</div>
<div> </div>
<div>Below are few more concerns.</div>
<div> </div>
<div>(1)</div>
<div>What exactly is the difference between </div>
<div> </div>
<div> _remote_non_existent and _non_existent ?</div>
<div> </div>
<div>(2)</div>
<div> We have been using : _remote_non_existent: from past many years and only now we are seeing the issue.</div>
<div> </div>
<div>In there any possibility that, _remote_non_existent will throw an exception and _non_existent will return false?</div>
<div> </div>
<div>(3)</div>
<div> As it involves lot of testing and jestification we need to give for replacing _remote_non_existent() with _non_existent() we need to prove that (2) is there any way i can recreate an issue suce that "_remote_non_existent() " will throw an exception and _non_existent() will return false.?</div>
<div> </div>
<div>Please help us in this regard.</div>
<div> </div>
<div>Thanks,</div>
<div>Smitha</div>
<div> </div>
<div><br><br> </div>
<div class="gmail_quote">On Fri, Dec 21, 2012 at 7:52 PM, Duncan Grisby <span dir="ltr"><<a href="mailto:duncan@grisby.org" target="_blank">duncan@grisby.org</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div>On Wed, 2012-12-12 at 18:50 +0530, smitha smi wrote:<br><br>> Below is the sequence of calls i make.<br>><br>> (1) o_ObjRef = rootContext->resolve(name);<br>><br>> This call is success as it is not throwing any exception.<br>
<br></div>That call talks to omniNames and resolves the name to an object<br>reference. omniNames doesn't know or care whether the object reference<br>is valid.<br>
<div><br>> try {<br>><br>> ServerReady_var l_readyObjRef = ServerReady::_narrow(o_ObjRef);<br><br></div>That uses static knowledge to compare the expected interface with the<br>interface details stored in the object reference. In this case, it does<br>
not need to do a remote call.<br>
<div><br>> // Note: _is_nil call does not result in IPC<br>><br>> if (l_readyObjRef->_is_nil())<br><br></div>_is_nil() never does a remote call. It is comparing the object reference<br>to nil, which is a purely local operation. An object reference is only<br>
nil if it is nil. It has nothing to do with whether the object exists or<br>not.<br><br>[...]<br>> if(l_readyObjRef->_remote_non_existent())<br><br>You shouldn't call _remote_non_existent -- that is an internal omniORB<br>
implementation detail. You should call _non_existent, which is the<br>standard method.<br><br>[...]<br>
<div>> catch (...)<br>> {<br>> printf("\n _remote_non_existent() threw an exception\n");<br>> }<br><br></div>[...]<br>
<div>> Result of execution of this code is : "_remote_non_existent() threw an<br>> exception"<br><br></div>If you catch CORBA::SystemException, you'll be able to call _name() on<br>it and you'll see what the exception was.<br>
<br>_non_existent contacts the server and asks if the object exists. It can<br>throw system exceptions like CORBA::TRANSIENT or CORBA::COMM_FAILURE if<br>the server cannot be contacted. If the server can be contacted but the<br>
object does not exist, _non_existent will return true. omniORB's<br>internal _remote_non_existent will throw CORBA::OBJECT_NOT_EXIST.<br>
<div><br><br>> (a) What is the difference between resolve() and<br>> _remote_non_existent() ?<br><br></div>They are totally unrelated. resolve() is an operation on the naming<br>service that looks up a name. _non_existent is about checking the<br>
existence of an object.<br>
<div><br>> (b) After successfully getting the object reference by calling<br>> resolve() , why show we make call to remote_non_existent() ?<br><br></div>You shouldn't call _remote_non_existent! You could choose to call<br>
_non_existent if you want to make an initial check for object existence.<br><br>[...]<br>
<div>> If Object was not existing, then resolve() it self should have thrown<br>> exception. but , it did not throw any exception Why?<br><br></div>resolve() looks up an object in the naming service. The naming service<br>
doesn't care at all whether the object references it contains are valid<br>or not.<br><br>Regards,<br><br>Duncan.<br><span><font color="#888888"><br>--<br> -- Duncan Grisby --<br> -- <a href="mailto:duncan@grisby.org" target="_blank">duncan@grisby.org</a> --<br>
-- <a href="http://www.grisby.org/" target="_blank">http://www.grisby.org</a> --<br><br><br></font></span></blockquote></div><br>