sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject [sling-bundle-archetype] 15/19: SLING-3539 - SimpleDSComponent from archetypes does nothing by default
Date Tue, 07 Nov 2017 09:13:29 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit db9991545e2797d7c4fb23429c17460aa52aa67b
Author: Robert Munteanu <rombert@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@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" <commits@sling.apache.org>.

Mime
View raw message