Skip to main content



      Home
Home » Eclipse Projects » Equinox » component enable/disable events?
component enable/disable events? [message #540760] Thu, 17 June 2010 05:37 Go to next message
Eclipse UserFriend
I am currently using ServiceEvents received via the ServiceListener interface to keep track of all (DS)component states in the framework.
All my services are wired by DS.
I'm having the following problem:

I have some components, that don't provide a service (i.e. they have no:
<service>
<provide ...>
</service>
section in their DS-xml).

For these components, I get no ServiceEvents (probably because DS doesn't classify them as services?). Is there any way (at all) to receive the enable/disable component events?
Re: component enable/disable events? [message #540982 is a reply to message #540760] Thu, 17 June 2010 17:02 Go to previous messageGo to next message
Eclipse UserFriend
Your assumptions about ServiceEvents and (DS)components is correct. If a DS component does not provide a service then there will be no service event fired when they are enabled/disabled.

In Helios (Equinox 3.6) we added a new admin service associated with the DS runtime (org.apache.felix.scr.ScrService). We decided to share a common API with the felix DS implementation for this. This ScrService does allow for introspection of the of the DS components. But it does not provide any ability to listen for the enable/disable of DS components. You would have to use a poll/refresh approach instead to track the changes.

HTH
Tom.
Re: component enable/disable events? [message #541021 is a reply to message #540982] Fri, 18 June 2010 02:18 Go to previous message
Eclipse UserFriend
Thanks!
It's nice to see that you're sharing API's with other frameworks.

It looks like this will suit my needs. It's too bad I would have to poll for changes, but it's certainly better than nothing.
Previous Topic:Equinox p2 : check the certificate
Next Topic:Problems with director installing plugins
Goto Forum:
  


Current Time: Sun Jul 06 05:45:17 EDT 2025

Powered by FUDForum. Page generated in 0.13319 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top