Examples of ModuleLifecycle


Examples of org.infinispan.lifecycle.ModuleLifecycle

      for (Map.Entry<String, ModuleProperties> m : p.entrySet()) {
         try {
            String lifecycleClassName = m.getValue().getLifecycleClassName();
            Class<?> loadClass = Util.loadClass(lifecycleClassName);
            Object proxy = Proxies.newCatchThrowableProxy((ModuleLifecycle) loadClass.newInstance());
            ModuleLifecycle ml = (ModuleLifecycle) proxy;
            lifecycles.add(ml);
         } catch (Exception e) {
            log.warn("Module " + m.getKey() + " loaded, but could not be initialized ", e);
         }
      }
View Full Code Here

Examples of org.infinispan.lifecycle.ModuleLifecycle

            try {
               String lifecycleClassName = m.getValue().getLifecycleClassName();
               if (lifecycleClassName != null && !lifecycleClassName.isEmpty()) {
                  Class<?> loadClass = Util.loadClassStrict(lifecycleClassName, cl);
                  Object proxy = Proxies.newCatchThrowableProxy(loadClass.newInstance());
                  ModuleLifecycle ml = (ModuleLifecycle) proxy;
                  lifecycles.add(ml);
               }

            } catch (Exception e) {
               log.couldNotInitializeModule(m.getKey(), e);
View Full Code Here

Examples of org.infinispan.lifecycle.ModuleLifecycle

            try {
               String lifecycleClassName = m.getValue().getLifecycleClassName();
               if (lifecycleClassName != null && !lifecycleClassName.isEmpty()) {
               Class<?> loadClass = Util.loadClassStrict(lifecycleClassName);
                  Object proxy = Proxies.newCatchThrowableProxy(loadClass.newInstance());
                  ModuleLifecycle ml = (ModuleLifecycle) proxy;
                  lifecycles.add(ml);
               }

            } catch (Exception e) {
               log.warn("Module " + m.getKey() + " loaded, but could not be initialized ", e);
View Full Code Here

Examples of org.infinispan.lifecycle.ModuleLifecycle

            try {
               String lifecycleClassName = m.getValue().getLifecycleClassName();
               if (lifecycleClassName != null && !lifecycleClassName.isEmpty()) {
               Class<?> loadClass = Util.loadClassStrict(lifecycleClassName, cl);
                  Object proxy = Proxies.newCatchThrowableProxy(loadClass.newInstance());
                  ModuleLifecycle ml = (ModuleLifecycle) proxy;
                  lifecycles.add(ml);
               }

            } catch (Exception e) {
               log.couldNotInitializeModule(m.getKey(), e);
View Full Code Here

Examples of org.infinispan.lifecycle.ModuleLifecycle

            try {
               String lifecycleClassName = m.getValue().getLifecycleClassName();
               if (lifecycleClassName != null && !lifecycleClassName.isEmpty()) {
               Class<?> loadClass = Util.loadClassStrict(lifecycleClassName, cl);
                  Object proxy = Proxies.newCatchThrowableProxy(loadClass.newInstance());
                  ModuleLifecycle ml = (ModuleLifecycle) proxy;
                  lifecycles.add(ml);
               }

            } catch (Exception e) {
               log.couldNotInitializeModule(m.getKey(), e);
View Full Code Here

Examples of org.olat.core.configuration.ModuleLifeCycle

      ModuleConfig mc = (ModuleConfig)CoreSpringFactory.getBean("org.olat.core.configuration.ModuleConfig");
      Map modules = mc.getModules();
      // init all registered OLATModules - olat::: we assume silently that the order is not important
      for (Iterator iter = modules.keySet().iterator(); iter.hasNext();) {
        moduleID = (String) iter.next();
        ModuleLifeCycle mlc = (ModuleLifeCycle)modules.get(moduleID);
        mlc.init(servletContext);
      }
      // now activate the dispatcher     
      dispatcher = (Dispatcher) ServiceFactory.getService(org.olat.core.dispatcher.Dispatcher.class);
    } catch (Error er) {
      log.error("Module initialization error in module::" + moduleID, er);
View Full Code Here

Examples of org.olat.core.configuration.ModuleLifeCycle

    ModuleConfig mc = (ModuleConfig)CoreSpringFactory.getBean("org.olat.core.configuration.ModuleConfig");
    Map modules = mc.getModules();
    for (Iterator iter = modules.keySet().iterator(); iter.hasNext();) {
      String moduleID = (String) iter.next();
      try {
        ModuleLifeCycle mlc = (ModuleLifeCycle)modules.get(moduleID);
        mlc.destroy();
      } catch (Exception e) {
        // log error and continue with with next module
        log.error("Problem while destroying module::" + moduleID, e);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.