Hello all, I'm hoping you can help me with an issue that is baffling me.
In one bundle I'm exposing a service through blueprint
<service id="dataSvc"
interface="org.example.data.Data"
ref="data">
</service>
In another bundle I'm trying to inject that service with annotations
@Reference(unbind = "unsetData")
public void setData(final Data data) {
this.data = data;
}
@Reference
public void unsetData(final Data data) {
this.data = null;
}
Unfortunately, this is not working. The reference always ends up being
null. I have other services that I am injecting into the same class
which are exposed by yet other bundles using annotations and declarative
services which work fine. Also I can clearly see all the services if I
run either the "ls" or "services" command in Karaf. Can anyone tell me
if I am doing something wrong or help me troubleshoot this issue?
Regards,
D