if ((j2ee_apps.length + ejb_modules.length) == 0)
return (new Application[] {});
// Get the respective Managers to retrieve Deployment descriptors
AppsManager appsManager = getAppsManager();
EjbModulesManager ejbModulesManager = getEjbModulesManager();
// Get Deployment desc for J2EE apps.
for (int i=0; i<j2ee_apps.length; i++){
String appName = j2ee_apps[i].getName();
// Check if the application is referenced by the server instance on
// which recovery is happening.
if (!(ServerHelper.serverReferencesApplication(configContext_, sc_.getInstanceName(), appName) ))
continue;
try{
Application appDescriptor =
appsManager.getAppDescriptor(appName,
ASClassLoaderUtil.getSharedClassLoader());
deployedAppsDescriptorList.add(appDescriptor);
} catch (Exception e){
String message = localStrings.getString(
"error.getting.application.DD",
appName);
_logger.log(Level.WARNING, message + e.getMessage());
_logger.log(Level.FINE,message + e.getMessage(), e);
}
}
// Get deployment desc for EJB modules.
for (int i=0; i<ejb_modules.length; i++){
String modName = ejb_modules[i].getName();
if (!(ServerHelper.serverReferencesApplication(configContext_, sc_.getInstanceName(), modName) ))
continue;
try{
Application appDescriptor =
ejbModulesManager.getDescriptor(modName,
ASClassLoaderUtil.getSharedClassLoader());
deployedAppsDescriptorList.add(appDescriptor);
} catch (Exception e){
String message = localStrings.getString(
"error.getting.module.DD",