it’s some­times a bit con­fus­ing which sig­na­ture to use for acti­vate or deac­ti­vate in an OSGI com­po­nent. This is because you have the choice, and this is nice :-)

As long as you add the @Activate and @Deactivate tag before your meth­ods, you can have zero, one or sev­eral argu­ments among fol­low­ing types (that will be auto­mat­i­cally bound at com­po­nent activation/deactivation):

Acti­va­tion:

  • Com­po­nent­Con­text — the Com­po­nent Con­text for the component
  • Bundle­Con­text — the Bun­dle Con­text of the component’s bundle
  • Map — the Com­po­nent Prop­er­ties from ComponentContext.getProperties.

Deac­ti­va­tion:

  • int/Integer — the deac­ti­va­tion reason
  • Com­po­nent­Con­text — the Com­po­nent Con­text for the component
  • Bundle­Con­text — the Bun­dle Con­text of the component’s bundle
  • Map — the Com­po­nent Prop­er­ties from ComponentContext.getProperties.

For more infor­ma­tion on this, you can look at the ded­i­cated Apache Felix JIRA