X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.init%2Fsrc%2Forg%2Fargeo%2Finit%2Fosgi%2FOsgiRuntimeContext.java;h=6c3e40ce57eadf8189f9aa8c8687c4c3d2c1c27e;hb=dea32138f55d1c80f75515793ed15be0e89e6d61;hp=7f44f6b2746dccc914312180b493d56e7328ce3c;hpb=6bbc3a40f506bd559413ea234f262dfeb5f29001;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.init/src/org/argeo/init/osgi/OsgiRuntimeContext.java b/org.argeo.init/src/org/argeo/init/osgi/OsgiRuntimeContext.java index 7f44f6b27..6c3e40ce5 100644 --- a/org.argeo.init/src/org/argeo/init/osgi/OsgiRuntimeContext.java +++ b/org.argeo.init/src/org/argeo/init/osgi/OsgiRuntimeContext.java @@ -73,23 +73,30 @@ public class OsgiRuntimeContext implements RuntimeContext { } public void stop(BundleContext bundleContext) { - if (loggingConfigurationSr != null) - loggingConfigurationSr.unregister(); - if (logEntryPublisherSr != null) - logEntryPublisherSr.unregister(); - +// if (loggingConfigurationSr != null) +// try { +// loggingConfigurationSr.unregister(); +// } catch (Exception e) { +// // silent +// } +// if (logEntryPublisherSr != null) +// try { +// logEntryPublisherSr.unregister(); +// } catch (Exception e) { +// // silent +// } } @Override public void waitForStop(long timeout) throws InterruptedException { if (framework == null) throw new IllegalStateException("Framework is not initialised"); - stop(framework.getBundleContext()); framework.waitForStop(timeout); } @Override public void close() throws Exception { + stop(framework.getBundleContext()); if (framework != null) framework.stop(); }