I have an OSGI component and inside that I have used @Reference(policyOption = ReferencePolicyOption.GREEDY) for the below interfaces,
protected HybrisConnection connection;
protected HybrisFactory hybrisFactory;
Once I install the bundle in AEM I'm getting unsatisfied (Reference) error for HybrisFactory (No service bound). The same @Reference I have used for HybrisConnection and its satisfied. For reference I have provide the screen shot. can anyone help me to resolve this?
Looks like you are trying to use dependency injection in a bind method following that doc.
To use dependency injection, there is no need to place the @Reference within any specific method in Java. You can place @Refenence in a a Java class that uses @Component and then use that object in methods. See this article where we use this annotation.