getApplicationHolder(context.getSource(), context, true);
}
private ApplicationHolder getApplicationHolder(ReadableArchive source,
DeploymentContext context, boolean isDirectory) {
ApplicationHolder holder = context.getModuleMetaData(ApplicationHolder.class);
if (holder==null || holder.app==null) {
try {
DeployCommandParameters params = context.getCommandParameters(DeployCommandParameters.class);
if (params != null && params.altdd != null) {
source.addArchiveMetaData(DeploymentProperties.ALT_DD,
params.altdd);
}
long start = System.currentTimeMillis();
ApplicationArchivist archivist = habitat.getService(ApplicationArchivist.class);
archivist.setAnnotationProcessingRequested(true);
String xmlValidationLevel = dasConfig.getDeployXmlValidation();
archivist.setXMLValidationLevel(xmlValidationLevel);
if (xmlValidationLevel.equals("none")) {
archivist.setXMLValidation(false);
}
holder = new ApplicationHolder(archivist.createApplication(
source, isDirectory));
_logger.fine("time to read application.xml " + (System.currentTimeMillis() - start));
} catch (IOException e) {
throw new RuntimeException(e);
} catch (SAXParseException e) {