- if (runtimeContext == null) {
- runtimeContext = new OsgiRuntimeContext(bundleContext);
- }
- logger.log(Level.DEBUG, () -> "Argeo init via OSGi activator");
-
- // admin thread
+ // 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