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());
}
Aggregations