[
https://issues.apache.org/jira/browse/FELIX-4686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carsten Ziegeler reassigned FELIX-4686:
---------------------------------------
Assignee: Carsten Ziegeler
[~djencks] What do you think about this patch , which disables the non standard
factory stuff if namespace 1.3+ is used:
Index: src/main/java/org/apache/felix/scr/impl/metadata/XmlHandler.java
===================================================================
--- src/main/java/org/apache/felix/scr/impl/metadata/XmlHandler.java
(revision 1637751)
+++ src/main/java/org/apache/felix/scr/impl/metadata/XmlHandler.java
(working copy)
@@ -280,7 +280,14 @@
m_currentComponent.setConfigurableServiceProperties("true".equals(attributes.getAttribute(NAMESPACE_URI_1_0_FELIX_EXTENSIONS,
CONFIGURABLE_SERVICE_PROPERTIES)));
m_currentComponent.setPersistentFactoryComponent("true".equals(attributes.getAttribute(NAMESPACE_URI_1_0_FELIX_EXTENSIONS,
PERSISTENT_FACTORY_COMPONENT)));
m_currentComponent.setDeleteCallsModify("true".equals(attributes.getAttribute(NAMESPACE_URI_1_0_FELIX_EXTENSIONS,
DELETE_CALLS_MODIFY)));
-
m_currentComponent.setObsoleteFactoryComponentFactory(m_globalObsoleteFactoryComponentFactory
|| "true".equals(attributes.getAttribute(NAMESPACE_URI_1_0_FELIX_EXTENSIONS,
OBSOLETE_FACTORY_COMPONENT_FACTORY)));
+ if ( namespaceCode.isDS13() )
+ {
+
m_currentComponent.setObsoleteFactoryComponentFactory(false);
+ }
+ else
+ {
+
m_currentComponent.setObsoleteFactoryComponentFactory(m_globalObsoleteFactoryComponentFactory
|| "true".equals(attributes.getAttribute(NAMESPACE_URI_1_0_FELIX_EXTENSIONS,
OBSOLETE_FACTORY_COMPONENT_FACTORY)));
+ }
m_currentComponent.setConfigureWithInterfaces("true".equals(attributes.getAttribute(NAMESPACE_URI_1_0_FELIX_EXTENSIONS,
CONFIGURE_WITH_INTERFACES)));
m_currentComponent.setDelayedKeepInstances(m_globalDelayedKeepInstances ||
"true".equals(attributes.getAttribute(NAMESPACE_URI_1_0_FELIX_EXTENSIONS,
DELAYED_KEEP_INSTANCES)));
> 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)