if(rootDD.isApplication()) {
moduleName = Result.APP;
} else {
ModuleDescriptor mdesc =
BundleDescriptor.class.cast(rootDD).getModuleDescriptor();
final ArchiveType moduleType = mdesc.getModuleType();
if(moduleType != null && moduleType.equals(DOLUtils.ejbType())) {
moduleName = Result.EJB;
} else if (moduleType != null && moduleType.equals(DOLUtils.warType())) {
moduleName = Result.WEB;
} else if (moduleType != null && moduleType.equals(DOLUtils.carType())) {
moduleName = Result.APPCLIENT;
} else {
throw new RuntimeException(
smh.getLocalString(getClass().getName()+".exception", // NOI18N
"Unknown module type : {0}", // NOI18N