[jacorb-developer] _non_existent throws OBJECT_NOT_EXIST instead of returning true

Nick Cross jacorb at goots.org
Fri Sep 28 19:54:36 CEST 2012


Hi,

Please can you retest using the current version and provide a test case. 
If you wanted you can access the code in github and provide a pull request.

Thanks

Nick


On 27/09/12 18:13, Lothar Werzinger wrote:
> Hi,
>
> I am using JacORB version: 2.3.0
>
> I am calling _non_existent and I get a org.omg.CORBA.OBJECT_NOT_EXIST thrown.
>
> org.omg.CORBA.OBJECT_NOT_EXIST: Server-side Exception: null  vmcid: OMG  minor
> code: 2  completed: No
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> 	at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> 	at
> org.jacorb.orb.SystemExceptionHelper.read(SystemExceptionHelper.java:223)
> 	at org.jacorb.orb.ReplyReceiver.getReply(ReplyReceiver.java:321)
> 	at org.jacorb.orb.Delegate.invoke_internal(Delegate.java:1074)
> 	at org.jacorb.orb.Delegate.invoke(Delegate.java:939)
> 	at org.jacorb.orb.Delegate.non_existent(Delegate.java:1532)
> 	at org.omg.CORBA.portable.ObjectImpl._non_existent(ObjectImpl.java:137)
>
>
> AFAIK _non_existent can throw any exception except CORBA.OBJECT_NOT_EXIST,
> where it is supposed to return *true*. So I assume this is a true bug in
> JacORB. Can anyone confirm this?
>
>
> Excerpt from the CORBA standard:
>
> 4.3.5.1 non_existent
> boolean non_existent ();
> The non_existent operation may be used to test whether an object (e.g., a
> proxy object) has been destroyed. It does this without invoking any
> application level operation on the object, and so will never affect the object
> itself. It returns true (rather than raising CORBA::OBJECT_NOT_EXIST) if the
> ORB knows authoritatively that the object does not exist; otherwise, it
> returns false.
> Services that maintain state that includes object references, such as bridges,
> event channels, and base relationship services, might use this operation in
> their “idle time” to sift through object tables for objects that no longer
> exist, deleting them as they go, as a form of garbage collection. In the case
> of proxies, this kind of activity can cascade, such that cleaning up one table
> allows others then to be cleaned up.
> Probing for object non-existence may require contacting the ORB that
> implements the target object. Such an attempt may fail at either the local or
> the remote end. If non- existent cannot make a reliable determination of
> object existence due to failure, it raises an exception in the calling
> application code. This enables the application to distinguish among the true,
> false, and indeterminate cases.
>
>
>
> Thanks in advance!
>
> Lothar
>



More information about the jacorb-developer mailing list