Skip to main content



      Home
Home » Eclipse Projects » Virgo » Listener for bundle consuming services
Listener for bundle consuming services [message #981537] Mon, 12 November 2012 08:52 Go to next message
Eclipse UserFriend
I'm looking for something that is able to listen for event on consumption of services. I know that on gemnini blueprint you can give a listener to a reference declaration (via reference-listener), but I'm looking for something more global. I would like to avoid giving to each reference a listener and instead using something more global.
Anyone could give me some hint on the matter ? I've been looking for listener.
The only thing I managed to use, is a declaration of an EventHandler service. The problem is that EventHandler only listen for registering services, not the consumption of a service.

The idea behind that is to start a bundle that will log registering services (already done) and services been consumed (aka reference bind/unbind in gemini blueprint).

Thanks.

[Updated on: Mon, 12 November 2012 11:12] by Moderator

Re: Listener for bundle consuming services [message #982911 is a reply to message #981537] Tue, 13 November 2012 09:22 Go to previous messageGo to next message
Eclipse UserFriend
You could try using the OSGi service registry hooks. But whether you'd want to is another matter...
Re: Listener for bundle consuming services [message #986057 is a reply to message #982911] Sat, 17 November 2012 17:34 Go to previous messageGo to next message
Eclipse UserFriend
I did some try with the OSGi service registry.
I tried with BundleContext.addServiceListener(), but as EventHandlers, only the registration fire an event. It seem that there is no native event on consumption of services, but only on registration of services.

So, I assume that there is no way to listen for services been consumed by other bundle, expect be directly putting the ReferenceListener on a blueprint (gemini) service consumption configuration.

Off topic: Gemini Blueprint home page seem to be linking to wrong urls (lots of 404)
Re: Listener for bundle consuming services [message #986175 is a reply to message #986057] Mon, 19 November 2012 05:09 Go to previous message
Eclipse UserFriend
Hi Mastah. I was referring to the service registry hooks rather than BundleContext.addServiceListener(). Please consult the OSGi core specification for details (chapter 55 of the OSGi Core 5.0 spec).

(Also the 404's seem to have gone away.)
Previous Topic:Enhancement propal for Integration tests
Next Topic:service lookup fails with plan based deployment
Goto Forum:
  


Current Time: Wed Jul 23 08:51:36 EDT 2025

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

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

Back to the top