Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » [Blueprint reference-list] Retrieve ServiceReference with reference-listener(I have a problem when I attempt to retrieve a ServiceReference.)
[Blueprint reference-list] Retrieve ServiceReference with reference-listener [message #1060704] Tue, 28 May 2013 06:57 Go to next message
Maxime Bossard is currently offline Maxime BossardFriend
Messages: 2
Registered: May 2013
Junior Member
First, I use Gemini Blueprint 1.0.2 in a virgo 3.6.1 environment (with equinox 3.8.1)
I use the blueprint element to declare my services like this :
<blueprint xmlns="www.osgi.org/xmlns/blueprint/v1.0.0" 
           xsi:schemaLocation="www.osgi.org/xmlns/blueprint/v1.0.0 www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"
           default-activation="lazy">


If I use a blueprint simple
<reference interface="IInterface" >
with a nested
<reference-listener bind-method="onBind" />
, I am able to declare one of the two following methods :
public void onBind(final IInterface interface) {...}
public void onBind(final ServiceReference reference) {...}


with IInterface the Interface representing the service referenced.

This methods are correctly called by the framework when an IInterface service is registered.

But with the blueprint
<reference-list interface="IInterface" >
declaration, I am not able to get it working. I declare the same both methods but only the first (with IInterface parameter) works. To workaround the problem, I can cast the IInterface object to org.eclipse.gemini.blueprint.service.importer.ImportedOsgiServiceProxy which is one of the Interface the proxied object implements. This allow me for the moment to get the ServiceReference.

I tried to change the signature of the method with the following paramers : Collection<ServiceReference>, Set<ServiceReference>, SortedSet<ServiceReference>, but nothing works.
Can someone help me with this problem ? Is it a bug ? Or am I misunderstanding the documentation somewhere ?

Thanks for your help.

Maxime.
Re: [Blueprint reference-list] Retrieve ServiceReference with reference-listener [message #1061579 is a reply to message #1060704] Mon, 03 June 2013 06:30 Go to previous message
Maxime Bossard is currently offline Maxime BossardFriend
Messages: 2
Registered: May 2013
Junior Member
Is someone able to retrieve a Collection<ServiceReference> by injecting a blueprint reference-list ?
Previous Topic:Combining Persistence Bundles
Next Topic:Gemini Blueprint Configuration Admin Runtime Updates
Goto Forum:
  


Current Time: Fri Dec 19 14:29:15 GMT 2014

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

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