- logger.log(Level.DEBUG, () -> "Argeo init via OSGi activator");
-
- // admin thread
- Thread adminThread = new AdminThread(bundleContext);
- adminThread.start();
-
- // bootstrap
- OsgiBoot osgiBoot = new OsgiBoot(bundleContext);
- if (checkpoint == null) {
- osgiBoot.bootstrap();
- checkpoint = System.currentTimeMillis();
- } else {
- osgiBoot.update();
- checkpoint = System.currentTimeMillis();
+ // The OSGi runtime was created by us, and therefore already initialized
+ argeoInit = Boolean.parseBoolean(bundleContext.getProperty(Service.PROP_ARGEO_INIT_MAIN));
+ if (!argeoInit) {
+ if (runtimeContext == null) {
+ runtimeContext = new OsgiRuntimeContext(bundleContext);
+ logger.log(Level.DEBUG, () -> "Argeo init via OSGi activator");
+ }
+
+ // admin thread
+// Thread adminThread = new AdminThread(bundleContext);
+// adminThread.start();
+
+ // bootstrap
+// OsgiBoot osgiBoot = new OsgiBoot(bundleContext);
+ if (checkpoint == null) {
+// osgiBoot.bootstrap();
+ checkpoint = System.currentTimeMillis();
+ } else {
+ runtimeContext.update();
+ checkpoint = System.currentTimeMillis();
+ }