Author: pderop
Date: Wed Oct 17 21:07:30 2018
New Revision: 1844174

URL: http://svn.apache.org/viewvc?rev=1844174&view=rev
Log:
dm r13 updates

Modified:
    
felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/service-scopes.mdtext

Modified: 
felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/service-scopes.mdtext
URL: 
http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/service-scopes.mdtext?rev=1844174&r1=1844173&r2=1844174&view=diff
==============================================================================
--- 
felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/service-scopes.mdtext
 (original)
+++ 
felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/reference/service-scopes.mdtext
 Wed Oct 17 21:07:30 2018
@@ -130,12 +130,12 @@ you can also do it like this:
 
 # Scoped services and init/destroy callbacks
 
-When you need to specify dynamic dependencies from your component.init() 
method, 
+When you need to specify dynamic required dependencies from your 
component.init() method, 
 the following mechanism will be used:
 
-first, if your component defines an init callback, then one single component 
prototype instance singleton is created, as if the component is declared with 
SCOPE=SINGLETON.
-so, the prototype instance will be invoked in the init callback, but won't be 
started or stopped
-and when all dependencies are satisfied (including the dynamic dependencies), 
+First, if your component defines an init callback, then one single component 
prototype instance singleton is created, as if the component is declared with 
SCOPE=SINGLETON.
+So, the prototype instance will be invoked in the init callback, but won't be 
called in start()/stop(). 
+And when all dependencies are satisfied and injected (including the dynamic 
dependencies defined in the init method), 
 then the ServiceFactory (or PrototypeServiceFactory) is registered.
 And when one client will request a component instance, then a clone will be 
created and returned.
 
@@ -154,11 +154,11 @@ Example of a scoped component which defi
     
     public static class MyServiceImpl implements MyService {
         void init(Component comp) {
-            // add dependencies dynamically
+            // add required dependencies dynamically
         }
     
        void start() {
-          // only called on clones, not on the prototype instance
+          // only called on clone, not on the prototype instance singleton
        }
        
        void stop() {
@@ -166,14 +166,13 @@ Example of a scoped component which defi
        }
     }
 
-So, if you don't need an init callback then use the 
`Component.setCallbacks(null, "start", "stop", null)` 
-method in order to avoid the creation of the prototype instance.
+So, if you don't specify an init callback then the prototype instance 
singleton won't be instantiated. Also, 
 
 # Limitation when using DM ServiceDependency from API and ServiceObjects
 
-When using DependencyManager ServiceDependency from the native API (not using 
annotations), 
-you have to know that the ServiceDependency always internally dereferences and 
creates the 
-scoped service, even if you specify a ServiceObjecs 
+When using DependencyManager ServiceDependency from the DM API (not using 
annotations), 
+you have to know that the ServiceDependency always internally dereferences the 
+service dependency, even if you specify a ServiceObjecs 
 parameter in your bind method. If now you really want to disable the 
auto-deref ServiceDependency 
 (because you want to directly use the ServiceObjects API), you must then use 
the 
 "setDereference(false") method on your ServiceDependency: in this way, you 
tell DM to never 


Reply via email to