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

Steve Osselton steve.osselton at prismtech.com
Fri Sep 28 16:22:28 CEST 2012


Is definitely a bug. The implementation should catch the exception and
return true.

On 27 September 2012 18:13, Lothar Werzinger <lothar at tradescape.biz> 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
> --
> Lothar Werzinger
> Principal Architect
> Tradescape, Inc. - Enabling Efficient Digital Marketplaces
> +1-650-931-6719 (direct)
> +1-800-687-6088 (main)
> +1-800-918-3449 (fax)
> lothar at tradescape.biz
> http://www.tradescape.biz
>
> This message and any attachment (the "message") is intended solely for the
> addressees and is confidential. If you receive this message by mistake,
> please delete it and notify the sender immediately. Any use not in
> accordance with its purpose, any out-spread or disclosure, either as a
> whole
> or partially, is prohibited except with formal approval. Internet cannot
> guarantee the integrity of this message, therefore Tradescape will not be
> liable for the message if modified.
>
> _______________________________________________
> jacorb-developer maillist  -
> jacorb-developer at lists.spline.inf.fu-berlin.de
> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
>



-- 
CORBA/Software Defined Radio Delivery Manager
PrismTech Chief Architect

e-mail:  steve.osselton at prismtech.com
tele     +44-191-497-9905
web:     www.prismtech.com

PrismTech is a global leader in standards-based, performance-critical
middleware.  Our products enable our OEM, Systems Integrator, and
End User customers to build and optimize high-performance systems
primarily for Mil/Aero, Communications, Industrial, and Financial Markets.


More information about the jacorb-developer mailing list