[Ace-users] [tao-users] Notification Service: Lifetime of EventChannels

Wernke zur Borg wernke.zur.borg at vega.de
Thu Jan 17 08:00:48 CST 2008


 
> 
> Hello Wernke,
> 
> Wernke zur Borg wrote:
> > Dear all,
> > 
> > can somebody enlighten me on the concept of EventChannels in the
> > Notification Service please. 
> > 
> > I can create an EventChannel with the EventChannelFactory 
> but I do not
> > see any method to delete it. Are EventChannels supposed to live
> > throughout the lifetime of the Notification Service? 
> 
> The EventChannel interface has a destroy() operation
> (which it inherits from CosEventChannelAdmin::EventChannel).
> 
> According to the CosEvent Service specification:
> 
> > The destroy operation destroys the event channel. 
> Destroying an event channel
> > destroys all ConsumerAdmin and SupplierAdmin objects that 
> were created via
> > that channel. Destruction of a ConsumerAdmin or 
> SupplierAdmin object causes
> > the implementation to invoke the disconnect operation on 
> all proxies that were
> > created via that ConsumerAdmin or SupplierAdmin object.
> 
> The above still holds true of the Notification Service.
> 
> > I am assuming a long living Notification Service, similar 
> to the Naming
> > Service, with applications starting and stopping. But with 
> the Naming
> > Service you can rebind() an already existing name. Is an application
> > supposed to persistently store the channelId and re-use the channels
> > accross process lifetime? To me this seems to be the only 
> way to prevent
> > event channel leakage in the notification service.
> 
> To re-use event channels, applications could:
> 
> - Persistently store channel ids and use 
> EventChannelFactory::get_event_channel()
> to obtain the object reference of a particular event channel
> (as you suggested).
> 
> - Persistently store event channel object references directly
> (e.g., use object_to_string() and write the string to a data
> base or file), thereby associating each event channel with a
> given file name or database entry.
> 
> - Bind event channel object references in the Naming Service and
> associate each event channel with a given name, where they can
> be retrieved by other application entities.
> 
> I have seen all of these mechanisms used.
> 
> I hope that helps.
> 
> Steve


Thanks a lot Steve, that answered all my current questions!

Although I knew about it, I overlooked the inheritance of
CosNotifyChannelAdmin::EventChannel from
CosEventChannelAdmin::EventChannel in this particular case. The standard
is sometimes hard to read...

Cheers,
Wernke



More information about the Ace-users mailing list