Introduce A2 provisioning and Eclipse 4 packaging.
[lgpl/argeo-commons.git] / org.argeo.osgi.boot / src / org / argeo / osgi / boot / Activator.java
index cd9f3583ddc36350887fc6550c8e7eeb850855a1..9e22b7bd63cfd4f7b6c92f6e97a7d720dbaab5c5 100644 (file)
@@ -19,11 +19,12 @@ import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 
 /**
- * An OSGi configurator. See <a
- * href="http://wiki.eclipse.org/Configurator">http:
+ * An OSGi configurator. See
+ * <a href="http://wiki.eclipse.org/Configurator">http:
  * //wiki.eclipse.org/Configurator</a>
  */
 public class Activator implements BundleActivator {
+       private Long checkpoint = null;
 
        public void start(final BundleContext bundleContext) throws Exception {
                // admin thread
@@ -32,7 +33,13 @@ public class Activator implements BundleActivator {
 
                // bootstrap
                OsgiBoot osgiBoot = new OsgiBoot(bundleContext);
-               osgiBoot.bootstrap();
+               if (checkpoint == null) {
+                       osgiBoot.bootstrap();
+                       checkpoint = System.currentTimeMillis();
+               } else {
+                       osgiBoot.update();
+                       checkpoint = System.currentTimeMillis();
+               }
        }
 
        public void stop(BundleContext context) throws Exception {