You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:14:34 UTC

[sling-jcrinstall-bundle-archetype] 14/18: SLING-3539 - SimpleDSComponent from archetypes does nothing by default

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag sling-jcrinstall-bundle-archetype-1.0.2
in repository https://gitbox.apache.org/repos/asf/sling-jcrinstall-bundle-archetype.git

commit e1b8e250ce9624767994ce1efc88150731e61cf8
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri May 2 10:55:09 2014 +0000

    SLING-3539 - SimpleDSComponent from archetypes does nothing by default
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/archetypes/bundle-for-jcrinstall@1591865 13f79535-47bb-0310-9956-ffa450edef68
---
 .../archetype-resources/src/main/java/SimpleDSComponent.java        | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java b/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
index 22a4ce0..64fe8eb 100644
--- a/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
+++ b/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
@@ -20,6 +20,7 @@ package ${package};
 
 
 import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Property;
 import org.apache.felix.scr.annotations.Service;
 
 import org.osgi.framework.BundleContext;
@@ -28,10 +29,13 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Just a simple DS Component
+ * A simple DS component which is executed every 10 seconds
+ *
+ * @see <a href="https://sling.apache.org/documentation/bundles/scheduler-service-commons-scheduler.html">Scheduler Service</a>
  */
 @Component(metatype=true)
 @Service
+@Property( name="scheduler.period", longValue = 10)
 public class SimpleDSComponent implements Runnable {
     
     private Logger logger = LoggerFactory.getLogger(this.getClass());

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.