Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DS: Allow modification of change count through ComponentContext #809

@laeubi

Description

@laeubi

I just came across the issue that I wanted to change the properties of a DS component registered service so a "change" event is fired using https://docs.osgi.org/specification/osgi.core/8.0.0/framework.api.html#org.osgi.framework.Constants.SERVICE_CHANGECOUNT but currently it is not easily possible because there is not access to the underlying properties as they are managed by SCR.

I would therefore propose to have a ComponentContext#changed() method that behaves like this:

  1. If the component is not registered as a service it is simply increments the change counter
  2. If the component is registered as a service the change counter is incremented and its current service properties are update to reflect that change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions