Package org.olat.core.configuration

Examples of org.olat.core.configuration.OLATModule


      for (Iterator<Configuration> iter = configuration.getChildren("module").iterator(); iter.hasNext();) {
        Configuration moduleConfig = iter.next();
        String className = moduleConfig.getAttribute("classname");
        try {
          ClassLoader cl = Thread.currentThread().getContextClassLoader();
          OLATModule olatmodule = (OLATModule) cl.loadClass(className).newInstance();
          log.info("*** INIT: Initializing module '" + olatmodule.getClass().getName() + "'.");
          olatmodule.init(moduleConfig);
          modules.add(olatmodule);
        } catch (Throwable e) {
          log.error("Error loading module '" + className + "'", e);
          abort(e);
        }
View Full Code Here


   
    // destroy any available modules
    if (modules != null) {
      // destroy modules in the reverse load order to solve dependencies
      for (int i = modules.size()-1; i>-1; i--) {
        OLATModule olatmodule = modules.get(i);
        log.info("*** DESTORY: Destroying module '" + olatmodule.getClass().getName() + "'.");
        try {
          olatmodule.destroy();
        } catch (Exception e) {
          // don't propagate any exceptions
          log.error("Exception destroying module '" + olatmodule.getClass().getName() + "'.", e);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.olat.core.configuration.OLATModule

Copyright © 2018 www.massapicom. 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.