1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.argeo.osgi.boot;
17
18 import org.osgi.framework.BundleActivator;
19 import org.osgi.framework.BundleContext;
20
21
22
23
24
25
26 public class Activator implements BundleActivator {
27 private Long checkpoint = null;
28
29 public void start(final BundleContext bundleContext) throws Exception {
30
31 Thread adminThread = new AdminThread(bundleContext);
32 adminThread.start();
33
34
35 OsgiBoot osgiBoot = new OsgiBoot(bundleContext);
36 if (checkpoint == null) {
37 osgiBoot.bootstrap();
38 checkpoint = System.currentTimeMillis();
39 } else {
40 osgiBoot.update();
41 checkpoint = System.currentTimeMillis();
42 }
43 }
44
45 public void stop(BundleContext context) throws Exception {
46 }
47 }