[ 
https://issues.apache.org/jira/browse/FELIX-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Felix Meschberger resolved FELIX-2526.
--------------------------------------

    Resolution: Fixed

Implemented the workaround in Rev. 982892 (and reversed a test in Rev. 982893).

The implementation now supports a ds.ctworkaround flag as follows : If the 
ds.ctworkaround framework property is set to true on bundle startup, two 
workarounds for the OSGi Compendium R 4.2 CT for Declarative Services are 
active:

   * The ComponentContext.getProperties() implementation always returns the 
same writeable Dictionary instead of a read-only dictionary
   * Location binding of Configuration objects supplied to components is 
ignored.

Setting the ds.ctworkaround framework property is required to pass the CT but 
setting the property in a productive environment is strongly discouraged.

> Add a property to enable workarounds for CT assumptions
> -------------------------------------------------------
>
>                 Key: FELIX-2526
>                 URL: https://issues.apache.org/jira/browse/FELIX-2526
>             Project: Felix
>          Issue Type: Improvement
>          Components: Declarative Services (SCR)
>    Affects Versions:  scr-1.4.2
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For:  scr-1.4.2
>
>
> The current OSGi Compendium CT for Declarative services hsa two assumptions, 
> which violate the spec. Our implementation correctly implements the spec in 
> these two areas and thus fails CT tests.
> The two assumptions are:
> (1) ComponentContext.getProperties() expected writable 
> The CT expects the Dictionary returned from ComponentContext.getProperties() 
> to be writeable because it is used to pass status information. I reported 
> https://www.osgi.org/bugzilla/show_bug.cgi?id=90
> The workaround is to return the internally used Dictionary from the 
> ComponentContextImpl.getProperties() implementation.
> (2) Configuration Location Binding ignored
> Configuration is created with a location binding such that validating 
> Location Binding fails the configuration tests. The reason is that 
> configuration is created bound to a test bundle, while the components are 
> provided by another bundle. According to my understanding of the 
> Configuration Admin specification, DS should respect location binding when 
> providing Configuration to components. I reported 
> https://www.osgi.org/bugzilla/show_bug.cgi?id=91
> The workaround is to ignore the location binding when accessing the 
> configuration to be supplied to components.
> Defining a framework property to enable these two workarounds makes our 
> implementation pass the CT. The property is only supported as a framework 
> property and is only read when the bundle is started. By default the property 
> is not set, thus disabling the workarounds and behaving spec compliant.

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

Reply via email to