[omniORB] INV_OBJREF instead of OBJECT_NOT_EXIST
Matthew N. White
matthew.white@marconi.com
Mon, 12 Nov 2001 14:40:06 -0500
Hi,
I'm using the omniNotify 1.1 service with omniORB3.0.4. In a client
I'm trying to destroy an event channel in the notification service. The
object reference for the event channel may be stale (already destroyed
by another client), so I'm catching the OBJECT_NOT_EXIST exception. The
code is as follows:
...
try{
CosNA::EventChannel_var channel = CosNA::EventChannel::_nil();
channel = _eventchannelhandles[i];
_eventchannelhandles[i] = CosNA::EventChannel::_nil(); //force
release
if(!CORBA::is_nil(channel))
channel->destroy();
}catch(const CORBA::Exception& e){
const CORBA::SystemException * se;
if((se = CORBA::OBJECT_NOT_EXIST::_downcast(&e)) != 0){
if(_verbose) cout << "destroyChannels: caught OBJECT_NOT_EXIST
exception" << endl;
...
The problem is that sometimes an INV_OBJREF is thrown, and I don't
expect this, only a OBJECT_NOT_EXIST exception. I didn't have this
problem with omniORB 3.0.3 and omniNotify 1.1beta. In Henning and
Vinoski, p. 315 under the INV_OBJREF section, it says, "Some ORBs
incorrectly raise this exception when they should be raising
OBJECT_NOT_EXIST." Could this be the case for omniORB, and has anyone
else had this problem?
Thanks,
Matt W.