// Set services dir
String servicesDirName = "axis2services";
File servicesDir = new File(repoLocation + File.separator + servicesDirName);
if (!servicesDir.exists() && !servicesDir.mkdirs()) {
throw new DeploymentException("Could not create services directory " +
servicesDir.getAbsolutePath());
}
axisConfig.addParameter(new Parameter(DeploymentConstants.SERVICE_DIR_PATH,
servicesDirName));
// Set modules dir
String modulesDirName = "axis2modules";
File modulesDir = new File(repoLocation + File.separator + modulesDirName);
if(!modulesDir.exists() && !modulesDir.mkdirs()){
throw new DeploymentException("Could not create modules directory " +
modulesDir.getAbsolutePath());
}
axisConfig.addParameter(new Parameter(DeploymentConstants.MODULE_DRI_PATH,
modulesDirName));
} catch (AxisFault e) {
String msg =
"Cannot add DeploymentConstants.SERVICE_DIR_PATH or " +
"DeploymentConstants.MODULE_DIR_PATH parameters";
log.error(msg, e);
throw new DeploymentException(msg, e);
}
carbonContext.setRegistry(RegistryType.SYSTEM_CONFIGURATION, registry);
try {
// TODO: The governance system registry should be passed into the tenant axis