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

David Jencks commented on FELIX-4686:
-------------------------------------

IIUC your example only fails if your felix configuration includes the global 
ds.factory.enabled = true flag, which IMO we should do our utmost to 
discourage, since there is now a felix-namespace attribute you can use 
per-component.

I don't like this suggestion.  You only get a 1.3 namespace from annotations if 
you use a new 1.3 feature or explicitly set it.  In this case it should be an 
error to try to use the obsolete component factory stuff, it should not be 
silently ignored.  If you have a bundle where you want to update the namespace 
to 1.3 but are not willing to fix the code to use factory configurations 
properly, you can go to the trouble of adding the felix-namespace attribute to 
all these badly written components.  There's no reason to make preserving these 
obsolete implementations easy with up-to-date namespaces, we should encourage 
people to update them, and to not use the obsolete global flag.

> If component is declared with 1.3 NS and ds.factory.enabled = true, 
> validation error occors
> -------------------------------------------------------------------------------------------
>
>                 Key: FELIX-4686
>                 URL: https://issues.apache.org/jira/browse/FELIX-4686
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: scr-2.0.0
>
>
> For example the following component xml leads to a validation error:
> "Configuration of component factory instances through config admin factory 
> pids supported only through the 1.2 namespace"
> <components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.3.0";>
>     <scr:component name="org.apache.sling.sample.slingshot.impl.SetupService" 
> activate="activate" deactivate="deactivate">
>         <implementation 
> class="org.apache.sling.sample.slingshot.impl.SetupService"/>
>         <property name="service.vendor" value="The Apache Software 
> Foundation"/>
>         <property name="service.pid" 
> value="org.apache.sling.sample.slingshot.impl.SetupService"/>
>     </scr:component>
> </components>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to