}
//parse the web and SIP DDs
Application application = null;
WebBundleDescriptor wbd = null;
// check if this is a converged app. The rule is the presence of a
// web.xml
if (hasDDXML(moduleRootDirectory, WEB_JAR_ENTRY)) {
setConverged(true);
} else {
setConverged(false);
}
// now check is this a sub-module of an Enterprise Application
if (getJ2eeApplication()) {
// we know that its a sub-module in a EAR
wbd = (WebBundleDescriptor) getBundleDescriptor(moduleDir,
parentClassLoader);
//((SipBundleDescriptor)wbd).setConverged(isConverged());
} else if (!isStartup && (moduleDir.indexOf("nodeagents") < 0)) {
// deployment operation
//set the module type to be WAR
this.setModuleType(ModuleType.WAR);
processWebArchive();
application = getApplication();
//set the module type back to the archive deployer type
this.setModuleType(XModuleType.getModuleType(
this.getClass().getName()));
if (application != null) {
wbd = (WebBundleDescriptor) application.getStandaloneBundleDescriptor();
}
} else {
//this.setModuleType(ModuleType.WAR);
// loading application during AS startup
// Obtain the application object
application = getApplication(moduleName, moduleRootDirectory,
moduleScratchDirectory, moduleType);
//set the module type back to the archive deployer type
//this.setModuleType(XModuleType.getModuleType(
// this.getClass().getName()));
if (application != null) {
wbd = (WebBundleDescriptor) application.getStandaloneBundleDescriptor();
}
}
// check if we have sip.xml or its a DD-less archive
// If there is a DD we read it, else we initialize the DD objects for annotation
// processing.
if (hasDDXML(moduleRootDirectory, SIP_JAR_ENTRY)) {
readSipDeploymentDescriptors(moduleRootDirectory);
} else {
sbd = new SipBundleDescriptor();
SipApplication sipApplication = new SipApplication();
sbd.setSipApplication(sipApplication);
}
// set the module name
sbd.getSipApplication().setModuleName(moduleName);
//set the Referring Decsriptor
sbd.getSipApplication().setReferringDescriptor(sbd);
sbd.setConverged(isConverged());
// copy the web bundle descriptor contents to sbd.
if (wbd != null) {
if( wbd.getServletDescriptors().size() > 2 ) {
sbd.setContainsHTTPServlets(true);
}
sbd.copyWebBundleDescriptor(wbd);
sbd.setApplication(application);
}