*Save the current time to use in preparing the audit info later so
*the audit measurement includes all the logic below.
*/
long startTime = System.currentTimeMillis();
sLogger.log(Level.FINE, "mbean.begin_deploy", moduleID);
DeployableObjectType type = null;
if (dProps.getType() != null) {
type = DeploymentServiceUtils.getDeployableObjectType(dProps.getType());
} else {
type = DeploymentServiceUtils.getTypeFromFile(
moduleID, deployFile.getAbsolutePath());
}
InstanceEnvironment env =
ApplicationServer.getServerContext().getInstanceEnvironment();
DeploymentRequest req = new DeploymentRequest(
env,
type,
DeploymentCommand.DEPLOY);
DeploymentRequestRegistry.getRegistry().addDeploymentRequest(
moduleID, req);
req.setName(moduleID);
boolean isRegistered = false;
isRegistered = DeploymentServiceUtils.isRegistered(moduleID, type);
// FIXME validation for new REDEPLOY property
if (isRegistered) {
DeploymentServiceUtils.validate(moduleID,type,REDEPLOY_ACTION, req);
}
req.setFileSource(deployFile);
req.setDeploymentPlan(planFile);
req.setForced(dProps.getForce());
// Set the context Root for extension modules
if(type.isWEB() || req.isExtensionModule()) {
req.setDefaultContextRoot(dProps.getDefaultContextRoot(
archiveName));
req.setContextRoot(dProps.getContextRoot());
}
req.setVerifying(dProps.getVerify());