felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-1893) Add "update" callback support to inform components of modified service properties
Date Thu, 26 Nov 2009 10:01:39 GMT

    [ https://issues.apache.org/jira/browse/FELIX-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12782821#action_12782821

Felix Meschberger commented on FELIX-1893:

To support service property update notification, I propose the following extension to the
Declarative Services Specification 1.1.

112.3.1 Accessing Services

The description is enhanced to include the new updated method.

In other words: The updated method is supported with the same prototype signatures as the
bind and unbind methods, namely:

     1 void <method-name>(ServiceReference);
     2 void <method-name>(<parameter-type>);
     3 void <method-name>(<parameter-type>, Map);

112.4.2 XML Document

The namespace is supporting this extension is defined as


Only components declared with a descriptor using this namespace support the extended service
property propagation.

112.4.7 Reference Element

The <reference> element is extended with a new attribute "updated":

    * updated - The name of a method in the component implementation class that is used to
notify that a bound service
                updated its service registration properties. This method is called regardless
of whether the reference is statically
                or dynamically bound. See Accessing Services on page 304.

112.5.x Updated Service Properties (new Section)

When the service registration properties of a bound service are modified and the new properties
do not cause the service to be unbound (because the target filter does not match any longer),
the component may be notified of the modified properties by specifying an updated method to
be called.

If an unbind method throws an exception, SCR must log an error message containing the exception
with the Log Service, if present. Neither the service will be unbound nor will the component
be deactivated in this case.

112.8.4 Locating Component Methods

The algorithm described also applies to the new updated method.

> Add "update" callback support to inform components of modified service properties
> ---------------------------------------------------------------------------------
>                 Key: FELIX-1893
>                 URL: https://issues.apache.org/jira/browse/FELIX-1893
>             Project: Felix
>          Issue Type: New Feature
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-1.2.0
>            Reporter: Felix Meschberger
> While working on FELIX-1841 it became apparent that the current Declarative Services
specificaiton 1.1 (as contained in OSGi Compendium 4.2) is missing functionality to inform
a component about modified service reference properties of a bound service. The goal of this
issue is to define an extension to DS specificaiton allowing passing this information.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message