The attribute policyOption is undefined for the annotation type Reference | Adobe Higher Education
Skip to main content
Level 3
August 21, 2018
Beantwortet

The attribute policyOption is undefined for the annotation type Reference

  • August 21, 2018
  • 12 Antworten
  • 4265 Ansichten

Hi

can anyone help on this below issue,

We are replacing felix annotations with OSGI DS annotations. We have come across with a challenge please find below

Felix annotation :

  @Reference(policyOption = ReferencePolicyOption.GREEDY)

  protected UserConnector userConnector;

 

OSGI Annotation I tried :

  protected UserConnector userConnector;

 

  @Reference(policyOption = ReferencePolicyOption.GREEDY)

  public void bindUserConnector(UserConnector userConnector) {

    this.userConnector = userConnector;

  }

  public void unbindUserConnector(UserConnector userConnector) {

    this.userConnector = userConnector;

  }

 

But there is an error in eclipse where “The attribute policyOption is undefined for the annotation type Reference”.

Can you please tell me whether policyOption is deprecated in OSGi annotations.

Please let me know how to use policyOption = ReferencePolicyOption.Greedy in @Reference OSGI annotation.

Much Appreciated in advance.

Arun Patidar

Feike Visser

smacdonald2008

Thanks

Vijay

Dieses Thema wurde für Antworten geschlossen.

12 Antworten

arunpatidar
Community Advisor
Community Advisor
September 4, 2018

Hi,

For my test service, it is in satisfied state.

your issue could be due to dependancy code or something but not sure.

Arun Patidar
Level 3
September 5, 2018

Hi Arun,

Do you have any idea about No services bound? If you see my above screenshot for the unsatisfied service It shows No Services bound.

Also I have used policyOption:Greedy for three references Where it is satisfied for HybrisConnection and unsatisfied for HybrisFactory & ImportHandler.

Thanks,

Vijay