svn commit: r1465870 - /felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext
Author: fmeschbe Date: Tue Apr 9 03:37:16 2013 New Revision: 1465870 URL: http://svn.apache.org/r1465870 Log: fix formatting Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext?rev=1465870r1=1465869r2=1465870view=diff == --- felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext (original) +++ felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext Tue Apr 9 03:37:16 2013 @@ -19,7 +19,7 @@ First of all the component must be imple For the sake of example, lets define a very simple class, which implements a `java.util.Comparator` service: -DIV class=code panel style=border-style: solid;border-width: 1px;DIV class=codeHeader panelHeader style=border-bottom-width: 1px;border-bottom-style: solid;Bsample/SampleComparator.java/B/DIVDIV class=codeContent panelContent +:::java package sample; import java.util.Comparator; public class SampleComparator implements Comparator @@ -38,9 +38,9 @@ This is of course a very simple and not The next step consists of writing the declaration. I usually put these files in the `OSGI-INF` folder of the bundle, but the files may be placed anywhere within the bundle or any of the bundle's fragments as long as its path is listed in the `Service-Component` bundle manifest header. -So here we go with the file: +So here we go with the `OSGI-INF/sample.xml` file: -DIV class=code panel style=border-style: solid;border-width: 1px;DIV class=codeHeader panelHeader style=border-bottom-width: 1px;border-bottom-style: solid;BOSGI-INF/sample.xml/B/DIVDIV class=codeContent panelContent +:::xml ?xml version=1.0 encoding=UTF-8? component name=sample.component immediate=true implementation class=sample.SampleComparator / @@ -71,7 +71,7 @@ It may well be that the component needs Here is the initial class extended with activation and deactivation methods: -DIV class=code panel style=border-style: solid;border-width: 1px;DIV class=codeHeader panelHeader style=border-bottom-width: 1px;border-bottom-style: solid;Bsample/SampleComparator.java/B/DIVDIV class=codeContent panelContent +:::java package sample; import java.util.Comparator; import org.osgi.service.component.ComponentContext; @@ -105,7 +105,7 @@ The next step would probably be to do so To use the service, the reference must be declared in the service declaration in an *reference* element. Here is the respective declaration for a log service to lookup: -DIV class=code panel style=border-style: solid;border-width: 1px;DIV class=codeHeader panelHeader style=border-bottom-width: 1px;border-bottom-style: solid;BLogService Reference/B/DIVDIV class=codeContent panelContent +:::xml component... ... reference name=http @@ -119,7 +119,7 @@ To use the service, the reference must b To use this service you call the `ComponentContext.getService(String)` method, for example in the `activate` method: - +:::java protected void activate(ComponentContext context) { HttpService http = ( HttpService ) context.locateService( http ); @@ -134,7 +134,7 @@ When using the event strategy, you will First here is the reference declaration: -DIV class=code panel style=border-style: solid;border-width: 1px;DIV class=codeHeader panelHeader style=border-bottom-width: 1px;border-bottom-style: solid;BLogService Reference/B/DIVDIV class=codeContent panelContent +:::xml component... ... reference name=log @@ -151,6 +151,7 @@ First here is the reference declaration: And here is some code: +:::java private LogService log; protected void activate(ComponentContext context) @@ -202,7 +203,7 @@ This configuration mechanism is implemen ## Non-Standard Component Factory Behaviour div class=note markdown=1 -If you don't know what this section is about, just ignore it and leave the `ds.factory.enabled` configuration property unconfigured. +If you don't know what this section is about, just ignore it and leave the codeds.factory.enabled/code configuration property unconfigured. /div Versions of the Apache Felix Declarative Services implementation prior to 1.2.0 supported handling of Component Factory components which is not specification compliant. @@ -242,7 +243,7 @@ The administrative API commands are also The API consists of the main interface `org.apache.felix.scr.ScrService` and two helper interfaces `org.apache.felix.scr.Component` describing a registered component and `org.apache.felix.scr.Reference`
svn commit: r1465871 - /felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext
Author: fmeschbe Date: Tue Apr 9 03:41:42 2013 New Revision: 1465871 URL: http://svn.apache.org/r1465871 Log: fix list in table Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext?rev=1465871r1=1465870r2=1465871view=diff == --- felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext (original) +++ felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext Tue Apr 9 03:41:42 2013 @@ -1,4 +1,3 @@ -translation_pending: true Title: Apache Felix Service Component Runtime [TOC] @@ -186,17 +185,20 @@ The following properties are supported: | Property | Default Value | Description | |--|--|--| -| `ds.loglevel` | 1 | Defines a logging level at which messages are logged. This configuration property is converted to an `int` number used as the OSGi Log Service logging level. -* If the property is a number, the `int` value of the number is used -* If the property is a string parseable to an `int` the parsed value is used -* If the property is any of the strings *debug*, *info*, *warn*, or *error*, the respective log level of `4`, `3`, `2`, or `1` is used. -* Otherwise, unless the `ds.showtrace` or `ds.showerrors` property is set, the default value is assumed | +| `ds.loglevel` | 1 | Defines a logging level at which messages are logged. This configuration property is converted to an `int` number used as the OSGi Log Service logging level. | | `ds.showtrace` | `false` | sets the log level to `debug` if set to `true` and the `ds.loglevel` cannot be converted to a value log level | | `ds.showerrors` | `true` | Disables logging completely if set to `false` and the `ds.loglevel` cannot be converted to a value log level and the `ds.showtrace` is not set to `true` | | `ds.factory.enabled` | `false` | Enables Component Factory functionality not compliant with the Declarative Services 1.1 specification if set to `true`. Only set this if you really know you need this. See the *Non-Standard Component Factory Behaviour* section below for more details. | | `ds.ctworkaround` | `false` | Enables workaround functionality to pass the OSGi CT. Generally this property should not be set to `true` because it enables behaviour which is not compliant with the Declarative Services 1.1 specification. See [FELIX-2526](https://issues.apache.org/jira/browse/FELIX-2526) for details. | | `ds.delayed.keepInstances` | `false` | Whether or not to keep instances of delayed components once they are not referred to any more. The Declarative Services specifications suggests that instances of delayed components are disposed off if there is not used any longer. Setting this flag causes the components to not be disposed off and thus prevent them from being constantly recreated if often used. Examples of such components may be EventHandler services. The default is to dispose off unused components. See [FELIX-3039](https://issues.apache.org/jira/browse/FELIX-3039) for details. | +The `ds.loglevel` property is treated as follows: + +* If the property is a number, the `int` value of the number is used +* If the property is a string parseable to an `int` the parsed value is used +* If the property is any of the strings *debug*, *info*, *warn*, or *error*, the respective log level of `4`, `3`, `2`, or `1` is used +* Otherwise, unless the `ds.showtrace` or `ds.showerrors` property is set, the default value is assumed + This configuration mechanism is implemented in the [ScrConfiguration](http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java) and its helper classes.
svn commit: r857831 - in /websites/staging/felix/trunk/content: ./ documentation/subprojects/apache-felix-service-component-runtime.html
Author: buildbot Date: Tue Apr 9 03:42:47 2013 New Revision: 857831 Log: Staging update by buildbot for felix Modified: websites/staging/felix/trunk/content/ (props changed) websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.html Propchange: websites/staging/felix/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue Apr 9 03:42:47 2013 @@ -1 +1 @@ -1465870 +1465871 Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.html == --- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.html (original) +++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.html Tue Apr 9 03:42:47 2013 @@ -67,11 +67,6 @@ /div - div class=tip - This page is a translated version of a href=/site/apache-felix-service-component-runtime.html target=felix_cwiki/site/apache-felix-service-component-runtime.html/a. In case of - doubt you might want to refer to the old page. - /div - h1Apache Felix Service Component Runtime/h1 div class=toc @@ -257,26 +252,6 @@ tdDefines a logging level at which messages are logged. This configuration property is converted to an codeint/code number used as the OSGi Log Service logging level./td /tr tr -td* If the property is a number, the codeint/code value of the number is used/td -td/td -td/td -/tr -tr -td* If the property is a string parseable to an codeint/code the parsed value is used/td -td/td -td/td -/tr -tr -td* If the property is any of the strings emdebug/em, eminfo/em, emwarn/em, or emerror/em, the respective log level of code4/code, code3/code, code2/code, or code1/code is used./td -td/td -td/td -/tr -tr -td* Otherwise, unless the codeds.showtrace/code or codeds.showerrors/code property is set, the default value is assumed/td -td/td -td/td -/tr -tr tdcodeds.showtrace/code/td tdcodefalse/code/td tdsets the log level to codedebug/code if set to codetrue/code and the codeds.loglevel/code cannot be converted to a value log level/td @@ -303,6 +278,13 @@ /tr /tbody /table +pThe codeds.loglevel/code property is treated as follows:/p +ul +liIf the property is a number, the codeint/code value of the number is used/li +liIf the property is a string parseable to an codeint/code the parsed value is used/li +liIf the property is any of the strings emdebug/em, eminfo/em, emwarn/em, or emerror/em, the respective log level of code4/code, code3/code, code2/code, or code1/code is used/li +liOtherwise, unless the codeds.showtrace/code or codeds.showerrors/code property is set, the default value is assumed/li +/ul pThis configuration mechanism is implemented in the a href=http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/config/ScrConfiguration.java;ScrConfiguration/a and its helper classes./p h2 id=non-standard-component-factory-behaviourNon-Standard Component Factory Behaviour/h2 div class=note markdown=1 @@ -365,7 +347,7 @@ If you don't know what this section is a pThis tutorial just listed some very basic information on Declarative Service. To get more information, for example on hoe the Configuration Admin Service may be used to configure components, refer to the Declarative Services Sepecification in the OSGi Service Platform emService Compendium/em book./p pHave Fun !/p div class=timestamp style=margin-top: 30px; font-size: 80%; text-align: right; -Rev. 1465870 by fmeschbe on Tue, 9 Apr 2013 03:37:16 + +Rev. 1465871 by fmeschbe on Tue, 9 Apr 2013 03:41:42 + /div div class=trademarkFooter Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project
svn commit: r1465872 - in /felix/site/trunk/content/site: .htaccess apache-felix-service-component-runtime.html
Author: fmeschbe Date: Tue Apr 9 03:46:31 2013 New Revision: 1465872 URL: http://svn.apache.org/r1465872 Log: Remove old Service Component Runtime page Removed: felix/site/trunk/content/site/apache-felix-service-component-runtime.html Modified: felix/site/trunk/content/site/.htaccess Modified: felix/site/trunk/content/site/.htaccess URL: http://svn.apache.org/viewvc/felix/site/trunk/content/site/.htaccess?rev=1465872r1=1465871r2=1465872view=diff == --- felix/site/trunk/content/site/.htaccess (original) +++ felix/site/trunk/content/site/.htaccess Tue Apr 9 03:46:31 2013 @@ -6,6 +6,7 @@ Redirect Permanent /site/using-the-osgi- Redirect Permanent /site/apache-felix-maven-scr-plugin.html /documentation/subprojects/apache-felix-maven-scr-plugin.html Redirect Permanent /site/apache-felix-maven-scr-plugin-use.html /documentation/subprojects/apache-felix-maven-scr-plugin/apache-felix-maven-scr-plugin-use.html Redirect Permanent /site/apache-felix-osgi-faq.html /documentation/tutorials-examples-and-presentations/apache-felix-osgi-faq.html +Redirect Permanent /site/apache-felix-service-component-runtime.html /documentation/subprojects/apache-felix-service-component-runtime.html Redirect Permanent /site/apache-felix-scr-ant-task-use.html /documentation/subprojects/apache-felix-maven-scr-plugin/apache-felix-scr-ant-task-use.html Redirect Permanent /site/apache-felix-framework-usage-documentation.html /documentation/subprojects/apache-felix-framework/apache-felix-framework-usage-documentation.html Redirect Permanent /site/committers.html /documentation/development/committers.html
svn commit: r1465873 - /felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext
Author: fmeschbe Date: Tue Apr 9 03:46:54 2013 New Revision: 1465873 URL: http://svn.apache.org/r1465873 Log: CMS commit to felix by fmeschbe Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext Modified: felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext URL: http://svn.apache.org/viewvc/felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext?rev=1465873r1=1465872r2=1465873view=diff == --- felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext (original) +++ felix/site/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.mdtext Tue Apr 9 03:46:54 2013 @@ -1,5 +1,4 @@ -Title: Apache Felix Service Component Runtime - +Title: Apache Felix Service Component Runtime (SCR) [TOC] The Apache Felix Service Component Runtime described by the OSGi Declarative Services Specification is implemented by the `org.apache.felix.scr` bundle. As specified, the components must be declared in XML-formatted descriptor files which in turn must be listed in the `Service-Component` header of the declaring bundle.
svn commit: r857832 - in /websites/staging/felix/trunk/content: ./ documentation/subprojects.html site/.htaccess site/apache-felix-service-component-runtime.html sitemap.html
Author: buildbot Date: Tue Apr 9 03:51:34 2013 New Revision: 857832 Log: Staging update by buildbot for felix Removed: websites/staging/felix/trunk/content/site/apache-felix-service-component-runtime.html Modified: websites/staging/felix/trunk/content/ (props changed) websites/staging/felix/trunk/content/documentation/subprojects.html websites/staging/felix/trunk/content/site/.htaccess websites/staging/felix/trunk/content/sitemap.html Propchange: websites/staging/felix/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue Apr 9 03:51:34 2013 @@ -1 +1 @@ -1465871 +1465872 Modified: websites/staging/felix/trunk/content/documentation/subprojects.html == --- websites/staging/felix/trunk/content/documentation/subprojects.html (original) +++ websites/staging/felix/trunk/content/documentation/subprojects.html Tue Apr 9 03:51:34 2013 @@ -86,6 +86,7 @@ lia href=/documentation/subprojects/apache-felix-gogo.htmlApache Felix Gogo/a/li lia href=/documentation/subprojects/apache-felix-http-service.htmlApache Felix HTTP Service/a/li lia href=/documentation/subprojects/apache-felix-ipojo.htmlApache Felix iPOJO/a/li +lia href=/documentation/subprojects/apache-felix-jaas.htmlApache Felix JAAS Support/a/li lia href=/documentation/subprojects/apache-felix-lightweight-http-service.htmlApache Felix Lightweight HTTP Service/a/li lia href=/documentation/subprojects/apache-felix-log.htmlApache Felix Log/a/li lia href=/documentation/subprojects/apache-felix-manifest-generator-mangen.htmlApache Felix Manifest Generator (mangen)/a/li Modified: websites/staging/felix/trunk/content/site/.htaccess == --- websites/staging/felix/trunk/content/site/.htaccess (original) +++ websites/staging/felix/trunk/content/site/.htaccess Tue Apr 9 03:51:34 2013 @@ -6,6 +6,7 @@ Redirect Permanent /site/using-the-osgi- Redirect Permanent /site/apache-felix-maven-scr-plugin.html /documentation/subprojects/apache-felix-maven-scr-plugin.html Redirect Permanent /site/apache-felix-maven-scr-plugin-use.html /documentation/subprojects/apache-felix-maven-scr-plugin/apache-felix-maven-scr-plugin-use.html Redirect Permanent /site/apache-felix-osgi-faq.html /documentation/tutorials-examples-and-presentations/apache-felix-osgi-faq.html +Redirect Permanent /site/apache-felix-service-component-runtime.html /documentation/subprojects/apache-felix-service-component-runtime.html Redirect Permanent /site/apache-felix-scr-ant-task-use.html /documentation/subprojects/apache-felix-maven-scr-plugin/apache-felix-scr-ant-task-use.html Redirect Permanent /site/apache-felix-framework-usage-documentation.html /documentation/subprojects/apache-felix-framework/apache-felix-framework-usage-documentation.html Redirect Permanent /site/committers.html /documentation/development/committers.html Modified: websites/staging/felix/trunk/content/sitemap.html == --- websites/staging/felix/trunk/content/sitemap.html (original) +++ websites/staging/felix/trunk/content/sitemap.html Tue Apr 9 03:51:34 2013 @@ -244,6 +244,7 @@ lia href=/documentation/subprojects/apache-felix-ipojo/related-works.htmlRelated Works/a/li /ul /li +lia href=/documentation/subprojects/apache-felix-jaas.htmlApache Felix JAAS Support/a/li lia href=/documentation/subprojects/apache-felix-lightweight-http-service.htmlApache Felix Lightweight HTTP Service/a/li lia href=/documentation/subprojects/apache-felix-log.htmlApache Felix Log/a/li lia href=/documentation/subprojects/apache-felix-manifest-generator-mangen.htmlApache Felix Manifest Generator (mangen)/a/li
svn commit: r857833 - in /websites/staging/felix/trunk/content: ./ documentation/subprojects/apache-felix-service-component-runtime.html
Author: buildbot Date: Tue Apr 9 03:51:46 2013 New Revision: 857833 Log: Staging update by buildbot for felix Modified: websites/staging/felix/trunk/content/ (props changed) websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.html Propchange: websites/staging/felix/trunk/content/ -- --- cms:source-revision (original) +++ cms:source-revision Tue Apr 9 03:51:46 2013 @@ -1 +1 @@ -1465872 +1465873 Modified: websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.html == --- websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.html (original) +++ websites/staging/felix/trunk/content/documentation/subprojects/apache-felix-service-component-runtime.html Tue Apr 9 03:51:46 2013 @@ -18,7 +18,7 @@ limitations under the License. -- head -titleApache Felix - Apache Felix Service Component Runtime/title +titleApache Felix - Apache Felix Service Component Runtime (SCR)/title link rel=icon href=/res/favicon.ico link rel=stylesheet href=/res/site.css type=text/css media=all link rel=stylesheet href=/res/codehilite.css type=text/css media=all @@ -68,7 +68,7 @@ - h1Apache Felix Service Component Runtime/h1 + h1Apache Felix Service Component Runtime (SCR)/h1 div class=toc ul lia href=#exampleExample/a/li @@ -347,7 +347,7 @@ If you don't know what this section is a pThis tutorial just listed some very basic information on Declarative Service. To get more information, for example on hoe the Configuration Admin Service may be used to configure components, refer to the Declarative Services Sepecification in the OSGi Service Platform emService Compendium/em book./p pHave Fun !/p div class=timestamp style=margin-top: 30px; font-size: 80%; text-align: right; -Rev. 1465871 by fmeschbe on Tue, 9 Apr 2013 03:41:42 + +Rev. 1465873 by fmeschbe on Tue, 9 Apr 2013 03:46:54 + /div div class=trademarkFooter Apache Felix, Felix, Apache, the Apache feather logo, and the Apache Felix project
svn commit: r857834 - /websites/production/felix/content/
Author: fmeschbe Date: Tue Apr 9 03:52:13 2013 New Revision: 857834 Log: Fix SCR page (and remove old one) Added: websites/production/felix/content/ - copied from r857833, websites/staging/felix/trunk/content/