[omniNotify] Deleting a StructuredPushConsumer
Frederic Prin
frederic.prin at silvaco.com
Fri Jun 11 16:51:13 BST 2004
Hi,
I get an error message when deleting a StructuredPushConsumer instance
that I create like this:
event_observer = new MyObserver ;
/* My observer inherit from StructuredPushConsumer and overide the
push_structured_event method*/
CosNotifyComm::StructuredPushConsumer_var push_consumer ;
CosNotifyChannelAdmin::StructuredProxyPushSupplier_var
structured_proxy ;
push_consumer = eventObserver->_this() ;
structured_proxy =
{ /* pseudo code */
generic_proxy = consumer_admin
->obtain_notification_push_supplier(
CosNotifyChannelAdmin::STRUCTURED_EVENT,
proxy_id ) ;
structured_proxy =
CosNotifyChannelAdmin::StructuredProxyPushSupplier::_narrow(
generic_proxy ) ;
structured_proxy->connect_structured_push_consumer( pushConsumer ) ;
Return structured_proxy;
}
/* Store all objects in *_Var vector */
mEventObserverConsumerList.push_back(
push_consumer ) ;
mEventObserverProxyList.push_back(
structured_proxy ) ;
mEventObserverPtrList.push_back( eventObserver )
;
/* From here I receive events successfully */
Then before the ORB is shutdown I do not need ne more this consumer so I
remove it like this:
(StructuredPushConsumer s are stored in vector of
StructuredPushConsumer_Var)
mEventObserverConsumerList[i]->disconnect_structured_push_consumer() ;
mEventObserverProxyList[i]->remove_all_filters();
mEventObserverProxyList[i]->disconnect_structured_push_supplier() ;
mEventObserverConsumerList.erase(
mEventObserverConsumerList.begin() + i ) ;
mEventObserverProxyList.erase(
mEventObserverProxyList.begin() + i ) ;
Then I do not need this event handler anymore, so I
delete event_observer ;
When the delete is executed I get this error message:
omniORB: ERROR -- A servant has been deleted that is still
activated.
id: root<33554432> (active)
Is someone get an idea why I get this message ?
I try some CORBA::release on mEventObserverConsumerList[i] but it fails
(ref count becomes <0)
If I delete event_observer after my main servant is destroyed and orb is
shutdown, it works.
Is it forbiden to delete StructuredPushConsumer instance while the ORB
is running (not shutdown) ?
Thanks for your help
Fred
(
Frédéric Prin )
Senior Software Engineer /
S I L V A C O (
Grenoble REsearch CEnter \
Tel 04 56 38 10 33 )
__________________________/___
/__/__/__/__/__/__/__/__/__/__/
/__/__/__/__/__/__/__/__/_____/
/__/__/__/__/__/__/__/__/__/__/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omninotify-list/attachments/20040611/ee576bc2/attachment.htm
More information about the omninotify-list
mailing list