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 2013/09/22 22:02:52 UTC

svn commit: r1525423 - /felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/apache-felix-dependency-manager-using-annotations/dependencymanager-annotations-lifecycle.mdtext

Author: pderop
Date: Sun Sep 22 20:02:51 2013
New Revision: 1525423

URL: http://svn.apache.org/r1525423
Log:
CMS migration ...

Modified:
    felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/apache-felix-dependency-manager-using-annotations/dependencymanager-annotations-lifecycle.mdtext

Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/apache-felix-dependency-manager-using-annotations/dependencymanager-annotations-lifecycle.mdtext
URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/apache-felix-dependency-manager-using-annotations/dependencymanager-annotations-lifecycle.mdtext?rev=1525423&r1=1525422&r2=1525423&view=diff
==============================================================================
--- felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/apache-felix-dependency-manager-using-annotations/dependencymanager-annotations-lifecycle.mdtext (original)
+++ felix/site/trunk/content/documentation/subprojects/apache-felix-dependency-manager/apache-felix-dependency-manager-using-annotations/dependencymanager-annotations-lifecycle.mdtext Sun Sep 22 20:02:51 2013
@@ -103,7 +103,6 @@ For instance, if you define a Dependency
 
 Then you can return this map from your @Init method:
 
-    :::java
     @Init
     Map init() {
         return new HashMap() {{
@@ -118,7 +117,6 @@ So, after the init method returns, the m
 
 This is an example of a component X whose dependency "foo" filter is  configured from ConfigAdmin. First, we defined a ConfigurationDependency  in order to get injected with our configuration. Next, we define a  dependency on the *FooService*, but this time, we declare the annotation  like this: *@ServiceDependency(*{*}{*}name="foo"*{*}*)*. As explained  above, The  ConfigurationDependency will be injected *before* the @Init method, and  the named dependency ("foo") will be calculated *after* the @Init method  returns. So, from our Init method, we just return a map which contains  the filter and required flag for the "foo" dependency, and we actually  use the configuration which has already been injected:
 
-    :::java
     /**
      * A component whose FooService dependency filter is configured from ConfigAdmin
      */
@@ -231,7 +229,6 @@ following:
 
 But when the component needs to specify some service properties dynamically (not statically from the annotation), then it may do so by just returning a Map from the @Start callback. For instance:
 
-    :::java
     @Component(properties={@Property(name="foo", value="bar")})
     public class MyServiceImpl implements MyService {
         @ConfigurationDependency(pid="MyPid", propagate=true)