Problem injecting reference dynamically when the reference is defined only in the .composite file
Problem trying to deploy a component in the 2nd deployment:
When we have a component implementation class having @Scope("COMPOSITE") with a reference defined only in the .composite (without reference annotation) like:
@Scope("COMPOSITE") public class RFIDServiceMockImpl implements org.ow2.frascati.demo.homeautomation.api.RFIDService {
...
private org.ow2.frascati.demo.homeautomation.api.StaffUIService nurseUIService;
...
}
frascati injects the reference just in the first deployment, so when we deploy the component nurse (reference nurseUIService) in the second deployment, the component is not instanced and the application doesn't work. Moreover, if the class is configured with the reference annotation like:
@Scope("COMPOSITE") public class RFIDServiceMockImpl implements org.ow2.frascati.demo.homeautomation.api.RFIDService {
...
@Reference private org.ow2.frascati.demo.homeautomation.api.StaffUIService nurseUIService;
...
}
in this case it works normally.