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.