Clean up code
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 7 Mar 2024 18:51:23 +0000 (19:51 +0100)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 7 Mar 2024 18:51:23 +0000 (19:51 +0100)
org.argeo.init/src/org/argeo/init/RuntimeManagerMain.java
org.argeo.init/src/org/argeo/init/osgi/OsgiRuntimeContext.java

index 7a3f781391f9fd72e02424fb807ff63a5ae4a025..74560185d011729928c5e5d9476a6e086ea4b0ff 100644 (file)
@@ -59,18 +59,6 @@ public class RuntimeManagerMain implements RuntimeManager {
        }
 
        public void run() {
-//             try {
-//                     for (Path p : Files.newDirectoryStream(Paths.get("/usr/local/lib/a2"), "*.so")) {
-//                             try {
-//                                     System.load(p.toString());
-//                             } catch (UnsatisfiedLinkError e) {
-//                                     e.printStackTrace();
-//                             }
-//                     }
-//             } catch (IOException e) {
-//                     e.printStackTrace();
-//             }
-
                OsgiRuntimeContext managerRuntimeContext = new OsgiRuntimeContext(configuration);
                try {
                        managerRuntimeContext.run();
@@ -149,21 +137,6 @@ public class RuntimeManagerMain implements RuntimeManager {
                OsgiRuntimeContext runtimeContext = loadRuntime(relPath, configCallback);
                runtimeContext.run();
                Framework framework = runtimeContext.getFramework();
-
-//             for (Bundle b : framework.getBundleContext().getBundles()) {
-//                     try {
-////                           if (b.getSymbolicName().startsWith("org.eclipse.swt.gtk")) {
-////                                   b.uninstall();
-////                           }
-////                           else if (b.getSymbolicName().startsWith("org.eclipse.jface")) {
-////                                   b.uninstall();
-////                           }
-//                     } catch (Exception e) {
-//                             // TODO Auto-generated catch block
-//                             e.printStackTrace();
-//                     }
-//             }
-
                if (framework != null) {// in case the framework has closed very quickly after run
                        framework.getBundleContext().addFrameworkListener((e) -> {
                                if (e.getType() >= FrameworkEvent.STOPPED) {
index 268fb221b3e54796d46cea0775ba2e35bdf62258..4ec5a04734bea64cabed71dd5ccf95534672b154 100644 (file)
@@ -14,7 +14,6 @@ import java.util.function.Consumer;
 import java.util.function.Supplier;
 
 import org.argeo.api.init.RuntimeContext;
-import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.Constants;
@@ -28,7 +27,7 @@ public class OsgiRuntimeContext implements RuntimeContext, AutoCloseable {
        private final static long STOP_FOR_UPDATE_TIMEOUT = 60 * 1000;
        private final static long CLOSE_TIMEOUT = 60 * 1000;
 
-       private final static String SYMBOLIC_NAME_FELIX_SCR = "org.apache.felix.scr";
+       // private final static String SYMBOLIC_NAME_FELIX_SCR = "org.apache.felix.scr";
 
        private Map<String, String> config;
        private Framework framework;