log.info("Calling deployer for engine " + request.getEngineName());
Path deploymentDirPath = Paths.get(request.getDeploymentDir());
Path engineLogfileDirPath = Paths.get(request.getEngineLogfileDir());
if ("petalsesb_v".equals(request.getEngineName())) {
PetalsEsbDeployer deployer = new PetalsEsbDeployer();
deployer.setDeploymentDirPath(deploymentDirPath);
deployer.setProcessName(request.getProcessName());
deployer.setLogFilePath(engineLogfileDirPath);
deployer.setPackageFilePath(pathToPackageFile);
deployer.setTimeoutInSeconds(request.getDeployTimeout());
deployer.deploy();
} else if ("ode_v".equals(request.getEngineName())) {
OdeDeployer deployer = new OdeDeployer();
deployer.setDeploymentDirPath(deploymentDirPath);
deployer.setProcessName(request.getProcessName());
deployer.setLogFilePath(engineLogfileDirPath);
deployer.setPackageFilePath(pathToPackageFile);
deployer.setTimeoutInSeconds(request.getDeployTimeout());
deployer.deploy();
} else if ("bpelg_v".equals(request.getEngineName())) {
BpelgDeployer deployer = new BpelgDeployer();
deployer.setDeploymentDirPath(deploymentDirPath);
deployer.setProcessName(request.getProcessName());
deployer.setLogFilePath(engineLogfileDirPath);
deployer.setPackageFilePath(pathToPackageFile);
deployer.setTimeoutInSeconds(request.getDeployTimeout());
deployer.deploy();
} else if ("active_bpel_v".equals(request.getEngineName())) {
ActiveBpelDeployer deployer = new ActiveBpelDeployer();
deployer.setDeploymentDirPath(deploymentDirPath);
deployer.setProcessName(request.getProcessName());
deployer.setLogFilePath(engineLogfileDirPath);
deployer.setPackageFilePath(pathToPackageFile);
deployer.setTimeoutInSeconds(request.getDeployTimeout());
deployer.deploy();
} else if ("orchestra_v".equals(request.getEngineName())) {
OrchestraDeployer deployer = new OrchestraDeployer();
deployer.setOrchestraHome(deploymentDirPath);
deployer.setPackageFilePath(pathToPackageFile);
deployer.setAntBinFolder(Paths.get("/usr/share/ant/bin"));
deployer.deploy();
} else if ("openesb_v".equals(request.getEngineName())) {
OpenEsbCLI cli = new OpenEsbCLI(Paths.get("/opt/openesb/glassfish"));
OpenEsbDeployer deployer = new OpenEsbDeployer();
deployer.setTmpFolder(Paths.get("/opt/betsy"));
deployer.setProcessName(request.getProcessName());
deployer.setPackageFilePath(pathToPackageFile);
deployer.setCli(cli);
deployer.deploy();
} else {
throw new CommunicationException("invalid engine given");
}
log.info("Deployment successful -> sending response");