You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Felix Meschberger <fm...@gmail.com> on 2009/11/26 11:50:37 UTC

[DS] Extend service references with support for registration property updates

Hi,

While working on FELIX-1841, Pierre de Rop and I came across a missing
feature in the Declarative Services Specification 1.1: Functionality to
propagate service property updates for a bound service.

In the current SCR trunk we implemented a workaround, which just calls
the bind method in case of such updates (guarded by a configuration
property due to non-compliant behaviour). This workaround may work or
not, but it is probably better to come up with a real solution.

Therefore I propse the extension of Declarative Services 1.1 by adding
an "updated" method declaration in the service reference element. The
full proposal is written in FELIX-1893 [1] to which I also attached a
patched implementing this proposal.

In short:

  * Extend the <reference> with an updated element naming a method
    which is called when service registration properties of a bound
    service are updated
  * Define new namespace supporting this attribute. Only components
    using this namespace (or a future newer one) will have support
    for the updated attribute. Otherwise the attribute is ignored.
  * The updated method has the same signature prototype specification
    and lookup algorithm as the bind and unbind methods.
  * Backwards compatibility is guaranteed by requiring a new namespace
    for components using the updated method and by defaulting to
    no propagation of updated service registration properties.

If we agree on this proposal, I would like to bring it to the OSGi Dev
List (and file an enahcement bug with OSGi).

WDYT ?

Regards
Felix

[1] https://issues.apache.org/jira/browse/FELIX-1893

Re: [DS] Extend service references with support for registration property updates

Posted by Marcel Offermans <ma...@luminis.nl>.
On Nov 26, 2009, at 11:50 , Felix Meschberger wrote:

> While working on FELIX-1841, Pierre de Rop and I came across a missing
> feature in the Declarative Services Specification 1.1: Functionality to
> propagate service property updates for a bound service.
> 
> In the current SCR trunk we implemented a workaround, which just calls
> the bind method in case of such updates (guarded by a configuration
> property due to non-compliant behaviour). This workaround may work or
> not, but it is probably better to come up with a real solution.
> 
> Therefore I propse the extension of Declarative Services 1.1 by adding
> an "updated" method declaration in the service reference element. The
> full proposal is written in FELIX-1893 [1] to which I also attached a
> patched implementing this proposal.
> 
> In short:
> 
>  * Extend the <reference> with an updated element naming a method
>    which is called when service registration properties of a bound
>    service are updated
>  * Define new namespace supporting this attribute. Only components
>    using this namespace (or a future newer one) will have support
>    for the updated attribute. Otherwise the attribute is ignored.
>  * The updated method has the same signature prototype specification
>    and lookup algorithm as the bind and unbind methods.
>  * Backwards compatibility is guaranteed by requiring a new namespace
>    for components using the updated method and by defaulting to
>    no propagation of updated service registration properties.
> 
> If we agree on this proposal, I would like to bring it to the OSGi Dev
> List (and file an enahcement bug with OSGi).
> 
> WDYT ?

I think it makes sense.

Greetings, Marcel


Re: [DS] Extend service references with support for registration property updates

Posted by Carsten Ziegeler <cz...@apache.org>.
+1

Carsten

Felix Meschberger wrote:
> Hi,
> 
> While working on FELIX-1841, Pierre de Rop and I came across a missing
> feature in the Declarative Services Specification 1.1: Functionality to
> propagate service property updates for a bound service.
> 
> In the current SCR trunk we implemented a workaround, which just calls
> the bind method in case of such updates (guarded by a configuration
> property due to non-compliant behaviour). This workaround may work or
> not, but it is probably better to come up with a real solution.
> 
> Therefore I propse the extension of Declarative Services 1.1 by adding
> an "updated" method declaration in the service reference element. The
> full proposal is written in FELIX-1893 [1] to which I also attached a
> patched implementing this proposal.
> 
> In short:
> 
>   * Extend the <reference> with an updated element naming a method
>     which is called when service registration properties of a bound
>     service are updated
>   * Define new namespace supporting this attribute. Only components
>     using this namespace (or a future newer one) will have support
>     for the updated attribute. Otherwise the attribute is ignored.
>   * The updated method has the same signature prototype specification
>     and lookup algorithm as the bind and unbind methods.
>   * Backwards compatibility is guaranteed by requiring a new namespace
>     for components using the updated method and by defaulting to
>     no propagation of updated service registration properties.
> 
> If we agree on this proposal, I would like to bring it to the OSGi Dev
> List (and file an enahcement bug with OSGi).
> 
> WDYT ?
> 
> Regards
> Felix
> 
> [1] https://issues.apache.org/jira/browse/FELIX-1893
> 


-- 
Carsten Ziegeler
cziegeler@apache.org