Search in sources :

Example 16 with Module

use of com.sun.enterprise.module.Module in project Payara by payara.

the class DeploymentTracing method printModuleStatus.

public static void printModuleStatus(ModulesRegistry registry, Level level, Logger logger) {
    if (!logger.isLoggable(level)) {
        return;
    }
    int counter = 0;
    StringBuilder sb = new StringBuilder("Module Status Report Begins\n");
    for (Module m : registry.getModules()) {
        if (m.getState() == ModuleState.READY) {
            sb.append(m).append("\n");
            counter++;
        }
    }
    sb.append("there were " + counter + " modules in ACTIVE state");
    sb.append("\n");
    counter = 0;
    // then resolved
    for (Module m : registry.getModules()) {
        if (m.getState() == ModuleState.RESOLVED) {
            sb.append(m).append("\n");
            counter++;
        }
    }
    sb.append("there were " + counter + " modules in RESOLVED state");
    sb.append("\n");
    counter = 0;
    // finally installed
    for (Module m : registry.getModules()) {
        if (m.getState() != ModuleState.READY && m.getState() != ModuleState.RESOLVED) {
            sb.append(m).append("\n");
            counter++;
        }
    }
    sb.append("there were " + counter + " modules in INSTALLED state");
    sb.append("Module Status Report Ends");
    logger.log(level, sb.toString());
}
Also used : Module(com.sun.enterprise.module.Module)

Aggregations

Module (com.sun.enterprise.module.Module)16 JarURIPattern (com.sun.enterprise.util.net.JarURIPattern)4 URI (java.net.URI)4 Pattern (java.util.regex.Pattern)4 ModulesRegistry (com.sun.enterprise.module.ModulesRegistry)3 URISyntaxException (java.net.URISyntaxException)3 URL (java.net.URL)3 URLClassLoader (java.net.URLClassLoader)3 HashMap (java.util.HashMap)2 ActionReport (org.glassfish.api.ActionReport)2 EngineInfo (org.glassfish.internal.data.EngineInfo)2 CacheTag (com.sun.appserv.web.taglibs.cache.CacheTag)1 InitialGroupInfoService (com.sun.corba.ee.impl.folb.InitialGroupInfoService)1 Application (com.sun.enterprise.config.serverbeans.Application)1 Config (com.sun.enterprise.config.serverbeans.Config)1 Engine (com.sun.enterprise.config.serverbeans.Engine)1 File (java.io.File)1 FileNotFoundException (java.io.FileNotFoundException)1 FilenameFilter (java.io.FilenameFilter)1 IOException (java.io.IOException)1