Package org.lilyproject.runtime.module

Examples of org.lilyproject.runtime.module.ModuleConfig


        }
        for (ModuleDefinition entry : model.getModules()) {
            if (infolog.isInfoEnabled()) {
                infolog.debug("Reading module config " + entry.getId() + " - " + entry.getFile().getAbsolutePath());
            }
            ModuleConfig moduleConf = ModuleConfigBuilder.build(entry, this);
            moduleConfigs.add(moduleConf);
        }

        // Check / build class path configurations
        Conf classLoadingConf = confRegistry.getConfiguration("classloading");
        List<ClasspathEntry> sharedClasspath = ClassLoaderConfigurer.configureClassPaths(moduleConfigs,
                settings.getEnableArtifactSharing(), classLoadingConf);

        // Construct the shared classloader
        infolog.debug("Creating shared classloader");

        rootClassLoader = ClassLoaderBuilder.build(sharedClasspath, this.getClass().getClassLoader(), settings.getRepository());

        // Construct the classloaders of the various modules
        List<ClassLoader> moduleClassLoaders = new ArrayList<ClassLoader>();
        for (ModuleConfig cfg : moduleConfigs) {
            ClassLoader classLoader = cfg.getClassLoadingConfig().getClassLoader(getClassLoader());
            moduleClassLoaders.add(classLoader);
        }

        // Initialize the ConfManager for the modules configuration
        confManager.initModulesConfig(moduleConfigs);

        // Create the modules
        infolog.info("Starting the modules.");

        modules = new ArrayList<Module>(model.getModules().size());
        for (int i = 0; i < moduleConfigs.size(); i++) {
            ModuleConfig moduleConfig = moduleConfigs.get(i);
            Module module = ModuleBuilder.build(moduleConfig, moduleClassLoaders.get(i), this);
            modules.add(module);
            modulesById.put(module.getDefinition().getId(), module);
        }
View Full Code Here

TOP

Related Classes of org.lilyproject.runtime.module.ModuleConfig

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.