Clean up code
[lgpl/argeo-commons.git] / org.argeo.cms / src / org / argeo / cms / internal / osgi / CmsActivator.java
index 5e047d38a6b06db35900bd5439533e164646ff96..b09956203cc2eb4afa0bfa60b2a1c22cf1fe9f5c 100644 (file)
@@ -26,29 +26,7 @@ public class CmsActivator implements BundleActivator {
 
        private static BundleContext bundleContext;
 
-//     private LogReaderService logReaderService;
-//
-//     private CmsOsgiLogger logger;
-
        void init() {
-//             Runtime.getRuntime().addShutdownHook(new CmsShutdown());
-//             instance = this;
-//             this.bc = bundleContext;
-//             if (bundleContext != null)
-//                     this.logReaderService = getService(LogReaderService.class);
-//             initArgeoLogger();
-//             this.internalExecutorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
-//
-//             try {
-//                     initSecurity();
-////                   initArgeoLogger();
-//                     initNode();
-//
-//                     if (log.isTraceEnabled())
-//                             log.trace("Kernel bundle started");
-//             } catch (Throwable e) {
-//                     log.error("## FATAL: CMS activator failed", e);
-//             }
        }
 
        void destroy() {
@@ -58,11 +36,11 @@ public class CmsActivator implements BundleActivator {
                } catch (Exception e) {
                        log.error("CMS activator shutdown failed", e);
                }
-               
+
                new GogoShellKiller().start();
        }
 
-       private void initSecurity() {
+       protected void initSecurity() {
                // code-level permissions
                String osgiSecurity = bundleContext.getProperty(Constants.FRAMEWORK_SECURITY);
                if (osgiSecurity != null && Constants.FRAMEWORK_SECURITY_OSGI.equals(osgiSecurity)) {
@@ -98,13 +76,6 @@ public class CmsActivator implements BundleActivator {
 
        }
 
-//     private void initArgeoLogger() {
-//             logger = new CmsOsgiLogger(logReaderService);
-//             if (bundleContext != null)
-//                     bundleContext.registerService(ArgeoLogger.class, logger, null);
-//     }
-
-
        public static <T> void registerService(Class<T> clss, T service, Dictionary<String, ?> properties) {
                if (bundleContext != null) {
                        bundleContext.registerService(clss, service, properties);
@@ -139,7 +110,6 @@ public class CmsActivator implements BundleActivator {
                bundleContext = null;
        }
 
-
        public static BundleContext getBundleContext() {
                return bundleContext;
        }