ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpouwe...@apache.org
Subject svn commit: r1732893 - in /ace/trunk: build/ cnf/localrepo/ cnf/localrepo/org.amdatu.scheduling.api/ cnf/localrepo/org.amdatu.scheduling.quartz/ org.apache.ace.authentication.itest/ org.apache.ace.authentication.itest/src/org/apache/ace/it/authenticati...
Date Mon, 29 Feb 2016 13:20:55 GMT
Author: bpouwelse
Date: Mon Feb 29 13:20:54 2016
New Revision: 1732893

URL: http://svn.apache.org/viewvc?rev=1732893&view=rev
Log:
ACE-533: Replaced the org.apache.ace.scheduler with Amdatu Scheduling

Updated all tasks to so the interval can be configured using a ManagedService / ManagedServiceFactory

Removed the org.apache.ace.scheduler project

This closes #11


Added:
    ace/trunk/cnf/localrepo/org.amdatu.scheduling.api/
    ace/trunk/cnf/localrepo/org.amdatu.scheduling.api/org.amdatu.scheduling.api-1.1.0.jar   (with props)
    ace/trunk/cnf/localrepo/org.amdatu.scheduling.quartz/
    ace/trunk/cnf/localrepo/org.amdatu.scheduling.quartz/org.amdatu.scheduling.quartz-1.0.4.jar   (with props)
    ace/trunk/run-relay/conf/org.apache.ace.repository.replication.cfg
Removed:
    ace/trunk/org.apache.ace.scheduler/
    ace/trunk/run-client/conf/org.apache.ace.scheduler.cfg
    ace/trunk/run-relay/conf/org.apache.ace.scheduler.cfg
    ace/trunk/run-server-allinone/conf/org.apache.ace.scheduler.cfg
    ace/trunk/run-server/conf/org.apache.ace.scheduler.cfg
Modified:
    ace/trunk/build/bnd.bnd
    ace/trunk/cnf/localrepo/index.xml
    ace/trunk/cnf/localrepo/index.xml.sha
    ace/trunk/org.apache.ace.authentication.itest/bnd.bnd
    ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java
    ace/trunk/org.apache.ace.client.automation/bnd.bnd
    ace/trunk/org.apache.ace.client.automation/src/org/apache/ace/client/automation/AutoTargetOperator.java
    ace/trunk/org.apache.ace.client.repository.itest/bnd.bnd
    ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/ClientAutomationTest.java
    ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd
    ace/trunk/org.apache.ace.deployment.itest/bnd.bnd
    ace/trunk/org.apache.ace.deployment/bnd.bnd
    ace/trunk/org.apache.ace.log.itest/bnd.bnd
    ace/trunk/org.apache.ace.log.itest/src/org/apache/ace/it/log/LogIntegrationTest.java
    ace/trunk/org.apache.ace.log/bnd.bnd
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/Activator.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/LogSyncTask.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogSyncConfigurator.java
    ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/task/LogSyncTask.java
    ace/trunk/org.apache.ace.repository/bnd.bnd
    ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/Activator.java
    ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/RepositoryReplicationTask.java
    ace/trunk/org.apache.ace.verifier/bnd.bnd
    ace/trunk/run-client/client.bndrun
    ace/trunk/run-client/conf/org.apache.ace.log.server.task.factory/auditlog.cfg
    ace/trunk/run-relay/conf/org.apache.ace.log.server.task.factory/auditlog.cfg
    ace/trunk/run-relay/relay.bndrun
    ace/trunk/run-server/server.bndrun

Modified: ace/trunk/build/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/build/bnd.bnd?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/build/bnd.bnd (original)
+++ ace/trunk/build/bnd.bnd Mon Feb 29 13:20:54 2016
@@ -35,7 +35,6 @@
 	org.apache.ace.repository,\
 	org.apache.ace.repository.itest,\
 	org.apache.ace.resourceprocessor.useradmin,\
-	org.apache.ace.scheduler,\
 	org.apache.ace.tageditor,\
 	org.apache.ace.target.mgmt.ui,\
 	org.apache.ace.test,\

Modified: ace/trunk/cnf/localrepo/index.xml
URL: http://svn.apache.org/viewvc/ace/trunk/cnf/localrepo/index.xml?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/cnf/localrepo/index.xml (original)
+++ ace/trunk/cnf/localrepo/index.xml Mon Feb 29 13:20:54 2016
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<repository increment="1456402641000" name="Local" xmlns="http://www.osgi.org/xmlns/repository/v1.0.0">
+<repository increment="1456435126000" name="Local" xmlns="http://www.osgi.org/xmlns/repository/v1.0.0">
   <resource>
     <capability namespace="osgi.identity">
       <attribute name="osgi.identity" value="bcpkix"/>
@@ -3278,6 +3278,168 @@
     </requirement>
   </resource>
   <resource>
+    <capability namespace="osgi.identity">
+      <attribute name="osgi.identity" value="org.amdatu.scheduling.api"/>
+      <attribute name="type" value="osgi.bundle"/>
+      <attribute name="version" type="Version" value="1.1.0"/>
+    </capability>
+    <capability namespace="osgi.content">
+      <attribute name="osgi.content" value="1952c3bd69db1dd350be853dec02fc2e4b0df01ee99d739bf93384ae581b7cf5"/>
+      <attribute name="url" value="org.amdatu.scheduling.api/org.amdatu.scheduling.api-1.1.0.jar"/>
+      <attribute name="size" type="Long" value="25551"/>
+      <attribute name="mime" value="application/vnd.osgi.bundle"/>
+    </capability>
+    <capability namespace="osgi.wiring.bundle">
+      <attribute name="osgi.wiring.bundle" value="org.amdatu.scheduling.api"/>
+      <attribute name="bundle-version" type="Version" value="1.1.0"/>
+    </capability>
+    <capability namespace="osgi.wiring.host">
+      <attribute name="osgi.wiring.host" value="org.amdatu.scheduling.api"/>
+      <attribute name="bundle-version" type="Version" value="1.1.0"/>
+    </capability>
+    <capability namespace="osgi.wiring.package">
+      <attribute name="osgi.wiring.package" value="org.amdatu.scheduling"/>
+      <attribute name="version" type="Version" value="1.1.0"/>
+      <attribute name="bundle-symbolic-name" value="org.amdatu.scheduling.api"/>
+      <attribute name="bundle-version" type="Version" value="1.1.0"/>
+    </capability>
+    <capability namespace="osgi.wiring.package">
+      <attribute name="osgi.wiring.package" value="org.amdatu.scheduling.annotations"/>
+      <attribute name="version" type="Version" value="1.0.0"/>
+      <attribute name="bundle-symbolic-name" value="org.amdatu.scheduling.api"/>
+      <attribute name="bundle-version" type="Version" value="1.1.0"/>
+    </capability>
+    <capability namespace="osgi.wiring.package">
+      <attribute name="osgi.wiring.package" value="org.amdatu.scheduling.annotations.timeinterval"/>
+      <attribute name="version" type="Version" value="1.0.0"/>
+      <attribute name="bundle-symbolic-name" value="org.amdatu.scheduling.api"/>
+      <attribute name="bundle-version" type="Version" value="1.1.0"/>
+    </capability>
+    <capability namespace="osgi.wiring.package">
+      <attribute name="osgi.wiring.package" value="org.amdatu.scheduling.constants"/>
+      <attribute name="version" type="Version" value="1.0.0"/>
+      <attribute name="bundle-symbolic-name" value="org.amdatu.scheduling.api"/>
+      <attribute name="bundle-version" type="Version" value="1.1.0"/>
+    </capability>
+    <requirement namespace="osgi.ee">
+      <directive name="filter" value="(&amp;(osgi.ee=JavaSE)(version=1.8))"/>
+    </requirement>
+  </resource>
+  <resource>
+    <capability namespace="osgi.identity">
+      <attribute name="osgi.identity" value="org.amdatu.scheduling.quartz"/>
+      <attribute name="type" value="osgi.bundle"/>
+      <attribute name="version" type="Version" value="1.0.4"/>
+    </capability>
+    <capability namespace="osgi.content">
+      <attribute name="osgi.content" value="5c84f7cc01ac2a5b3cdeeaa17fa9421e24281470bc1c8b8e281b3cadb5a9e3ac"/>
+      <attribute name="url" value="org.amdatu.scheduling.quartz/org.amdatu.scheduling.quartz-1.0.4.jar"/>
+      <attribute name="size" type="Long" value="629229"/>
+      <attribute name="mime" value="application/vnd.osgi.bundle"/>
+    </capability>
+    <capability namespace="osgi.wiring.bundle">
+      <attribute name="osgi.wiring.bundle" value="org.amdatu.scheduling.quartz"/>
+      <attribute name="bundle-version" type="Version" value="1.0.4"/>
+    </capability>
+    <capability namespace="osgi.wiring.host">
+      <attribute name="osgi.wiring.host" value="org.amdatu.scheduling.quartz"/>
+      <attribute name="bundle-version" type="Version" value="1.0.4"/>
+    </capability>
+    <capability namespace="osgi.wiring.package">
+      <attribute name="osgi.wiring.package" value="org.quartz"/>
+      <attribute name="version" type="Version" value="1.0.4"/>
+      <attribute name="bundle-symbolic-name" value="org.amdatu.scheduling.quartz"/>
+      <attribute name="bundle-version" type="Version" value="1.0.4"/>
+    </capability>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=com.mchange.v2.c3p0)"/>
+      <directive name="resolution" value="optional"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.ejb)"/>
+      <directive name="resolution" value="optional"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.mail)"/>
+      <directive name="resolution" value="optional"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.mail.internet)"/>
+      <directive name="resolution" value="optional"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.jms)"/>
+      <directive name="resolution" value="optional"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.rmi)"/>
+      <directive name="resolution" value="optional"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.naming)"/>
+      <directive name="resolution" value="optional"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.servlet)"/>
+      <directive name="resolution" value="optional"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.servlet.http)"/>
+      <directive name="resolution" value="optional"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.management)"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.management.openmbean)"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.sql)"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.transaction)"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.xml.bind)"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.xml.namespace)"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.xml.parsers)"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=javax.xml.xpath)"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=org.amdatu.scheduling)"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(&amp;(osgi.wiring.package=org.amdatu.scheduling.annotations)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(&amp;(osgi.wiring.package=org.amdatu.scheduling.annotations.timeinterval)(version&gt;=1.0.0)(!(version&gt;=2.0.0)))"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(&amp;(osgi.wiring.package=org.apache.felix.dm)(version&gt;=4.0.0)(!(version&gt;=5.0.0)))"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(&amp;(osgi.wiring.package=org.osgi.framework)(version&gt;=1.6.0)(!(version&gt;=2.0.0)))"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(&amp;(osgi.wiring.package=org.osgi.service.log)(version&gt;=1.3.0)(!(version&gt;=2.0.0)))"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=org.w3c.dom)"/>
+    </requirement>
+    <requirement namespace="osgi.wiring.package">
+      <directive name="filter" value="(osgi.wiring.package=org.xml.sax)"/>
+    </requirement>
+    <requirement namespace="osgi.ee">
+      <directive name="filter" value="(&amp;(osgi.ee=JavaSE)(version=1.8))"/>
+    </requirement>
+  </resource>
+  <resource>
     <capability namespace="osgi.identity">
       <attribute name="osgi.identity" value="org.apache.commons.cli"/>
       <attribute name="type" value="osgi.bundle"/>

Modified: ace/trunk/cnf/localrepo/index.xml.sha
URL: http://svn.apache.org/viewvc/ace/trunk/cnf/localrepo/index.xml.sha?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/cnf/localrepo/index.xml.sha (original)
+++ ace/trunk/cnf/localrepo/index.xml.sha Mon Feb 29 13:20:54 2016
@@ -1 +1 @@
-4ead2da8675a8fd5eaae16d020d3a301198fa9ce892374828661f51091ae6f11
\ No newline at end of file
+12e0829683c24b79a9343db8aa3a17d08b7d0b614587f0967a4c4a100ab3ed57
\ No newline at end of file

Added: ace/trunk/cnf/localrepo/org.amdatu.scheduling.api/org.amdatu.scheduling.api-1.1.0.jar
URL: http://svn.apache.org/viewvc/ace/trunk/cnf/localrepo/org.amdatu.scheduling.api/org.amdatu.scheduling.api-1.1.0.jar?rev=1732893&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ace/trunk/cnf/localrepo/org.amdatu.scheduling.api/org.amdatu.scheduling.api-1.1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ace/trunk/cnf/localrepo/org.amdatu.scheduling.quartz/org.amdatu.scheduling.quartz-1.0.4.jar
URL: http://svn.apache.org/viewvc/ace/trunk/cnf/localrepo/org.amdatu.scheduling.quartz/org.amdatu.scheduling.quartz-1.0.4.jar?rev=1732893&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ace/trunk/cnf/localrepo/org.amdatu.scheduling.quartz/org.amdatu.scheduling.quartz-1.0.4.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: ace/trunk/org.apache.ace.authentication.itest/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.authentication.itest/bnd.bnd?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.authentication.itest/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.authentication.itest/bnd.bnd Mon Feb 29 13:20:54 2016
@@ -8,6 +8,7 @@
 	org.apache.ace.test;version=latest,\
 	org.apache.felix.dependencymanager,\
 	org.apache.felix.http.api,\
+	org.amdatu.scheduling.api,\
 	org.apache.ace.connectionfactory;version=latest,\
 	org.apache.ace.repository.api;version=latest,\
 	org.apache.ace.log.server.store.api;version=latest,\
@@ -32,6 +33,8 @@
 	org.apache.felix.http.servlet-api,\
 	org.apache.felix.http.jetty,\
 	org.apache.felix.useradmin,\
+	org.amdatu.scheduling.api,\
+	org.amdatu.scheduling.quartz,\
 	org.apache.ace.authentication.api;version=latest,\
 	org.apache.ace.authentication.impl;version=latest,\
 	org.apache.ace.authentication.processor.basicauth;version=latest,\

Modified: ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java (original)
+++ ace/trunk/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java Mon Feb 29 13:20:54 2016
@@ -29,6 +29,7 @@ import java.util.Map;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
 
+import org.amdatu.scheduling.Job;
 import org.apache.ace.client.repository.SessionFactory;
 import org.apache.ace.connectionfactory.ConnectionFactory;
 import org.apache.ace.discovery.DiscoveryConstants;
@@ -42,7 +43,6 @@ import org.apache.ace.repository.Reposit
 import org.apache.ace.test.constants.TestConstants;
 import org.apache.ace.test.utils.NetUtils;
 import org.apache.felix.dm.Component;
-import org.osgi.framework.Constants;
 import org.osgi.service.http.HttpService;
 import org.osgi.service.log.LogReaderService;
 import org.osgi.service.useradmin.UserAdmin;
@@ -61,7 +61,7 @@ public class LogAuthenticationTest exten
 
     private volatile Log m_auditLog;
     private volatile LogStore m_serverStore;
-    private volatile Runnable m_auditLogSyncTask;
+    private volatile Job m_auditLogSyncTask;
     private volatile Repository m_userRepository;
     private volatile UserAdmin m_userAdmin;
     private volatile ConnectionFactory m_connectionFactory;
@@ -79,9 +79,9 @@ public class LogAuthenticationTest exten
                     .setRequired(true))
                 .add(createServiceDependency().setService(ConnectionFactory.class).setRequired(true))
                 .add(createServiceDependency().setService(HttpService.class).setRequired(true))
-                .add(createServiceDependency().setService(Log.class, "(&(" + Constants.OBJECTCLASS + "=" + Log.class.getName() + ")(name=auditlog))").setRequired(true))
-                .add(createServiceDependency().setService(LogStore.class, "(&(" + Constants.OBJECTCLASS + "=" + LogStore.class.getName() + ")(name=auditlog))").setRequired(true))
-                .add(createServiceDependency().setService(Runnable.class, "(&(" + Constants.OBJECTCLASS + "=" + Runnable.class.getName() + ")(taskName=auditlog))").setRequired(true))
+                .add(createServiceDependency().setService(Log.class, "(name=auditlog)").setRequired(true))
+                .add(createServiceDependency().setService(LogStore.class, "(name=auditlog)").setRequired(true))
+                .add(createServiceDependency().setService(Job.class, "(taskName=auditlog)").setRequired(true))
         };
     }
 
@@ -139,7 +139,8 @@ public class LogAuthenticationTest exten
         configureFactory("org.apache.ace.target.log.factory",
             "name", "auditlog");
         configureFactory("org.apache.ace.target.log.sync.factory",
-            "name", "auditlog");
+            "name", "auditlog",
+            "syncInterval", "1000");
         configureFactory("org.apache.ace.log.server.servlet.factory",
             "name", "auditlog", "endpoint", AUDITLOG_ENDPOINT);
         configureFactory("org.apache.ace.log.server.store.factory",
@@ -218,7 +219,7 @@ public class LogAuthenticationTest exten
 
             while (!found && ((System.currentTimeMillis() - startTime) < waitTime)) {
                 // synchronize again
-                m_auditLogSyncTask.run();
+                m_auditLogSyncTask.execute();
 
                 // get and evaluate results (note that there is some concurrency that might interfere with this test)
                 List<Descriptor> ranges2 = m_serverStore.getDescriptors();

Modified: ace/trunk/org.apache.ace.client.automation/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.automation/bnd.bnd?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.automation/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.client.automation/bnd.bnd Mon Feb 29 13:20:54 2016
@@ -6,7 +6,7 @@
 	osgi.core;version=6.0.0,\
 	osgi.cmpn,\
 	org.apache.felix.dependencymanager,\
-	org.apache.ace.scheduler.api;version=latest,\
+	org.amdatu.scheduling.api,\
 	org.apache.ace.client.repository.api;version=latest
 
 Private-Package: org.apache.ace.client.automation

Modified: ace/trunk/org.apache.ace.client.automation/src/org/apache/ace/client/automation/AutoTargetOperator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.automation/src/org/apache/ace/client/automation/AutoTargetOperator.java?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.automation/src/org/apache/ace/client/automation/AutoTargetOperator.java (original)
+++ ace/trunk/org.apache.ace.client.automation/src/org/apache/ace/client/automation/AutoTargetOperator.java Mon Feb 29 13:20:54 2016
@@ -24,12 +24,13 @@ import java.util.Dictionary;
 import java.util.Hashtable;
 import java.util.List;
 
+import org.amdatu.scheduling.Job;
+import org.amdatu.scheduling.constants.Constants;
 import org.apache.ace.client.repository.RepositoryAdmin;
 import org.apache.ace.client.repository.RepositoryAdminLoginContext;
 import org.apache.ace.client.repository.object.TargetObject;
 import org.apache.ace.client.repository.stateful.StatefulTargetObject;
 import org.apache.ace.client.repository.stateful.StatefulTargetRepository;
-import org.apache.ace.scheduler.constants.SchedulerConstants;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceRegistration;
@@ -39,6 +40,7 @@ import org.osgi.service.log.LogService;
 import org.osgi.service.useradmin.User;
 import org.osgi.service.useradmin.UserAdmin;
 
+
 /**
  * Automatic target operator, when configured will automatically register, approve, auto-approve and commit targets to
  * the repository. An LDAP filter can be used to filter for the correct targets.
@@ -54,7 +56,7 @@ public class AutoTargetOperator implemen
     private volatile BundleContext m_bundleContext;
     private volatile LogService m_log;
     private volatile Dictionary<String, ?> m_settings;
-    private volatile ServiceRegistration<Runnable> m_serviceReg;
+    private volatile ServiceRegistration<Job> m_serviceReg;
 
     // used for processing the auditlog (tell the repository about that)
     private final AuditLogProcessTask m_task = new AuditLogProcessTask();
@@ -81,8 +83,8 @@ public class AutoTargetOperator implemen
 
             // start refresh task
             Dictionary<String, Object> props = new Hashtable<>();
-            props.put(SchedulerConstants.SCHEDULER_NAME_KEY, SCHEDULER_NAME);
-            m_serviceReg = m_bundleContext.registerService(Runnable.class, m_task, props);
+            props.put("name", SCHEDULER_NAME);
+            m_serviceReg = m_bundleContext.registerService(Job.class, m_task, props);
         }
         catch (IOException ioe) {
             m_log.log(LogService.LOG_ERROR, "Unable to login at repository admin.", ioe);
@@ -111,11 +113,12 @@ public class AutoTargetOperator implemen
      * Runnable that will synchronize audit log data with the server and tell the repository about the changes if
      * applicable.
      */
-    private final class AuditLogProcessTask implements Runnable {
+    private final class AuditLogProcessTask implements Job {
 
         private final Object m_lock = new Object();
-
-        public void process() {
+        
+        @Override
+        public void execute() {
             // perform synchronous model actions
             synchronized (m_lock) {
                 m_statefulTargetRepos.refresh();
@@ -144,10 +147,6 @@ public class AutoTargetOperator implemen
                 }
             }
         }
-
-        public void run() {
-            process();
-        }
     }
 
     private void checkoutModel() throws IOException {
@@ -206,6 +205,30 @@ public class AutoTargetOperator implemen
             }
             // store configuration
             m_settings = settings;
+            
+            Long interval = null;
+            
+            Object value = settings.get("interval");
+            if (value != null) {
+                try {
+                    interval = Long.valueOf(value.toString());
+                }catch (NumberFormatException e) {
+                    throw new ConfigurationException("interval", "Interval must be a valid Long value", e);
+                }
+            
+                Dictionary<String, Object> serviceProps = new Hashtable<>();
+                serviceProps.put("name", SCHEDULER_NAME);
+                if (interval == null) {
+                    serviceProps.remove(Constants.REPEAT_FOREVER);
+                    serviceProps.remove(Constants.REPEAT_INTERVAL_PERIOD);
+                    serviceProps.remove(Constants.REPEAT_INTERVAL_VALUE);
+                } else {
+                    serviceProps.put(Constants.REPEAT_FOREVER, true);
+                    serviceProps.put(Constants.REPEAT_INTERVAL_PERIOD, "milisecond");
+                    serviceProps.put(Constants.REPEAT_INTERVAL_VALUE, interval);
+                }
+                m_serviceReg.setProperties(serviceProps);
+            }
         }
     }
 

Modified: ace/trunk/org.apache.ace.client.repository.itest/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository.itest/bnd.bnd?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository.itest/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.client.repository.itest/bnd.bnd Mon Feb 29 13:20:54 2016
@@ -8,12 +8,12 @@
 	org.apache.felix.http.api,\
 	org.apache.felix.http.servlet-api,\
 	org.apache.felix.dependencymanager,\
+	org.amdatu.scheduling.api,\
 	org.apache.ace.test;version=latest,\
 	org.apache.ace.discovery.api;version=latest,\
 	org.apache.ace.discovery.property;version=latest,\
 	org.apache.ace.identification.api;version=latest,\
 	org.apache.ace.identification.property;version=latest,\
-	org.apache.ace.scheduler.api;version=latest,\
 	org.apache.ace.deployment.servlet;version=latest,\
 	org.apache.ace.obr.storage;version=latest,\
 	org.apache.ace.repository.api;version=latest,\
@@ -35,11 +35,11 @@
 	org.apache.felix.useradmin,\
 	org.apache.felix.useradmin.filestore,\
 	org.apache.felix.log,\
+	org.amdatu.scheduling.api,\
+	org.amdatu.scheduling.quartz,\
 	org.apache.ace.test;version=latest,\
 	org.apache.ace.authentication.api;version=latest,\
 	org.apache.ace.connectionfactory;version=latest,\
-	org.apache.ace.scheduler.impl;version=latest,\
-	org.apache.ace.scheduler.api;version=latest,\
 	org.apache.ace.deployment.provider.api;version=latest,\
 	org.apache.ace.discovery.api;version=latest,\
 	org.apache.ace.discovery.property;version=latest,\

Modified: ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/ClientAutomationTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/ClientAutomationTest.java?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/ClientAutomationTest.java (original)
+++ ace/trunk/org.apache.ace.client.repository.itest/src/org/apache/ace/it/repositoryadmin/ClientAutomationTest.java Mon Feb 29 13:20:54 2016
@@ -25,11 +25,11 @@ import java.util.Hashtable;
 import java.util.List;
 import java.util.concurrent.Callable;
 
+import org.amdatu.scheduling.Job;
 import org.apache.ace.client.repository.RepositoryAdmin;
 import org.apache.ace.client.repository.stateful.StatefulTargetObject;
 import org.apache.ace.feedback.AuditEvent;
 import org.apache.ace.feedback.Event;
-import org.apache.ace.scheduler.constants.SchedulerConstants;
 import org.osgi.framework.Constants;
 import org.osgi.service.cm.Configuration;
 import org.osgi.util.tracker.ServiceTracker;
@@ -95,18 +95,18 @@ public class ClientAutomationTest extend
         int initRepoSize = m_statefulTargetRepository.get().size();
 
         // Get the processauditlog task and run it
-        ServiceTracker<Runnable, Runnable> tracker = new ServiceTracker<>(
+        ServiceTracker<Job, Job> tracker = new ServiceTracker<>(
             m_bundleContext, m_bundleContext.createFilter("(&(" + Constants.OBJECTCLASS + "="
-                + Runnable.class.getName() + ")(" + SchedulerConstants.SCHEDULER_NAME_KEY + "="
+                + Job.class.getName() + ")(name="
                 + "org.apache.ace.client.processauditlog" + "))"), null);
         tracker.open();
 
-        final Runnable processAuditlog = tracker.waitForService(2000);
+        final Job processAuditlog = tracker.waitForService(2000);
         if (processAuditlog != null) {
             // commit should be called
             runAndWaitForEvent(new Callable<Object>() {
                 public Object call() throws Exception {
-                    processAuditlog.run();
+                    processAuditlog.execute();
                     return null;
                 }
             }, false, RepositoryAdmin.TOPIC_REFRESH);
@@ -127,7 +127,7 @@ public class ClientAutomationTest extend
             m_auditLogStore.put(events);
 
             // do auto target action
-            processAuditlog.run();
+            processAuditlog.execute();
             assertEquals("After refresh, we expect an additional target based on auditlogdata;", initRepoSize + 2, m_statefulTargetRepository.get().size());
 
             sgoList = m_statefulTargetRepository.get(m_bundleContext.createFilter("(id=second*)"));

Modified: ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.client.rest.itest/bnd.bnd Mon Feb 29 13:20:54 2016
@@ -15,7 +15,6 @@
 	org.apache.ace.identification.api;version=latest,\
 	org.apache.ace.identification.property;version=latest,\
 	org.apache.ace.log.server.store.api;version=latest,\
-	org.apache.ace.scheduler.api;version=latest,\
 	org.apache.ace.deployment.servlet;version=latest,\
 	org.apache.ace.obr.storage;version=latest,\
 	org.apache.ace.repository.api;version=latest,\
@@ -41,8 +40,6 @@
 	org.apache.ace.test;version=latest,\
 	org.apache.ace.authentication.api;version=latest,\
 	org.apache.ace.connectionfactory;version=latest,\
-	org.apache.ace.scheduler.impl;version=latest,\
-	org.apache.ace.scheduler.api;version=latest,\
 	org.apache.ace.deployment.provider.api;version=latest,\
 	org.apache.ace.discovery.api;version=latest,\
 	org.apache.ace.discovery.property;version=latest,\

Modified: ace/trunk/org.apache.ace.deployment.itest/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment.itest/bnd.bnd?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment.itest/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.deployment.itest/bnd.bnd Mon Feb 29 13:20:54 2016
@@ -15,7 +15,6 @@
 	org.apache.ace.identification.api;version=latest,\
 	org.apache.ace.identification.property;version=latest,\
 	org.apache.ace.log.server.store.api;version=latest,\
-	org.apache.ace.scheduler.api;version=latest,\
 	org.apache.ace.deployment.servlet;version=latest,\
 	org.apache.ace.deployment.provider.api;version=latest,\
 	org.apache.ace.deployment.util.test;version=latest,\
@@ -51,9 +50,6 @@
 	org.apache.ace.repository.ext;version=latest,\
 	org.apache.ace.repository.impl;version=latest,\
 	org.apache.ace.repository.servlets;version=latest,\
-	org.apache.ace.repository.task;version=latest,\
-	org.apache.ace.scheduler.impl;version=latest,\
-	org.apache.ace.scheduler.api;version=latest,\
 	org.apache.ace.test;version=latest,\
 	org.apache.ace.range.api;version=latest,\
 	org.apache.ace.http.context;version=latest

Modified: ace/trunk/org.apache.ace.deployment/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.deployment/bnd.bnd?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.deployment/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.deployment/bnd.bnd Mon Feb 29 13:20:54 2016
@@ -19,7 +19,6 @@
 	org.apache.ace.connectionfactory;version=latest,\
 	org.apache.ace.repository.api;version=latest,\
 	org.apache.ace.repository.ext;version=latest,\
-	org.apache.ace.scheduler.api;version=latest,\
 	org.apache.ace.test;version=latest,\
 	org.apache.ace.range.api;version=latest,\
 	org.apache.ace.http.api;version=latest,\

Modified: ace/trunk/org.apache.ace.log.itest/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log.itest/bnd.bnd?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log.itest/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.log.itest/bnd.bnd Mon Feb 29 13:20:54 2016
@@ -7,6 +7,7 @@
 	osgi.cmpn,\
 	org.apache.felix.dependencymanager,\
 	org.apache.felix.http.api,\
+	org.amdatu.scheduling.api,\
 	org.apache.ace.test;version=latest,\
 	org.apache.ace.discovery.api;version=latest,\
 	org.apache.ace.discovery.property;version=latest,\
@@ -23,6 +24,8 @@
 	org.apache.felix.http.servlet-api,\
 	org.apache.felix.http.jetty,\
 	org.apache.felix.eventadmin,\
+	org.amdatu.scheduling.api,\
+	org.amdatu.scheduling.quartz,\
 	org.apache.ace.authentication.api;version=latest,\
 	org.apache.ace.authentication.processor.basicauth;version=latest,\
 	org.apache.ace.client.repository.api;version=latest,\

Modified: ace/trunk/org.apache.ace.log.itest/src/org/apache/ace/it/log/LogIntegrationTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log.itest/src/org/apache/ace/it/log/LogIntegrationTest.java?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log.itest/src/org/apache/ace/it/log/LogIntegrationTest.java (original)
+++ ace/trunk/org.apache.ace.log.itest/src/org/apache/ace/it/log/LogIntegrationTest.java Mon Feb 29 13:20:54 2016
@@ -23,6 +23,7 @@ import java.util.List;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
 
+import org.amdatu.scheduling.Job;
 import org.apache.ace.discovery.DiscoveryConstants;
 import org.apache.ace.feedback.Descriptor;
 import org.apache.ace.feedback.Event;
@@ -32,7 +33,6 @@ import org.apache.ace.log.Log;
 import org.apache.ace.log.server.store.LogStore;
 import org.apache.ace.test.constants.TestConstants;
 import org.apache.felix.dm.Component;
-import org.osgi.framework.Constants;
 import org.osgi.service.http.HttpService;
 
 /**
@@ -49,7 +49,7 @@ public class LogIntegrationTest extends
     private volatile Log m_auditLog;
     private volatile LogStore m_serverStore;
 
-    private volatile Runnable m_auditLogSyncTask;
+    private volatile Job m_auditLogSyncTask;
     
     public void testLog() throws Exception {
     	// XXX there appears to be a dependency between both these test-methods!!!
@@ -87,9 +87,9 @@ public class LogIntegrationTest extends
             createComponent()
                 .setImplementation(this)
                 .add(createServiceDependency().setService(HttpService.class).setRequired(true))
-                .add(createServiceDependency().setService(Log.class, "(&("+ Constants.OBJECTCLASS+"="+Log.class.getName()+")(name=auditlog))").setRequired(true))
-                .add(createServiceDependency().setService(LogStore.class, "(&("+Constants.OBJECTCLASS+"="+LogStore.class.getName()+")(name=auditlog))").setRequired(true))
-                .add(createServiceDependency().setService(Runnable.class, "(&("+Constants.OBJECTCLASS+"="+Runnable.class.getName()+")(taskName=auditlog))").setRequired(true))
+                .add(createServiceDependency().setService(Log.class, "(name=auditlog)").setRequired(true))
+                .add(createServiceDependency().setService(LogStore.class, "(name=auditlog)").setRequired(true))
+                .add(createServiceDependency().setService(Job.class, "(taskName=auditlog)").setRequired(true))
         };
     }
 
@@ -104,7 +104,7 @@ public class LogIntegrationTest extends
         long startTime = System.currentTimeMillis();
         while ((!found) && (System.currentTimeMillis() - startTime < 5000)) {
             // synchronize again
-            m_auditLogSyncTask.run();
+            m_auditLogSyncTask.execute();
 
             // get and evaluate results (note that there is some concurrency that might interfere with this test)
             List<Descriptor> ranges2 = m_serverStore.getDescriptors();

Modified: ace/trunk/org.apache.ace.log/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/bnd.bnd?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.log/bnd.bnd Mon Feb 29 13:20:54 2016
@@ -8,11 +8,11 @@
 	org.apache.felix.http.api,\
 	org.apache.felix.http.servlet-api,\
 	org.apache.felix.dependencymanager,\
+	org.amdatu.scheduling.api,\
 	org.apache.ace.range.api;version=latest,\
 	org.apache.ace.test;version=latest,\
 	org.apache.ace.identification.api;version=latest,\
 	org.apache.ace.discovery.api;version=latest,\
-	org.apache.ace.scheduler.api;version=latest,\
 	org.apache.ace.connectionfactory;version=latest,\
 	org.apache.ace.authentication.api;version=latest,\
 	org.apache.ace.feedback.common;version=latest,\

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/Activator.java?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/Activator.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/Activator.java Mon Feb 29 13:20:54 2016
@@ -18,11 +18,17 @@
  */
 package org.apache.ace.log.server.task;
 
+import static org.amdatu.scheduling.constants.Constants.DESCRIPTION;
+import static org.amdatu.scheduling.constants.Constants.REPEAT_FOREVER;
+import static org.amdatu.scheduling.constants.Constants.REPEAT_INTERVAL_PERIOD;
+import static org.amdatu.scheduling.constants.Constants.REPEAT_INTERVAL_VALUE;
+
 import java.util.Dictionary;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
 
+import org.amdatu.scheduling.Job;
 import org.apache.ace.connectionfactory.ConnectionFactory;
 import org.apache.ace.discovery.Discovery;
 import org.apache.ace.log.LogSync;
@@ -42,6 +48,7 @@ public class Activator extends Dependenc
     private static final String KEY_MODE = "mode";
     private static final String KEY_MODE_LOWEST_IDS = "mode-lowest-ids";
     private static final String KEY_TARGETID = "tid";
+    private static final String KEY_SYNC_INTERVAL = "syncInterval";
     
     private final Map<String, Component> m_instances = new HashMap<>();
     private volatile DependencyManager m_manager;
@@ -70,6 +77,18 @@ public class Activator extends Dependenc
         if ((name == null) || "".equals(name)) {
             throw new ConfigurationException(KEY_LOG_NAME, "Log name has to be specified.");
         }
+        Long syncInterval = 2000L;
+        String interval = (String) dict.get(KEY_SYNC_INTERVAL);
+        if (interval != null) {
+            try {
+                syncInterval = Long.valueOf(interval);
+            } catch (NumberFormatException e) {
+                throw new ConfigurationException(KEY_SYNC_INTERVAL, "Log sync interval has to be a valid long value.");
+            }
+        } else {
+            throw new ConfigurationException(KEY_SYNC_INTERVAL, "Log sync interval has to be specified.");
+        }
+        
         Mode dataTransferMode = Mode.PUSH;
         String modeValue = (String) dict.get(KEY_MODE);
         if ("pull".equals(modeValue)) {
@@ -98,12 +117,15 @@ public class Activator extends Dependenc
         
         Properties props = new Properties();
         props.put(KEY_LOG_NAME, name);
+        props.put(REPEAT_FOREVER, true);
+        props.put(REPEAT_INTERVAL_PERIOD, "millisecond");
+        props.put(REPEAT_INTERVAL_VALUE, syncInterval);
         props.put("taskName", LogSyncTask.class.getName());
-        props.put("description", "Syncs log (name=" + name + ", mode=" + dataTransferMode.toString() + (targetID == null ? "" : ", targetID=" + targetID) + ") with a server.");
+        props.put(DESCRIPTION, "Syncs log (name=" + name + ", mode=" + dataTransferMode.toString() + (targetID == null ? "" : ", targetID=" + targetID) + ") with a server.");
         String filter = "(&(" + Constants.OBJECTCLASS + "=" + LogStore.class.getName() + ")(name=" + name + "))";
         LogSyncTask service = new LogSyncTask(name, name, dataTransferMode, lowestIDsMode, targetID);
         newComponent = m_manager.createComponent()
-    		.setInterface(new String[] { Runnable.class.getName(), LogSync.class.getName() }, props)
+    		.setInterface(new String[] { Job.class.getName(), LogSync.class.getName() }, props)
     		.setImplementation(service)
     		.add(createServiceDependency().setService(ConnectionFactory.class).setRequired(true))
     		.add(createServiceDependency().setService(LogStore.class, filter).setRequired(true))

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/LogSyncTask.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/LogSyncTask.java?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/LogSyncTask.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/task/LogSyncTask.java Mon Feb 29 13:20:54 2016
@@ -37,6 +37,7 @@ import java.util.List;
 
 import javax.servlet.http.HttpServletResponse;
 
+import org.amdatu.scheduling.Job;
 import org.apache.ace.connectionfactory.ConnectionFactory;
 import org.apache.ace.discovery.Discovery;
 import org.apache.ace.feedback.Descriptor;
@@ -47,7 +48,7 @@ import org.apache.ace.log.server.store.L
 import org.apache.ace.range.SortedRangeSet;
 import org.osgi.service.log.LogService;
 
-public class LogSyncTask implements Runnable, LogSync {
+public class LogSyncTask implements Job, LogSync {
 
     public static enum Mode {
         NONE, PUSH, PULL, PUSHPULL
@@ -115,8 +116,9 @@ public class LogSyncTask implements Runn
     public boolean pushpullIDs() throws IOException {
     	return synchronizeLowestIDs(true, true);
     }
-
-    public void run() {
+    
+    @Override
+    public void execute() {
         try {
             switch (m_lowestIDMode) {
 	            case NONE:

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogSyncConfigurator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogSyncConfigurator.java?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogSyncConfigurator.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/LogSyncConfigurator.java Mon Feb 29 13:20:54 2016
@@ -18,17 +18,22 @@
  */
 package org.apache.ace.log.target;
 
+import static org.amdatu.scheduling.constants.Constants.DESCRIPTION;
+import static org.amdatu.scheduling.constants.Constants.REPEAT_FOREVER;
+import static org.amdatu.scheduling.constants.Constants.REPEAT_INTERVAL_PERIOD;
+import static org.amdatu.scheduling.constants.Constants.REPEAT_INTERVAL_VALUE;
+
 import java.util.Dictionary;
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
 
+import org.amdatu.scheduling.Job;
 import org.apache.ace.connectionfactory.ConnectionFactory;
 import org.apache.ace.discovery.Discovery;
 import org.apache.ace.identification.Identification;
 import org.apache.ace.log.target.store.LogStore;
 import org.apache.ace.log.target.task.LogSyncTask;
-import org.apache.ace.scheduler.constants.SchedulerConstants;
 import org.apache.felix.dm.Component;
 import org.apache.felix.dm.DependencyManager;
 import org.osgi.framework.Constants;
@@ -39,6 +44,7 @@ import org.osgi.service.log.LogService;
 public class LogSyncConfigurator implements ManagedServiceFactory {
     private static final String MA_NAME = "ma";
     private static final String LOG_NAME = "name";
+    private static final String LOG_SYNC_INTERVAL = "syncInterval";
 
     private DependencyManager m_manager;
     private final Map<String, Component> m_syncInstances = new HashMap<>();
@@ -61,6 +67,16 @@ public class LogSyncConfigurator impleme
         if ((name == null) || "".equals(name)) {
             throw new ConfigurationException(LOG_NAME, "Log name has to be specified.");
         }
+        
+        Long syncInterval = 2000L;
+        String interval = (String) dict.get(LOG_SYNC_INTERVAL);
+        if (interval != null) {
+            try {
+                syncInterval = Long.valueOf(interval);
+            } catch (NumberFormatException e) {
+                throw new ConfigurationException(LOG_SYNC_INTERVAL, "Log sync interval has to be a valid long value.");
+            }
+        }
 
         Component service = (Component) m_syncInstances.get(pid);
         if (service == null) {
@@ -89,12 +105,15 @@ public class LogSyncConfigurator impleme
                 description = "Task that synchronizes log store with id=" + name + " and ma=" + ma + " on the target and server";
                 properties.put(MA_NAME, ma);
             }
-
-            properties.put(SchedulerConstants.SCHEDULER_NAME_KEY, schedulerName);
-            properties.put(SchedulerConstants.SCHEDULER_DESCRIPTION_KEY, description);
-            properties.put(SchedulerConstants.SCHEDULER_RECIPE, "2000");
+            
+            properties.put("taskName", schedulerName);
+            properties.put(DESCRIPTION, description);
+            properties.put(REPEAT_FOREVER, true);
+            properties.put(REPEAT_INTERVAL_PERIOD, "millisecond");
+            properties.put(REPEAT_INTERVAL_VALUE, syncInterval);
+            
             Component sync = m_manager.createComponent()
-                .setInterface(Runnable.class.getName(), properties)
+                .setInterface(Job.class.getName(),  properties)
                 .setImplementation(new LogSyncTask(name))
                 .add(m_manager.createServiceDependency().setService(ConnectionFactory.class).setRequired(true))
                 .add(m_manager.createServiceDependency().setService(LogStore.class, filterString).setRequired(true))

Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/task/LogSyncTask.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/task/LogSyncTask.java?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/task/LogSyncTask.java (original)
+++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/target/task/LogSyncTask.java Mon Feb 29 13:20:54 2016
@@ -30,6 +30,7 @@ import java.net.URL;
 import java.net.URLConnection;
 import java.util.List;
 
+import org.amdatu.scheduling.Job;
 import org.apache.ace.connectionfactory.ConnectionFactory;
 import org.apache.ace.discovery.Discovery;
 import org.apache.ace.feedback.Descriptor;
@@ -42,7 +43,7 @@ import org.osgi.service.log.LogService;
 
 // TODO there are two versions of this class around, the other ohne being the server.LogSyncTask,
 // and both are fairly similar
-public class LogSyncTask implements Runnable {
+public class LogSyncTask implements Job {
 
     private static final String COMMAND_QUERY = "query";
     private static final String COMMAND_SEND = "send";
@@ -65,7 +66,8 @@ public class LogSyncTask implements Runn
     /**
      * Synchronize the log events available remote with the events available locally.
      */
-    public void run() {
+    @Override
+    public void execute() {
         URL host = m_discovery.discover();
 
         if (host == null) {

Modified: ace/trunk/org.apache.ace.repository/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/bnd.bnd?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.repository/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.repository/bnd.bnd Mon Feb 29 13:20:54 2016
@@ -8,10 +8,10 @@
 	org.apache.felix.dependencymanager,\
 	org.apache.felix.http.api,\
 	org.apache.felix.http.servlet-api,\
+	org.amdatu.scheduling.api,\
 	org.apache.ace.range.api;version=latest,\
 	org.apache.ace.test;version=latest,\
 	org.apache.ace.authentication.api;version=latest,\
-	org.apache.ace.scheduler.api;version=latest,\
 	org.apache.ace.discovery.api;version=latest,\
 	org.apache.ace.connectionfactory;version=latest,\
 	org.apache.ace.http.api;version=latest

Modified: ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/Activator.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/Activator.java?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/Activator.java (original)
+++ ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/Activator.java Mon Feb 29 13:20:54 2016
@@ -20,25 +20,28 @@ package org.apache.ace.repository.task;
 
 import java.util.Properties;
 
+import org.amdatu.scheduling.Job;
 import org.apache.ace.connectionfactory.ConnectionFactory;
 import org.apache.ace.discovery.Discovery;
 import org.apache.ace.repository.RepositoryReplication;
-import org.apache.ace.scheduler.constants.SchedulerConstants;
 import org.apache.felix.dm.DependencyActivatorBase;
 import org.apache.felix.dm.DependencyManager;
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.service.cm.ManagedService;
 import org.osgi.service.log.LogService;
 
 public class Activator extends DependencyActivatorBase {
 
+    private static final String PID = "org.apache.ace.repository.replication";
+    
     @Override
     public void init(BundleContext context, DependencyManager manager) throws Exception {
         Properties props = new Properties();
-        props.put(SchedulerConstants.SCHEDULER_NAME_KEY, RepositoryReplicationTask.class.getName());
-        props.put(SchedulerConstants.SCHEDULER_DESCRIPTION_KEY, "Synchronizes repositories.");
+        props.put(Constants.SERVICE_PID, PID);
 
         manager.add(createComponent()
-            .setInterface(Runnable.class.getName(), props)
+            .setInterface(new String[] {ManagedService.class.getName(), Job.class.getName()}, props)
             .setImplementation(RepositoryReplicationTask.class)
             .add(createServiceDependency().setService(Discovery.class).setRequired(true))
             .add(createServiceDependency().setService(ConnectionFactory.class).setRequired(true))
@@ -47,7 +50,4 @@ public class Activator extends Dependenc
             );
     }
 
-    @Override
-    public void destroy(BundleContext context, DependencyManager manager) throws Exception {
-    }
 }
\ No newline at end of file

Modified: ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/RepositoryReplicationTask.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/RepositoryReplicationTask.java?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/RepositoryReplicationTask.java (original)
+++ ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/task/RepositoryReplicationTask.java Mon Feb 29 13:20:54 2016
@@ -24,6 +24,7 @@ import java.io.InputStreamReader;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.Dictionary;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -32,12 +33,17 @@ import java.util.concurrent.ConcurrentMa
 
 import javax.servlet.http.HttpServletResponse;
 
+import org.amdatu.scheduling.Job;
+import org.amdatu.scheduling.constants.Constants;
 import org.apache.ace.connectionfactory.ConnectionFactory;
 import org.apache.ace.discovery.Discovery;
 import org.apache.ace.range.RangeIterator;
 import org.apache.ace.range.SortedRangeSet;
 import org.apache.ace.repository.RepositoryReplication;
+import org.apache.felix.dm.Component;
 import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedService;
 import org.osgi.service.log.LogService;
 
 /**
@@ -45,9 +51,12 @@ import org.osgi.service.log.LogService;
  * repositories are configured and tries to synchronize them with remote copies. Only pulls stuff in, it does not push
  * stuff out.
  */
-public class RepositoryReplicationTask implements Runnable {
-    private final ConcurrentMap<ServiceReference<RepositoryReplication>, RepositoryReplication> m_replicators = new ConcurrentHashMap<>();
+public class RepositoryReplicationTask implements Job, ManagedService {
+    private static final String KEY_SYNC_INTERVAL = "syncInterval";
 
+    private final ConcurrentMap<ServiceReference<RepositoryReplication>, RepositoryReplication> m_replicators = new ConcurrentHashMap<>();
+    
+    private volatile Component m_component;
     private volatile Discovery m_discovery;
     private volatile ConnectionFactory m_connectionFactory;
     private volatile LogService m_log;
@@ -73,7 +82,8 @@ public class RepositoryReplicationTask i
     /**
      * Replicates all current known repositories.
      */
-    public void run() {
+    @Override
+    public void execute() {
         // Take a snapshot of the current available replicators...
         Map<ServiceReference<RepositoryReplication>, RepositoryReplication> replicators = new HashMap<>(m_replicators);
 
@@ -185,4 +195,30 @@ public class RepositoryReplicationTask i
             conn.disconnect();
         }
     }
+    
+    @Override
+    public void updated(Dictionary<String, ?> properties) throws ConfigurationException {
+        Long interval = null;
+        if (properties != null) {
+            Object value = properties.get(KEY_SYNC_INTERVAL);
+            if (value != null) {
+                try {
+                    interval = Long.valueOf(value.toString());
+                }catch (NumberFormatException e) {
+                    throw new ConfigurationException("interval", "Interval must be a valid Long value", e);
+                }
+            } else {
+                throw new ConfigurationException("interval", "Interval is required");
+            }
+            
+            Dictionary<Object,Object> serviceProps = m_component.getServiceProperties();
+            
+            serviceProps.put(Constants.REPEAT_FOREVER, true);
+            serviceProps.put(Constants.REPEAT_INTERVAL_PERIOD, "millisecond");
+            serviceProps.put(Constants.REPEAT_INTERVAL_VALUE, interval);
+            
+            m_component.setServiceProperties(serviceProps);
+        }
+
+    }
 }

Modified: ace/trunk/org.apache.ace.verifier/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.verifier/bnd.bnd?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.verifier/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.verifier/bnd.bnd Mon Feb 29 13:20:54 2016
@@ -14,7 +14,6 @@
 	org.apache.ace.connectionfactory;version=latest,\
 	org.apache.ace.repository.api;version=latest,\
 	org.apache.ace.repository.ext;version=latest,\
-	org.apache.ace.scheduler.api;version=latest,\
 	org.apache.ace.range.api;version=latest,\
 	org.apache.ace.client.repository.api;version=latest,\
 	org.apache.ace.test;version=latest,\

Modified: ace/trunk/run-client/client.bndrun
URL: http://svn.apache.org/viewvc/ace/trunk/run-client/client.bndrun?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/run-client/client.bndrun (original)
+++ ace/trunk/run-client/client.bndrun Mon Feb 29 13:20:54 2016
@@ -16,6 +16,8 @@
 	org.apache.felix.http.servlet-api,\
 	org.apache.felix.http.jetty,\
 	org.apache.felix.dependencymanager.shell,\
+	org.amdatu.scheduling.api,\
+	org.amdatu.scheduling.quartz,\
 	com.vaadin,\
 	org.apache.ace.authentication.api;version=latest,\
 	org.apache.ace.authentication.impl;version=latest,\
@@ -41,7 +43,6 @@
 	org.apache.ace.range.api;version=latest,\
 	org.apache.ace.repository.api;version=latest,\
 	org.apache.ace.repository.impl;version=latest,\
-	org.apache.ace.scheduler.impl;version=latest,\
 	org.apache.ace.log.server.store.api;version=latest,\
 	org.apache.ace.log.server.store.file;version=latest,\
 	org.apache.ace.log.server.ui;version=latest,\

Modified: ace/trunk/run-client/conf/org.apache.ace.log.server.task.factory/auditlog.cfg
URL: http://svn.apache.org/viewvc/ace/trunk/run-client/conf/org.apache.ace.log.server.task.factory/auditlog.cfg?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/run-client/conf/org.apache.ace.log.server.task.factory/auditlog.cfg (original)
+++ ace/trunk/run-client/conf/org.apache.ace.log.server.task.factory/auditlog.cfg Mon Feb 29 13:20:54 2016
@@ -2,3 +2,4 @@
 
 name=auditlog
 mode=pull
+syncInterval=2000
\ No newline at end of file

Modified: ace/trunk/run-relay/conf/org.apache.ace.log.server.task.factory/auditlog.cfg
URL: http://svn.apache.org/viewvc/ace/trunk/run-relay/conf/org.apache.ace.log.server.task.factory/auditlog.cfg?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/run-relay/conf/org.apache.ace.log.server.task.factory/auditlog.cfg (original)
+++ ace/trunk/run-relay/conf/org.apache.ace.log.server.task.factory/auditlog.cfg Mon Feb 29 13:20:54 2016
@@ -4,3 +4,5 @@
 name = auditlog
 # how to synchronize, can be 'pull' (only receive updates), 'push' (only push updates) or 'pushpull' (2-way update)
 mode = pushpull
+# Synchronize the relay logs with the master every 5 seconds...
+syncInterval = 5000

Added: ace/trunk/run-relay/conf/org.apache.ace.repository.replication.cfg
URL: http://svn.apache.org/viewvc/ace/trunk/run-relay/conf/org.apache.ace.repository.replication.cfg?rev=1732893&view=auto
==============================================================================
--- ace/trunk/run-relay/conf/org.apache.ace.repository.replication.cfg (added)
+++ ace/trunk/run-relay/conf/org.apache.ace.repository.replication.cfg Mon Feb 29 13:20:54 2016
@@ -0,0 +1,2 @@
+# Synchronize with the master repository every 5 seconds...  
+syncInterval = 5000
\ No newline at end of file

Modified: ace/trunk/run-relay/relay.bndrun
URL: http://svn.apache.org/viewvc/ace/trunk/run-relay/relay.bndrun?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/run-relay/relay.bndrun (original)
+++ ace/trunk/run-relay/relay.bndrun Mon Feb 29 13:20:54 2016
@@ -16,6 +16,8 @@
 	org.apache.felix.http.servlet-api,\
 	org.apache.felix.http.jetty,\
 	org.apache.felix.dependencymanager.shell,\
+	org.amdatu.scheduling.api,\
+	org.amdatu.scheduling.quartz,\
 	org.apache.ace.authentication.api;version=latest,\
 	org.apache.ace.authentication.impl;version=latest,\
 	org.apache.ace.authentication.processor.basicauth;version=latest,\
@@ -39,7 +41,6 @@
 	org.apache.ace.repository.impl;version=latest,\
 	org.apache.ace.repository.servlets;version=latest,\
 	org.apache.ace.repository.task;version=latest,\
-	org.apache.ace.scheduler.impl;version=latest,\
 	org.apache.ace.useradmin.repository;version=latest,\
 	org.apache.ace.http.context;version=latest
 
@@ -52,7 +53,7 @@
 	org.apache.felix.log.storeDebug=true,\
 	org.apache.felix.eventadmin.Timeout=0,\
 	org.apache.ace.server=localhost:8080,\
-	org.apache.ace.obr=localhost:8080,\
+	org.apache.ace.obr=localhost:8082,\
 	org.apache.ace.relay=localhost:8282,\
 	org.osgi.service.http.port=8282,\
 	org.apache.felix.log.maxSize=1000

Modified: ace/trunk/run-server/server.bndrun
URL: http://svn.apache.org/viewvc/ace/trunk/run-server/server.bndrun?rev=1732893&r1=1732892&r2=1732893&view=diff
==============================================================================
--- ace/trunk/run-server/server.bndrun (original)
+++ ace/trunk/run-server/server.bndrun Mon Feb 29 13:20:54 2016
@@ -16,6 +16,8 @@
 	org.apache.felix.http.servlet-api,\
 	org.apache.felix.http.jetty,\
 	org.apache.felix.dependencymanager.shell,\
+	org.amdatu.scheduling.api,\
+	org.amdatu.scheduling.quartz,\
 	org.apache.ace.authentication.api;version=latest,\
 	org.apache.ace.authentication.impl;version=latest,\
 	org.apache.ace.authentication.processor.basicauth;version=latest,\
@@ -35,7 +37,6 @@
 	org.apache.ace.repository.api;version=latest,\
 	org.apache.ace.repository.impl;version=latest,\
 	org.apache.ace.repository.servlets;version=latest,\
-	org.apache.ace.scheduler.impl;version=latest,\
 	org.apache.ace.log.server.store.api;version=latest,\
 	org.apache.ace.log.server.store.file;version=latest,\
 	org.apache.ace.feedback.common;version=latest,\



Mime
View raw message