deplMgr.startDeploy(deployActionID, archiveUploadID, planUploadID, dupOptions);
} else {
// using http
String archivePath = uploadArchiveOverHTTP(serverId,
deployArchive);
DeploymentSourceImpl archiveSource =
new DeploymentSourceImpl(archivePath, true,
new String[1], new String[1], new String[1],
new HashMap());
String planPath = null;
DeploymentSourceImpl planSource = null;
// If there is a plan, upload the plan
if (deployPlan != null){
if (deployPlan.getURI()!=null){
File f = new File(deployPlan.getURI().getPath());
if (f.length()!= 0) {
planPath = uploadArchiveOverHTTP(serverId, deployPlan);
planSource =
new DeploymentSourceImpl(planPath, true,
new String[1], new String[1], new String[1],
new HashMap());
}
}
}
endTime = System.currentTimeMillis();
deplMgr.startDeploy(deployActionID, archiveSource.asMap(),
planSource == null ? null : planSource.asMap(),
dupOptions);
}
_logger.log(Level.FINE,
"time in upload: " + (endTime-startTime));
} else {
// Directory deploy is supported only on DAS - check that here
if((isDirectoryDeploy) && (!isDomainLocal(domain))) {
setupForAbnormalExit(localStrings.getString("enterprise.deployment.client.domainNotLocal"),
domain);
return;
}
DeploymentSourceImpl archive = new DeploymentSourceImpl(deployArchive.getURI().getPath(), true,
new String[1], new String[1], new String[1], new HashMap());
// we do not support deployment plan for directory deployment
// currently
deplMgr.startDeploy(deployActionID, archive.asMap(), null, dupOptions);
}
// if deployActionID is still null, then there is some failure - report this and die
if(deployActionID == null) {
setupForAbnormalExit(localStrings.getString("enterprise.deployment.client.no_deployment_id"), domain);