[omniORB] resolve() and _remote_non_existent()
smitha smi
smithatv at gmail.com
Wed Dec 12 13:20:20 GMT 2012
Hi,
Below is the sequence of calls i make.
(1) o_ObjRef = rootContext->resolve(name);
This call is success as it is not throwing any exception.
(2)
try {
ServerReady_var l_readyObjRef = ServerReady::_narrow(o_ObjRef);
// Note: _is_nil call does not result in IPC
if (l_readyObjRef->_is_nil())
{
printf(" sink w/ server _narrow returned NIL");
break;
}
omniORB::setClientCallTimeout(
l_readyObjRef,15);
if(l_readyObjRef->_remote_non_existent())
{
printf("\n _remote_non_existent returned true\n");
}
}
catch (...)
{
printf("\n _remote_non_existent() threw an exception\n");
}
Result of execution of this code is : "_remote_non_existent() threw an
exception"
Below are my concerns
(a) What is the difference between resolve() and _remote_non_existent() ?
(b) After successfully getting the object reference by calling resolve() ,
why show we make call to remote_non_existent() ?
(c) By searching i got to the below info
_CORBA_Boolean _remote_non_existent();
1.199 + // Contacts to object implementation to determine whether it exists.
1.200 + // It is possible that the implementation is a local servant of
course.
1.201 + // Returns 0 if the object exists, or 1 or throws OBJECT_NOT_EXIST
if
1.202 + // not. May throw other system exceptions.
1.203 + // This function is thread-safe.
If Object was not existing, then resolve() it self should have thrown
exception. but , it did not throw any exception Why?
Fact is that , Before this code gets executed.. Object is been registered
with Naming Service.
Please help me understand , what is happening.
Thanks,
Smitha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20121212/f4a5e9eb/attachment.html>
More information about the omniORB-list
mailing list