You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pd...@apache.org on 2018/09/26 16:45:39 UTC

svn commit: r1842034 [6/11] - in /felix/trunk/dependencymanager: ./ .gradle-wrapper/ cnf/ cnf/buildrepo/ cnf/ext/ cnf/localrepo/ cnf/localrepo/org.apache.felix.gogo.command/ cnf/localrepo/org.apache.felix.gogo.jline/ cnf/localrepo/org.apache.felix.gogo...

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/FactoryConfigurationAdapterServiceBuilder.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/FactoryConfigurationAdapterServiceBuilder.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/FactoryConfigurationAdapterServiceBuilder.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/FactoryConfigurationAdapterServiceBuilder.java Wed Sep 26 16:45:35 2018
@@ -51,16 +51,17 @@ public class FactoryConfigurationAdapter
         String[] provides = srvMeta.getStrings(Params.provides, null);
         Dictionary<String, Object> properties = srvMeta.getDictionary(Params.properties, null);
         boolean propagate = "true".equals(srvMeta.getString(Params.propagate, "false"));
-        String configProxyClassName = srvMeta.getString(Params.configType, null);
-
+        Class<?>[] configTypes = getConfigTypes(b, srvMeta);        
         Component c = null;
+                
+        c = dm.createFactoryComponent()
+            .setFactoryPid(factoryPid)
+            .setUpdated(updated)
+            .setPropagate(propagate)
+            .setConfigType(configTypes);
         
-        Class<?> configProxyClass = configProxyClassName != null ? b.loadClass(configProxyClassName) : null;
-        c = dm.createFactoryConfigurationAdapterService(factoryPid, updated, propagate, null, configProxyClass);
-
         c.setInterface(provides, properties);
-        String factoryMethod = srvMeta.getString(Params.factoryMethod, null);
-        
+        String factoryMethod = srvMeta.getString(Params.factoryMethod, null);        
         
         if (factoryMethod == null)
         {
@@ -78,5 +79,26 @@ public class FactoryConfigurationAdapter
         // Adds dependencies (except named dependencies, which are managed by the lifecycle handler).
         addUnamedDependencies(b, dm, c, srvMeta, depsMeta);
         dm.add(c);
-    }    
+    }
+
+    private Class<?>[] getConfigTypes(Bundle b, MetaData srvMeta) throws ClassNotFoundException
+    {
+        String configType = srvMeta.getString(Params.configType, null);
+        if (configType != null)
+        {
+            return new Class<?>[] { b.loadClass(configType) };
+        }
+
+        String[] configTypes = srvMeta.getStrings(Params.configTypes, null);
+        if (configTypes != null)
+        {
+            Class<?>[] configTypeClasses = new Class<?>[configTypes.length];
+            for (int i = 0; i < configTypes.length; i++)
+            {
+                configTypeClasses[i] = b.loadClass(configTypes[i]);
+            }
+            return configTypeClasses;
+        }
+        return null;
+    }
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/Params.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/Params.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/Params.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.runtime/src/org/apache/felix/dm/runtime/Params.java Wed Sep 26 16:45:35 2018
@@ -67,5 +67,8 @@ public enum Params
     registered, 
     unregistered,
     configType,
-    dereference
+    configTypes,
+    dereference,
+    scope,
+    bundle
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/bnd.bnd?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/bnd.bnd (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/bnd.bnd Wed Sep 26 16:45:35 2018
@@ -30,6 +30,9 @@ Bundle-License: http://www.apache.org/li
 Bundle-DocURL: http://felix.apache.org/documentation/subprojects/apache-felix-dependency-manager.html
 Bundle-Vendor: The Apache Software Foundation
 	
+-plugin: org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin;log=debug;\
+  path:=${workspace}/org.apache.felix.dependencymanager.annotation/generated/org.apache.felix.dependencymanager.annotation.jar
+	
 # we do not release this project in binary distribution.
 -releaserepo: 
 -baseline: 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/composite.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/composite.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/composite.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/composite.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/compositefactory.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/compositefactory.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/compositefactory.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/compositefactory.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/customdep.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/customdep.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/customdep.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/customdep.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.annot.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.annot.bnd?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.annot.bnd (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.annot.bnd Wed Sep 26 16:45:35 2018
@@ -18,5 +18,3 @@ Private-Package:  \
 	org.apache.felix.dependencymanager.samples.device.annot
 Bundle-Description: Dependency Manager device example with annotations
 Bundle-Name: Dependency Manager Device Example With Annotations
--plugin: org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin;log=debug;\
-  path:=${workspace}/org.apache.felix.dependencymanager.annotation/generated/org.apache.felix.dependencymanager.annotation.jar

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.annot.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.annot.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.annot.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.annot.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.api.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.api.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.api.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/device.api.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.annot.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.annot.bnd?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.annot.bnd (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.annot.bnd Wed Sep 26 16:45:35 2018
@@ -18,5 +18,3 @@ Private-Package:  \
 	org.apache.felix.dependencymanager.samples.dictionary.annot
 Bundle-Description: Dependency Manager dictionary example with annotations
 Bundle-Name: Dependency Manager Dictionary Example With Annotations
--plugin: org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin;log=debug;\
-  path:=${workspace}/org.apache.felix.dependencymanager.annotation/generated/org.apache.felix.dependencymanager.annotation.jar

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.annot.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.annot.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.annot.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.annot.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 
@@ -27,11 +27,12 @@
 	${configadmin},\
 	${eventadmin},\
 	${webconsole},\
-	${bndlib},\
 	org.apache.felix.dependencymanager;version=latest,\
 	org.apache.felix.dependencymanager.shell;version=latest,\
 	org.apache.felix.dependencymanager.runtime;version=latest,\
-    org.apache.felix.dependencymanager.samples.dictionary.annot;version=latest
+	org.apache.felix.dependencymanager.samples.dictionary.annot;version=latest,\
+	slf4j.simple;version=1.7.7,\
+	slf4j.api;version=1.7.7
 
 -runproperties:  \
 	org.apache.felix.dependencymanager.runtime.log=false,\

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.api.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.api.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.api.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.api.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 
@@ -30,8 +30,9 @@
 	${bndlib},\
 	org.apache.felix.dependencymanager;version=latest,\
 	org.apache.felix.dependencymanager.shell;version=latest,\
-	org.apache.felix.dependencymanager.runtime;version=latest,\
-    org.apache.felix.dependencymanager.samples.dictionary.api;version=latest
+	org.apache.felix.dependencymanager.samples.dictionary.api;version=latest,\
+	slf4j.simple;version=1.7.7,\
+	slf4j.api;version=1.7.7
 
 -runproperties:  \
 	org.apache.felix.dependencymanager.loglevel=2,\

Added: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.metatype.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.metatype.bnd?rev=1842034&view=auto
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.metatype.bnd (added)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.metatype.bnd Wed Sep 26 16:45:35 2018
@@ -0,0 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+Private-Package:  \
+	org.apache.felix.dependencymanager.samples.dictionary.metatype
+Bundle-Activator: org.apache.felix.dependencymanager.samples.dictionary.metatype.Activator
+Bundle-Description: Dependency Manager dictionary example with api and metatype
+Bundle-Name: Dependency Manager Dictionary Example
\ No newline at end of file

Added: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.metatype.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.metatype.bndrun?rev=1842034&view=auto
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.metatype.bndrun (added)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dictionary.metatype.bndrun Wed Sep 26 16:45:35 2018
@@ -0,0 +1,43 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-runfw: ${felix.framework}
+-runee: JavaSE-1.8
+-runsystemcapabilities: ${native_capability}
+
+-resolve.effective: active;skip:="osgi.service"
+
+-runbundles: \
+	${metatype},\
+	${log},\
+	${gogo},\
+	${configadmin},\
+	${eventadmin},\
+	${webconsole},\
+	${bndlib},\
+	org.apache.felix.dependencymanager;version=latest,\
+	org.apache.felix.dependencymanager.shell;version=latest,\
+	org.apache.felix.dependencymanager.samples.dictionary.metatype;version=latest,\
+	slf4j.simple;version=1.7.7,\
+	slf4j.api;version=1.7.7
+
+-runproperties:  \
+	org.apache.felix.dependencymanager.loglevel=2,\
+	org.apache.felix.log.maxSize=100000,\
+	org.apache.felix.log.storeDebug=true
+
+
+

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.annot.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.annot.bnd?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.annot.bnd (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.annot.bnd Wed Sep 26 16:45:35 2018
@@ -18,5 +18,3 @@ Private-Package:  \
 	org.apache.felix.dependencymanager.samples.dynamicdep.annot
 Bundle-Description: Dependency Manager dynamic dependency example with annotations
 Bundle-Name: Dependency Manager Dynamic Dependency Example With Annotations
--plugin: org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin;log=debug;\
-  path:=${workspace}/org.apache.felix.dependencymanager.annotation/generated/org.apache.felix.dependencymanager.annotation.jar

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.annot.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.annot.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.annot.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.annot.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 
@@ -27,7 +27,6 @@
 	${configadmin},\
 	${eventadmin},\
 	${webconsole},\
-	${bndlib},\
 	org.apache.felix.dependencymanager;version=latest,\
 	org.apache.felix.dependencymanager.shell;version=latest,\
 	org.apache.felix.dependencymanager.runtime;version=latest,\

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.api.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.api.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.api.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/dynamicdep.api.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 
@@ -27,7 +27,6 @@
 	${configadmin},\
 	${eventadmin},\
 	${webconsole},\
-	${bndlib},\
 	org.apache.felix.dependencymanager;version=latest,\
 	org.apache.felix.dependencymanager.shell;version=latest,\
 	org.apache.felix.dependencymanager.runtime;version=latest,\

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.annot.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.annot.bnd?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.annot.bnd (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.annot.bnd Wed Sep 26 16:45:35 2018
@@ -18,5 +18,3 @@ Private-Package:  \
 	org.apache.felix.dependencymanager.samples.hello.annot
 Bundle-Description: Dependency Manager hello example with annotations
 Bundle-Name: Dependency Manager Hello Example With Annotations
--plugin: org.apache.felix.dm.annotation.plugin.bnd.AnnotationPlugin;log=debug;\
-  path:=${workspace}/org.apache.felix.dependencymanager.annotation/generated/org.apache.felix.dependencymanager.annotation.jar

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.annot.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.annot.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.annot.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.annot.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.api.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.api.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.api.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/hello.api.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAccessConsumer.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAccessConsumer.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAccessConsumer.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAccessConsumer.java Wed Sep 26 16:45:35 2018
@@ -34,8 +34,8 @@ public class DeviceAccessConsumer {
     
     // Injected after all required dependencies have been injected (including our logger)
     @ServiceDependency(required=false)
-    void add(Map<String, Object> props, DeviceAccess deviceAccess) {
-        log.log(LogService.LOG_WARNING, "Handling device access: id=" + props.get("device.id") 
+    void add(DeviceAccess deviceAccess, Map<String, Object> props) {
+        log.log(LogService.LOG_WARNING, "Handling device access: id=" + props.get("device.access.id") 
             + "\n\t device=" + deviceAccess.getDevice() 
             + "\n\t device parameter=" + deviceAccess.getDeviceParameter()
             + "\n\t device access properties=" + props);

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAndParameterFactory.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAndParameterFactory.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAndParameterFactory.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceAndParameterFactory.java Wed Sep 26 16:45:35 2018
@@ -18,13 +18,15 @@
  */
 package org.apache.felix.dependencymanager.samples.device.annot;
 
+import java.io.IOException;
 import java.util.Dictionary;
 import java.util.Hashtable;
 
 import org.apache.felix.dm.annotation.api.Component;
 import org.apache.felix.dm.annotation.api.ServiceDependency;
 import org.apache.felix.dm.annotation.api.Start;
-import org.apache.felix.dm.runtime.api.ComponentFactory;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.log.LogService;
 
 /**
@@ -34,32 +36,31 @@ import org.osgi.service.log.LogService;
  */
 @Component
 public class DeviceAndParameterFactory {
-    @ServiceDependency(filter = "(" + Component.FACTORY_NAME + "=Device)")
-    volatile ComponentFactory m_deviceFactory;
-
-    @ServiceDependency(filter = "(" + Component.FACTORY_NAME + "=DeviceParameter)")
-    volatile ComponentFactory m_deviceParameterFactory;
-
+	@ServiceDependency
+	ConfigurationAdmin cm;
+	
     @ServiceDependency
     volatile LogService log;
 
     @Start
-    public void start() {
+    public void start() throws IOException {
         log.log(LogService.LOG_INFO, "DeviceAndParameterFactory.start");
         for (int i = 0; i < 2; i++) {
             createDeviceAndParameter(i);
         }
     }
 
-    private void createDeviceAndParameter(int id) {
+    private void createDeviceAndParameter(int id) throws IOException {
         log.log(LogService.LOG_INFO, "DeviceAndParameterFactory: creating Device/DeviceParameter with id=" + id);
 
         Dictionary<String, Object> device = new Hashtable<>();
         device.put("device.id", new Integer(id));
-        m_deviceFactory.newInstance(device);
+        Configuration deviceConf = cm.createFactoryConfiguration("device", "?");
+        deviceConf.update(device);
 
         Dictionary<String, Object> param = new Hashtable<>();
         param.put("device.id", new Integer(id));
-        m_deviceParameterFactory.newInstance(param);
+        Configuration paramConf = cm.createFactoryConfiguration("device.parameter", "?");
+        paramConf.update(param);
     }
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceImpl.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceImpl.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceImpl.java Wed Sep 26 16:45:35 2018
@@ -25,11 +25,11 @@ import org.apache.felix.dm.annotation.ap
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@Component(factoryName = "Device", factoryConfigure = "configure")
+@Component(factoryPid = "device")
 public class DeviceImpl implements Device {
     int id;
 
-    void configure(Dictionary<String, Object> configuration) {
+    void updated(Dictionary<String, Object> configuration) {
         this.id = (Integer) configuration.get("device.id");
     }
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceParameterImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceParameterImpl.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceParameterImpl.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/annot/DeviceParameterImpl.java Wed Sep 26 16:45:35 2018
@@ -25,11 +25,11 @@ import org.apache.felix.dm.annotation.ap
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@Component(factoryName = "DeviceParameter", factoryConfigure = "configure")
+@Component(factoryPid = "device.parameter", propagate=true)
 public class DeviceParameterImpl implements DeviceParameter {
     int id;
 
-    void configure(Dictionary<String, Object> configuration) {
+    void updated(Dictionary<String, Object> configuration) {
         this.id = (Integer) configuration.get("device.id");
     }
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/Activator.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/Activator.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/Activator.java Wed Sep 26 16:45:35 2018
@@ -34,7 +34,8 @@ public class Activator extends Dependenc
         createDeviceAndParameter(dm, 1);
         createDeviceAndParameter(dm, 2);
 
-        dm.add(createAdapterService(Device.class, null)
+        dm.add(createAdapterComponent()
+        	.setAdaptee(Device.class, null)
             .setImplementation(DeviceAccessImpl.class)
             .setInterface(DeviceAccess.class.getName(), null));
         

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/DeviceAccessConsumer.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/DeviceAccessConsumer.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/DeviceAccessConsumer.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/device/api/DeviceAccessConsumer.java Wed Sep 26 16:45:35 2018
@@ -29,7 +29,7 @@ public class DeviceAccessConsumer {
     volatile LogService log;
 
     void add(Map<String, Object> props, DeviceAccess deviceAccess) {
-        log.log(LogService.LOG_WARNING, "DeviceAccessConsumer: Handling device access: id=" + props.get("device.id") 
+        log.log(LogService.LOG_WARNING, "DeviceAccessConsumer: Handling device access: id=" + props.get("device.access.id") 
             + "\n\t device=" + deviceAccess.getDevice() 
             + "\n\t device parameter=" + deviceAccess.getDeviceParameter()
             + "\n\t device access properties=" + props);

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspect.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspect.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspect.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspect.java Wed Sep 26 16:45:35 2018
@@ -44,12 +44,17 @@ public class DictionaryAspect implements
      */
     @ServiceDependency(required = false)
     private LogService m_log;
+    
+    /**
+     * Our Configuration PID
+     */
+    final static String PID = "dictionary.aspect";
 
     /**
      * Defines a configuration dependency for retrieving our english custom words (by default,
      * our PID is our full class name).
      */
-    @ConfigurationDependency(propagate = false)
+    @ConfigurationDependency(pid=PID, propagate = false)
     protected void updated(DictionaryAspectConfiguration cnf) {
         if (cnf != null) {
             m_words.clear();

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspectConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspectConfiguration.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspectConfiguration.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryAspectConfiguration.java Wed Sep 26 16:45:35 2018
@@ -32,7 +32,7 @@ import org.osgi.service.metatype.annotat
 @ObjectClassDefinition(
 	name="Spell Checker Aspect Dictionary",
     description = "Declare here the list of english words to be added into the default english dictionary",
-    pid="org.apache.felix.dependencymanager.samples.dictionary.annot.DictionaryAspectConfiguration")
+    pid=DictionaryAspect.PID)
 public interface DictionaryAspectConfiguration {
     @AttributeDefinition(description = "Dictionary aspect words")
     List<String> words();

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryConfiguration.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryConfiguration.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryConfiguration.java Wed Sep 26 16:45:35 2018
@@ -31,7 +31,7 @@ import org.osgi.service.metatype.annotat
  */
 @ObjectClassDefinition(
 	name="Spell Checker Dictionary", 
-	factoryPid = "org.apache.felix.dependencymanager.samples.dictionary.annot.DictionaryConfiguration", 
+	factoryPid = DictionaryImpl.FACTORY_PID, 
 	description = "Declare here some Dictionary instances, allowing to instantiates some DictionaryService services for a given dictionary language")
 public interface DictionaryConfiguration {
     @AttributeDefinition(description = "Describes the dictionary language", defaultValue = "en")

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryImpl.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryImpl.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/DictionaryImpl.java Wed Sep 26 16:45:35 2018
@@ -20,71 +20,85 @@ package org.apache.felix.dependencymanag
 
 import java.util.concurrent.CopyOnWriteArrayList;
 
-import org.apache.felix.dm.annotation.api.FactoryConfigurationAdapterService;
+import org.apache.felix.dm.annotation.api.Component;
 import org.apache.felix.dm.annotation.api.ServiceDependency;
 import org.apache.felix.dm.annotation.api.Start;
 import org.osgi.service.log.LogService;
 
 /**
- * A Dictionary Service. This service uses a FactoryConfigurationAdapterService annotation, 
- * allowing to instantiate this service from webconsole. This annotation will actually register
- * a ManagedServiceFactory in the registry. The Configuration metatype informations is described using the
- * bnd metatype information (see the DictionaryConfiguration interface).
+ * A Dictionary Service. This service uses a FactoryConfigurationAdapterService
+ * annotation, allowing to instantiate this service from webconsole. This
+ * annotation will actually register a ManagedServiceFactory in the registry.
+ * The Configuration metatype informations is described using the bnd metatype
+ * information (see the DictionaryConfiguration interface).
  * 
- * You must configure at least one Dictionary from web console, since the SpellCheck won't start if no Dictionary
- * Service is available.
+ * You must configure at least one Dictionary from web console, since the
+ * SpellCheck won't start if no Dictionary Service is available.
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@FactoryConfigurationAdapterService(configType = DictionaryConfiguration.class, propagate = true, updated = "updated")
+@Component(factoryPid = DictionaryImpl.FACTORY_PID, propagate = true)
 public class DictionaryImpl implements DictionaryService {
-    /**
-     * We store all configured words in a thread-safe data structure, because ConfigAdmin
-     * may invoke our updated method at any time.
-     */
-    private CopyOnWriteArrayList<String> m_words = new CopyOnWriteArrayList<String>();
-
-    /**
-     * We'll use the OSGi log service for logging. If no log service is available, then we'll use a NullObject.
-     */
-    @ServiceDependency(required = false)
-    private LogService m_log;
-
-    /**
-     * Our Dictionary language.
-     */
-    private String m_lang;
-
-    /**
-     * Our service will be initialized from ConfigAdmin.
-     * @param config The configuration where we'll lookup our words list (key=".words").
-     */
-    protected void updated(DictionaryConfiguration cnf) {
-        m_lang = cnf.lang();
-        m_words.clear();
-        for (String word : cnf.words()) {
-            m_words.add(word);
-        }
-    }
-
-    /**
-     * A new Dictionary Service is starting (because a new factory configuration has been created
-     * from webconsole).
-     */
-    @Start
-    protected void start() {
-        m_log.log(LogService.LOG_INFO, "Starting Dictionary Service with language: " + m_lang);
-    }
-
-    /**
-     * Check if a word exists if the list of words we have been configured from ConfigAdmin/WebConsole.
-     */
-    public boolean checkWord(String word) {
-        return m_words.contains(word);
-    }
-
-    @Override
-    public String toString() {
-        return "Dictionary: language=" + m_lang + ", words=" + m_words;
-    }
+
+	/**
+	 * Our factory configuration pid.
+	 */
+	final static String FACTORY_PID = "spellchecker.Dictionary";
+
+	/**
+	 * We store all configured words in a thread-safe data structure, because
+	 * ConfigAdmin may invoke our updated method at any time.
+	 */
+	private CopyOnWriteArrayList<String> m_words = new CopyOnWriteArrayList<String>();
+
+	/**
+	 * We'll use the OSGi log service for logging. If no log service is available,
+	 * then we'll use a NullObject.
+	 */
+	@ServiceDependency(required = false)
+	private LogService m_log;
+
+	/**
+	 * Our Dictionary language.
+	 */
+	private String m_lang;
+
+	/**
+	 * Our service will be initialized from ConfigAdmin.
+	 * 
+	 * @param config
+	 *            The configuration where we'll lookup our words list
+	 *            (key=".words").
+	 */
+	protected void updated(DictionaryConfiguration cnf) {
+		if (cnf != null) {
+			m_lang = cnf.lang();
+			m_words.clear();
+			for (String word : cnf.words()) {
+				m_words.add(word);
+			}
+		}
+	}
+
+	/**
+	 * A new Dictionary Service is starting (because a new factory configuration has
+	 * been created from webconsole).
+	 */
+	@Start
+	protected void start() {
+		m_log.log(LogService.LOG_INFO, "Starting Dictionary Service with language: " + m_lang);
+	}
+
+	/**
+	 * Check if a word exists if the list of words we have been configured from
+	 * ConfigAdmin/WebConsole.
+	 */
+	public boolean checkWord(String word) {
+		return m_words.contains(word);
+	}
+
+	@Override
+	public String toString() {
+		return "Dictionary: language=" + m_lang + ", words=" + m_words;
+	}
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/README
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/README?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/README (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/README Wed Sep 26 16:45:35 2018
@@ -32,7 +32,7 @@ configuration to the "Spell Checker Aspe
 aspect configuration metatype is also declared using the bnd metatype annotations (see DictionaryAspectConfiguration.java). 
 
 Start the test: click on "dictionary.annot.bndrun" descriptor, and run it.
-Then go to webconsole (http://localhost:8080/system/console/configMgr), and add some words in the 
+Then go to webconsole: http://localhost:8080/system/console/configMgr (with user=admin, password=admin), and add some words in the 
 "Spell Checker Dictionary" section, and in the "Spell Checker Aspect Dictionary" configurations.
 
 Then go to gogo shell, and type dm help. You will normally see the dictionary.annotation:spellcheck command.

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/SpellChecker.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/SpellChecker.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/SpellChecker.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/annot/SpellChecker.java Wed Sep 26 16:45:35 2018
@@ -18,6 +18,8 @@
  */
 package org.apache.felix.dependencymanager.samples.dictionary.annot;
 
+import java.util.Collection;
+import java.util.Collections;
 import java.util.concurrent.ConcurrentLinkedQueue;
 
 import org.apache.felix.dm.annotation.api.Component;
@@ -37,9 +39,9 @@ import org.osgi.service.log.LogService;
  * 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@Component(provides = { SpellChecker.class }, properties = {
-        @Property(name = CommandProcessor.COMMAND_SCOPE, value = "dictionary.annotation"),
-        @Property(name = CommandProcessor.COMMAND_FUNCTION, value = "spellcheck" ) })
+@Component(provides = SpellChecker.class)
+@Property(name = CommandProcessor.COMMAND_SCOPE, value = "dictionary.annotation")
+@Property(name = CommandProcessor.COMMAND_FUNCTION, value = "spellcheck" )
 public class SpellChecker {
     /**
      * We'll use the OSGi log service for logging. If no log service is available, then we'll use a NullObject.
@@ -50,8 +52,8 @@ public class SpellChecker {
     /**
      * We'll store all Dictionaries in a concurrent list, in order to avoid method synchronization.
      */
-    @ServiceDependency(service = DictionaryService.class)
-    private final Iterable<DictionaryService> m_dictionaries = new ConcurrentLinkedQueue<>();
+    @ServiceDependency
+    private final Collection<DictionaryService> m_dictionaries = new ConcurrentLinkedQueue<>();
 
     /**
      * Lifecycle method callback, used to check if our service has been activated.

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/Activator.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/Activator.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/Activator.java Wed Sep 26 16:45:35 2018
@@ -20,6 +20,7 @@ package org.apache.felix.dependencymanag
 
 import java.util.Hashtable;
 
+import org.apache.felix.dm.Component;
 import org.apache.felix.dm.DependencyActivatorBase;
 import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.service.command.CommandProcessor;
@@ -32,26 +33,33 @@ import org.osgi.service.log.LogService;
 public class Activator extends DependencyActivatorBase {
     @Override
     public void init(BundleContext context, DependencyManager dm) throws Exception {
-        // Create the factory configuration for our DictionaryImpl service.
-        dm.add(createFactoryConfigurationAdapterService(DictionaryConfiguration.class.getName(), "updated", true, DictionaryConfiguration.class)
-            .setInterface(DictionaryService.class.getName(), null)
-            .setImplementation(DictionaryImpl.class)
-            .add(createServiceDependency().setService(LogService.class))); // NullObject 
+        // Create the factory configuration for our DictionaryImpl service.    
+    	String  pid = DictionaryConfiguration.class.getName();
+    	Class<?> type = DictionaryConfiguration.class;
+        Component factoryComponent = createFactoryComponent()
+        	.setFactoryPid(pid).setPropagate(true).setConfigType(type)
+        	.setInterface(DictionaryService.class.getName(), null)
+        	.setImplementation(DictionaryImpl.class)
+        	.add(createServiceDependency().setService(LogService.class)); // NullObject 
+        dm.add(factoryComponent);
         
-        // Create the Dictionary Aspect
-        dm.add(createAspectService(DictionaryService.class, "(lang=en)", 10)
+        // Create the Dictionary Aspect        
+        Component aspect = createAspectComponent()
+        	.setAspect(DictionaryService.class, "(lang=en)", 10)
             .setImplementation(DictionaryAspect.class)
-            .add(createConfigurationDependency().setPid(DictionaryAspectConfiguration.class.getName()).setCallback("updated", DictionaryConfiguration.class))
-            .add(createServiceDependency().setService(LogService.class))); // NullObject
+            .add(createConfigurationDependency().setPid(DictionaryAspectConfiguration.class.getName()).setCallback("updated", DictionaryConfiguration.class))                
+            .add(createServiceDependency().setService(LogService.class)); // NullObject
+        dm.add(aspect);
         
         // Create the SpellChecker component
         Hashtable<String, Object> props = new Hashtable<>();
         props.put(CommandProcessor.COMMAND_SCOPE, "dictionary");
         props.put(CommandProcessor.COMMAND_FUNCTION, new String[] { "spellcheck" });
-        dm.add(createComponent()
+        Component spellcheck = createComponent()
             .setImplementation(SpellChecker.class)
             .setInterface(SpellChecker.class.getName(), props)
             .add(createServiceDependency().setService(DictionaryService.class).setRequired(true))
-            .add(createServiceDependency().setService(LogService.class))); // NullObject
+            .add(createServiceDependency().setService(LogService.class)); // NullObject
+        dm.add(spellcheck);
     }
 }

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/README
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/README?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/README (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/api/README Wed Sep 26 16:45:35 2018
@@ -21,7 +21,7 @@ string as parameter, which is checked fo
 required/multiple (1..N) dependency over every available "DictionaryService" services, which are
 internally used by the SpellChecker command, when checking word existence.
 
-A DictionaryService is defined using a FactoryConfigurationAdapterService , allowing to instantiate
+A DictionaryService is defined using a FactoryComponent , allowing to instantiate
 many "DictionaryService" instances when some configurations are added to the
 "Spell Checker Configuration" factory pid from web
 console. The factory pid configuration metatypes are defined using the bnd "metatype" annotations

Added: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/Activator.java?rev=1842034&view=auto
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/Activator.java (added)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/Activator.java Wed Sep 26 16:45:35 2018
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.dependencymanager.samples.dictionary.metatype;
+
+import java.util.Hashtable;
+
+import org.apache.felix.dm.Component;
+import org.apache.felix.dm.DependencyActivatorBase;
+import org.apache.felix.dm.DependencyManager;
+import org.apache.felix.service.command.CommandProcessor;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.log.LogService;
+
+/**
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class Activator extends DependencyActivatorBase {
+    @Override
+    public void init(BundleContext context, DependencyManager dm) throws Exception {
+        // Create the factory configuration for our DictionaryImpl service.
+        // We also provide metatype info in order to be able to configure our factory configuration
+        // from config admin.
+                
+        Component factory = createFactoryComponent()
+            .setFactoryPid(DictionaryConfiguration.class)
+            .setPropagate(true)
+            .setConfigType(DictionaryConfiguration.class)                
+            .setHeading("Spell Checker Dictionary")
+            .setDesc("Declare here some Dictionary instances, allowing to instantiates some DictionaryService services for a given dictionary language")
+            .add(dm.createPropertyMetaData().setId("lang").setHeading("language").setDefaults("en").setDescription("Enter the dictionary language"))
+            .add(dm.createPropertyMetaData().setId("words").setHeading("words database").setDescription("Enter the dictionary words (comma separated)"))
+            .setInterface(DictionaryService.class.getName(), null)
+            .setImplementation(DictionaryImpl.class)
+            .add(createServiceDependency().setService(LogService.class)); // Null Object
+            
+        dm.add(factory);
+        
+        // Create the Dictionary Aspect
+        Component aspect = createAspectComponent()
+        	.setAspect(DictionaryService.class, "(lang=en)", 10)
+            .setImplementation(DictionaryAspect.class)
+            .add(createServiceDependency().setService(LogService.class)) // NullObject
+            .add(createConfigurationDependency()
+                .setPid(DictionaryAspectConfiguration.class.getName()).setCallback("updated", DictionaryConfiguration.class)
+                .setHeading("Spell Checker Aspect Dictionary")
+                .setDescription("Enter english words (comma separated)")
+                .add(dm.createPropertyMetaData().setId("words").setHeading("Dictionary aspect words").setDescription("Enter enlish words")));
+        dm.add(aspect);
+        
+        // Create the SpellChecker component
+        Hashtable<String, Object> props = new Hashtable<>();
+        props.put(CommandProcessor.COMMAND_SCOPE, "dictionary");
+        props.put(CommandProcessor.COMMAND_FUNCTION, new String[] { "spellcheck" });
+        dm.add(createComponent()
+            .setImplementation(SpellChecker.class)
+            .setInterface(SpellChecker.class.getName(), props)
+            .add(createServiceDependency().setService(DictionaryService.class).setRequired(true))
+            .add(createServiceDependency().setService(LogService.class))); // NullObject
+    }
+}

Added: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryAspect.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryAspect.java?rev=1842034&view=auto
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryAspect.java (added)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryAspect.java Wed Sep 26 16:45:35 2018
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
+ * required by applicable law or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.dependencymanager.samples.dictionary.metatype;
+
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.osgi.service.log.LogService;
+
+/**
+ * This aspect applies to the English DictionaryService, and allows to decorate it with some
+ * custom English words, which are configurable from WebConsole.
+ * 
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class DictionaryAspect implements DictionaryService {
+    /**
+     * This is the service this aspect is applying to.
+     */
+    private volatile DictionaryService m_originalDictionary;
+
+    /**
+     * We store all configured words in a thread-safe data structure, because ConfigAdmin may
+     * invoke our updated method at any time.
+     */
+    private CopyOnWriteArrayList<String> m_words = new CopyOnWriteArrayList<String>();
+
+    /**
+     * We'll use the OSGi log service for logging. If no log service is available, then we'll
+     * use a NullObject.
+     */
+    private LogService m_log;
+
+    /**
+     * Defines a configuration dependency for retrieving our english custom words (by default,
+     * our PID is our full class name).
+     */
+    protected void updated(DictionaryConfiguration config) {
+        if (config != null) {
+            m_words.clear();
+            for (String word : config.words()) {
+                m_words.add(word);
+            }
+        }
+    }
+
+    /**
+     * Our Aspect Service is starting and is about to be registered in the OSGi regsitry.
+     */
+    protected void start() {
+        m_log.log(LogService.LOG_INFO, "Starting aspect Dictionary with words: " + m_words
+            + "; original dictionary service=" + m_originalDictionary);
+    }
+
+    /**
+     * Checks if a word is found from our custom word list. if not, delegate to the decorated
+     * dictionary.
+     */
+    public boolean checkWord(String word) {
+        m_log.log(LogService.LOG_INFO, "DictionaryAspect: checking word " + word + " (original dictionary="
+            + m_originalDictionary + ")");
+        if (m_words.contains(word)) {
+            return true;
+        }
+        return m_originalDictionary.checkWord(word);
+    }
+
+    public String toString() {
+        return "DictionaryAspect: words=" + m_words + "; original dictionary=" + m_originalDictionary;
+    }
+}

Added: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryAspectConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryAspectConfiguration.java?rev=1842034&view=auto
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryAspectConfiguration.java (added)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryAspectConfiguration.java Wed Sep 26 16:45:35 2018
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.dependencymanager.samples.dictionary.metatype;
+
+import java.util.List;
+
+/**
+ * This interface describes the configuration for our DictionaryAspect component.
+ * 
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public interface DictionaryAspectConfiguration {
+    List<String> words();
+}

Added: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryConfiguration.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryConfiguration.java?rev=1842034&view=auto
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryConfiguration.java (added)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryConfiguration.java Wed Sep 26 16:45:35 2018
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.dependencymanager.samples.dictionary.metatype;
+
+import java.util.List;
+
+/**
+ * This interface describes the configuration for our DictionaryImpl component.
+ * 
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public interface DictionaryConfiguration {
+    String lang();
+
+    List<String> words();
+}

Added: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryImpl.java?rev=1842034&view=auto
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryImpl.java (added)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryImpl.java Wed Sep 26 16:45:35 2018
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.dependencymanager.samples.dictionary.metatype;
+
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.osgi.service.log.LogService;
+
+/**
+ * A Dictionary Service, instantiated from webconsole, when you add some configurations instances to the
+ * DictionaryConfiguration factory pid. The Configuration metatype informations is described using the
+ * bnd metatype information (see the DictionaryConfiguration interface).
+ * 
+ * You must configure at least one Dictionary from web console, since the SpellCheck won't start if no Dictionary
+ * Service is available.
+ * 
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class DictionaryImpl implements DictionaryService {
+    /**
+     * The key of our config admin dictionary values.
+     */
+    final static String WORDS = "words";
+
+    /**
+     * We store all configured words in a thread-safe data structure, because ConfigAdmin
+     * may invoke our updated method at any time.
+     */
+    private CopyOnWriteArrayList<String> m_words = new CopyOnWriteArrayList<String>();
+
+    /**
+     * We'll use the OSGi log service for logging. If no log service is available, then we'll use a NullObject.
+     */
+    private LogService m_log;
+
+    /**
+     * Our Dictionary language.
+     */
+    private String m_lang;
+
+    /**
+     * Our service will be initialized from ConfigAdmin.
+     * @param config The configuration where we'll lookup our words list (key=".words").
+     */
+    protected void updated(DictionaryConfiguration cnf) {
+        m_lang = cnf.lang();
+        m_words.clear();
+        for (String word : cnf.words()) {
+            m_words.add(word);
+        }
+    }
+
+    /**
+     * A new Dictionary Service is starting (because a new factory configuration has been created
+     * from webconsole).
+     */
+    protected void start() {
+        m_log.log(LogService.LOG_INFO, "Starting Dictionary Service with language: " + m_lang);
+    }
+
+    /**
+     * Check if a word exists if the list of words we have been configured from ConfigAdmin/WebConsole.
+     */
+    public boolean checkWord(String word) {
+        return m_words.contains(word);
+    }
+
+    @Override
+    public String toString() {
+        return "Dictionary: language=" + m_lang + ", words=" + m_words;
+    }
+}

Added: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryService.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryService.java?rev=1842034&view=auto
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryService.java (added)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/DictionaryService.java Wed Sep 26 16:45:35 2018
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.dependencymanager.samples.dictionary.metatype;
+
+/**
+ * A simple service interface that defines a dictionary service. A dictionary
+ * service simply verifies the existence of a word. 
+ * 
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public interface DictionaryService {
+    /**
+     * Check for the existence of a word.
+     * 
+     * @param word the word to be checked.
+     * @return true if the word is in the dictionary, false otherwise.
+     */
+    public boolean checkWord(String word);
+}

Added: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/README
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/README?rev=1842034&view=auto
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/README (added)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/README Wed Sep 26 16:45:35 2018
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+This is the same example from the 
+org.apache.felix.dependencymanager.samples.dictionary.api example, except that the
+configuration metatypes are declared using dependency manager API instead of using
+standard osgi metatypes annotations.

Added: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/SpellChecker.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/SpellChecker.java?rev=1842034&view=auto
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/SpellChecker.java (added)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dictionary/metatype/SpellChecker.java Wed Sep 26 16:45:35 2018
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.dependencymanager.samples.dictionary.metatype;
+
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+import org.apache.felix.service.command.Descriptor;
+import org.osgi.service.log.LogService;
+
+/**
+ * Felix "spellcheck" Gogo Shell Command. This command allows to check if some given words are valid or not.
+ * This command will be activated only if (at least) one DictionaryService has been injected.
+ * To create a Dictionary Service, you have to go the the web console and add a configuration in the 
+ * "Dictionary Configuration" factory pid.
+ * 
+ * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ */
+public class SpellChecker {
+    /**
+     * We'll use the OSGi log service for logging. If no log service is available, then we'll use a NullObject.
+     */
+    private volatile LogService m_log;
+
+    /**
+     * We'll store all Dictionaries in a concurrent list, in order to avoid method synchronization.
+     * (Auto-Injected from Activator, at any time).
+     */
+    private final Iterable<DictionaryService> m_dictionaries = new ConcurrentLinkedQueue<>();
+
+    /**
+     * Lifecycle method callback, used to check if our service has been activated.
+     */
+    protected void start() {
+        m_log.log(LogService.LOG_WARNING, "Spell Checker started");
+    }
+
+    /**
+     * Lifecycle method callback, used to check if our service has been activated.
+     */
+    protected void stop() {
+        m_log.log(LogService.LOG_WARNING, "Spell Checker stopped");
+    }
+
+    // --- Gogo Shell command
+
+    @Descriptor("checks if word is found from an available dictionary")
+    public void spellcheck(@Descriptor("the word to check") String word) {
+        m_log.log(LogService.LOG_INFO, "Checking spelling of word \"" + word + "\" using the following dictionaries: "
+            + m_dictionaries);
+
+        for (DictionaryService dictionary : m_dictionaries) {
+            if (dictionary.checkWord(word)) {
+                System.out.println("word " + word + " is correct");
+                return;
+            }
+        }
+        System.err.println("word " + word + " is incorrect");
+    }
+}

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/FileStorage.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/FileStorage.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/FileStorage.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/FileStorage.java Wed Sep 26 16:45:35 2018
@@ -28,7 +28,8 @@ import org.osgi.service.log.LogService;
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@Component(properties={@Property(name="type", value="file")})
+@Component
+@Property(name="type", value="file")
 public class FileStorage implements Storage {
 	@ServiceDependency
 	volatile LogService log; // injected

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/MapDBStorage.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/MapDBStorage.java?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/MapDBStorage.java (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/src/org/apache/felix/dependencymanager/samples/dynamicdep/annot/MapDBStorage.java Wed Sep 26 16:45:35 2018
@@ -28,7 +28,8 @@ import org.osgi.service.log.LogService;
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-@Component(properties={@Property(name="type", value="mapdb")})
+@Component
+@Property(name="type", value="mapdb")
 public class MapDBStorage implements Storage {
 	@ServiceDependency
 	volatile LogService log; // injected

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/tpool.bndrun
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/tpool.bndrun?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/tpool.bndrun (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.samples/tpool.bndrun Wed Sep 26 16:45:35 2018
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
--runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runfw: ${felix.framework}
 -runee: JavaSE-1.8
 -runsystemcapabilities: ${native_capability}
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd Wed Sep 26 16:45:35 2018
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 -buildpath: \
-	org.mockito.mockito-all;version=1.9,\
+	${mockito},\
 	org.apache.felix.dependencymanager;version=latest,\
 	${junit},\
 	osgi.core;version=6.0,\
@@ -24,10 +24,14 @@
 Private-Package: \
 	org.apache.felix.dm.shell
 Bundle-Activator:org.apache.felix.dm.shell.Activator
-Bundle-Version: 4.0.6
+Bundle-Version: 4.0.7
 Include-Resource: META-INF/=resources/
 Bundle-Name: Apache Felix Dependency Manager Shell
 Bundle-Description: Gogo Shell commands for Apache Felix Dependency Manager
 Bundle-Category: osgi
 Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
-Bundle-Vendor: The Apache Software Foundation 
\ No newline at end of file
+Bundle-Vendor: The Apache Software Foundation 
+-testpath: \
+	${junit},\
+	${mockito},\
+	org.objenesis;version=2.2

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/resources/changelog.txt
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/resources/changelog.txt?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/resources/changelog.txt (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager.shell/resources/changelog.txt Wed Sep 26 16:45:35 2018
@@ -1,3 +1,17 @@
+Release Notes - Felix - Version org.apache.felix.dependencymanager-r12
+======================================================================
+
+** List of bundles being part of the release:
+    * org.apache.felix.dependencymanager; version=4.5.0
+    * org.apache.felix.dependencymanager.shell; version=4.0.7
+    * org.apache.felix.dependencymanager.runtime; version=4.0.6
+    * org.apache.felix.dependencymanager.annotation; version=5.0.0
+    * org.apache.felix.dependencymanager.lambda; version=1.2.0
+
+** Improvement
+
+	* [FELIX-5937] - Refactor DM bndtools/gradle project
+
 Release Notes - Felix - Version org.apache.felix.dependencymanager-r11
 ======================================================================
 

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd Wed Sep 26 16:45:35 2018
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 -buildpath: \
-	org.mockito.mockito-all;version=1.9,\
+	${mockito},\
 	${junit},\
 	osgi.core;version=6.0,\
 	osgi.cmpn;version=6.0,\
@@ -27,11 +27,12 @@ Private-Package: \
 	org.apache.felix.dm.impl.metatype
 Export-Package:  \
 	org.apache.felix.dm,\
+	org.apache.felix.dm.compat,\
 	org.apache.felix.dm.tracker,\
 	org.apache.felix.dm.context,\
 	org.apache.felix.dm.diagnostics
 Include-Resource: META-INF/=resources/
-Import-Package: !org.junit,!org.mockito.*,*
+Import-Package: !org.junit,!org.mockito.*,org.osgi.framework;version="[1.8, 2)",*
 Bundle-Activator: org.apache.felix.dm.impl.Activator
 Bundle-Version: 4.5.0
 Bundle-Name: Apache Felix Dependency Manager
@@ -40,3 +41,8 @@ Bundle-License: http://www.apache.org/li
 Bundle-DocURL: http://felix.apache.org/documentation/subprojects/apache-felix-dependency-manager.html
 Bundle-Vendor: The Apache Software Foundation
 Bundle-Category: osgi
+
+-testpath: \
+	${junit},\
+	${mockito},\
+	org.objenesis;version=2.2

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/resources/changelog.txt
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/resources/changelog.txt?rev=1842034&r1=1842033&r2=1842034&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/resources/changelog.txt (original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/resources/changelog.txt Wed Sep 26 16:45:35 2018
@@ -1,9 +1,23 @@
 Release Notes - Felix - Version org.apache.felix.dependencymanager-r12
 ======================================================================
 
+** List of bundles being part of the release:
+    * org.apache.felix.dependencymanager; version=4.5.0
+    * org.apache.felix.dependencymanager.shell; version=4.0.7
+    * org.apache.felix.dependencymanager.runtime; version=4.0.6
+    * org.apache.felix.dependencymanager.annotation; version=5.0.0
+    * org.apache.felix.dependencymanager.lambda; version=1.2.0
+
 ** Bug
     * [FELIX-5683] - getServiceProperties returns null instead of empty dictionary
+    * [FELIX-5938] - DM not working with latest Felix Framework
+
+** Improvement
 
+    * [FELIX-5937] - Refactor DM bndtools/gradle project
+    * [FELIX-5941] - DM APi enhancements
+    * [FELIX-5336] - Add support for prototype scope services in DM4
+	
 Release Notes - Felix - Version org.apache.felix.dependencymanager-r11
 ======================================================================