Hi,

I have a bind order issue with a component that has :

1) A static reference specified with annotation @Reference on the private
field
2) A dynamic multiple reference specificed with annotation on a method

The static reference is not bound before the dynamic ones.

The code looks like this:

@Component(immediate = true)
public class MyServiceImpl implements MyService {

    @Reference
    private AclService aclService;

    @Reference(
            cardinality = ReferenceCardinality.MULTIPLE,
            policy = ReferencePolicy.DYNAMIC
    )
    public void add(StateMachine stateMachine) {
       ....
        ....
    }


According to the Declarative Service specifications, the static references
should always be injected before the activate method.


Does anyone have any idea what might be wrong ?


My env is Apache Karaf 4.0.5 with Felix SCR 2.0.2


Thanks for you help!

Nicolas

Reply via email to