incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject svn commit: r1591865 - in /sling/trunk/tooling/maven/archetypes: bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java bundle/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
Date Fri, 02 May 2014 10:55:09 GMT
Author: rombert
Date: Fri May  2 10:55:09 2014
New Revision: 1591865

URL: http://svn.apache.org/r1591865
Log:
SLING-3539 - SimpleDSComponent from archetypes does nothing by default

Modified:
    sling/trunk/tooling/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
    sling/trunk/tooling/maven/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java

Modified: sling/trunk/tooling/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java?rev=1591865&r1=1591864&r2=1591865&view=diff
==============================================================================
--- sling/trunk/tooling/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
(original)
+++ sling/trunk/tooling/maven/archetypes/bundle-for-jcrinstall/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
Fri May  2 10:55:09 2014
@@ -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());

Modified: sling/trunk/tooling/maven/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java?rev=1591865&r1=1591864&r2=1591865&view=diff
==============================================================================
--- sling/trunk/tooling/maven/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
(original)
+++ sling/trunk/tooling/maven/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/SimpleDSComponent.java
Fri May  2 10:55:09 2014
@@ -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());



Mime
View raw message