[omniORB] question on : is_nil()

Duncan Grisby duncan at grisby.org
Mon Oct 29 10:52:53 GMT 2012


On Fri, 2012-10-26 at 09:25 +0530, smitha smi wrote:

> I have a code sequence as below
> (1)
> 
> getObjectRef<dbServer, dbServer_var>(
> iv_dbServRef,
> FWDB_SERVER_OBJ);

You haven't told us what this function is doing, so I'll have to
guess... Presumably at this stage it has returned a valid object
reference.

[...]
> CORBA::ORB_var orb = CORBA::ORB_init(l_argc,l_argv);
> orb->shutdown(true);
> orb->destroy();

[...]
> is iv_dbServRef still holds the reference?

Yes.

> i tried using CORBA::is_nil( iv_dbServRef )
> 
> this call returns false.

That is correct.

> My question is , is it not suppose to return true?

Why would it?  Shutting down the ORB doesn't magically turn all your
object references into nil. If you try to invoke an operation on the
object reference, you'll get a CORBA::BAD_INV_ORDER exception telling
you that you can't use it once the ORB is shut down.

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --





More information about the omniORB-list mailing list