Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » component enable/disable events?
component enable/disable events? [message #540760] Thu, 17 June 2010 09:37 Go to next message
erik  is currently offline erik Friend
Messages: 2
Registered: June 2010
Junior Member
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 21:02 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 503
Registered: July 2009
Senior Member
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 06:18 Go to previous message
erik  is currently offline erik Friend
Messages: 2
Registered: June 2010
Junior Member
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: Fri Apr 19 00:11:31 GMT 2024

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

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

Back to the top