Hello Karaf Experts,

i am trying to isolate services from each other.


For Example you have a component:


@Component(
    configurationPid = "MyInterfacA.factory",
    configurationPolicy = ConfigurationPolicy.REQUIRE,
public Class MyInterfaceAImpl implements MyInterfacA{


@Reference

MyInterfaceB service;


 ...}


During runtime I create multiple services from type MyInterfaceB and multiple 
componentes of MyInterfaceAImpl with configadmin.

Depending on the configuration of MyInterfaceAImpl I want to filter which 
MyInterfaceB implementation is injected.

I thought about FindHook but there I dont see a way how to get the information 
which service from the bundle is requesting the reference.


Is there any chance to do this, or do I have to go for an alternative design. 
Or a better way to isolate services from another?



Best regards,

Matthias

Reply via email to