public Object run() throws IOException { DeploymentEngine.addNewModule(module, axisConfiguration); return null; } });
public static Deployer getDeployer(String endpointDirPath) { DeploymentEngine deploymentEngine = (DeploymentEngine) EventProcessorUtil.getAxisConfiguration().getConfigurator(); return deploymentEngine.getDeployer(endpointDirPath, "siddhiql"); }
DeploymentEngine.loadServiceGroup(serviceArchive, configCtx); configCtx.getAxisConfiguration().addServiceGroup(asGroup);
private void loadOtherDirectories() { for (Map.Entry<String, Map<String, Deployer>> entry : deploymentEngine.getDeployers().entrySet()) { String directory = entry.getKey(); Map<String, Deployer> extensionMap = entry.getValue(); for (String extension : extensionMap.keySet()) { File dirToSearch = new File(directory); if (!dirToSearch.isAbsolute()) { dirToSearch = new File(deploymentEngine.getRepositoryDir(), directory); } findFileForGivenDirectory(dirToSearch, extension, directory); } } }
/** * The mediation library deployer will handling the process of deploying the * libararyArtifacts, this is required since the library specific artifacts * has to be initialized priorly for the cases like connectors * */ private void deployMediationLibraryArtifacts() { if (configurationContext == null || synapseConfiguration == null) { return; } DeploymentEngine deploymentEngine = (DeploymentEngine) configurationContext .getAxisConfiguration().getConfigurator(); String libsPath = deploymentEngine.getRepositoryDir().getPath() + File.separator + "synapse-libs"; deploymentEngine.addDeployer(new LibraryArtifactDeployer(), libsPath, "zip"); }
ArrayList<AxisService> serviceList = new ArrayList<AxisService>(); serviceList.add(service); DeploymentEngine.addServiceGroup(serviceGroup, serviceList, null, configCtx); ArrayList serviceList = groupBuilder.populateServiceGroup(serviceGroup); DeploymentEngine.addServiceGroup(serviceGroup, serviceList, null,
populateModule(module, fileUrl); module.setFileName(fileUrl); DeploymentEngine.addNewModule(module, axisConfig); log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_MODULE, module.getArchiveName(), fileUrl.toString())); if (moduleStatus.startsWith("Error:")) { axisConfig.getFaultyModules().put( DeploymentEngine.getAxisServiceName(deploymentFileData.getName()), moduleStatus);
/** * Registers the Endpoint deployer. * * @param axisConfig AxisConfiguration to which this deployer belongs * @param synapseEnvironment SynapseEnvironment to which this deployer belongs */ private void registerDeployer(AxisConfiguration axisConfig, SynapseEnvironment synapseEnvironment) throws TenantAwareLoadBalanceEndpointException { SynapseConfiguration synCfg = synapseEnvironment.getSynapseConfiguration(); DeploymentEngine deploymentEngine = (DeploymentEngine) axisConfig.getConfigurator(); SynapseArtifactDeploymentStore deploymentStore = synCfg.getArtifactDeploymentStore(); String synapseConfigPath = ServiceBusUtils.getSynapseConfigAbsPath( synapseEnvironment.getServerContextInformation()); String endpointDirPath = synapseConfigPath + File.separator + MultiXMLConfigurationBuilder.ENDPOINTS_DIR; for (Endpoint ep : synCfg.getDefinedEndpoints().values()) { if (ep.getFileName() != null) { deploymentStore.addRestoredArtifact( endpointDirPath + File.separator + ep.getFileName()); } } deploymentEngine.addDeployer( new EndpointDeployer(), endpointDirPath, ServiceBusConstants.ARTIFACT_EXTENSION); }
ArrayList<AxisService> serviceList = new ArrayList<AxisService>(); serviceList.add(service); DeploymentEngine.addServiceGroup(serviceGroup, serviceList, null, new ServiceGroupBuilder(rootElement, wsdlServicesMap, configContext); ArrayList<? extends AxisService> serviceList = groupBuilder.populateServiceGroup(serviceGroup); DeploymentEngine.addServiceGroup(serviceGroup, serviceList, null,
URL url = deploymentFile.toURI().toURL(); metaData.setFileName(url); DeploymentEngine.addNewModule(metaData, axisConfig); super.deploy(deploymentFileData); log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_MODULE, } finally { if (moduleStatus.startsWith("Error:")) { axisConfig.getFaultyModules().put(DeploymentEngine.getAxisServiceName( deploymentFileData.getName()), moduleStatus);
private void loadOtherDirectories() { for (Map.Entry<String, Map<String, Deployer>> entry : deploymentEngine.getDeployers().entrySet()) { String directory = entry.getKey(); Map<String, Deployer> extensionMap = entry.getValue(); for (String extension : extensionMap.keySet()) { File dirToSearch = new File(directory); if (!dirToSearch.isAbsolute()) { dirToSearch = new File(deploymentEngine.getRepositoryDir(), directory); } findFileForGivenDirectory(dirToSearch, extension, directory); } } }
DeploymentEngine.addServiceGroup(serviceGroup, serviceList, location,
populateModule(module, fileUrl); module.setFileName(fileUrl); DeploymentEngine.addNewModule(module, axisConfig); log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_MODULE, module.getArchiveName(), fileUrl.toString())); if (moduleStatus.startsWith("Error:")) { axisConfig.getFaultyModules().put( DeploymentEngine.getAxisServiceName(deploymentFileData.getName()), moduleStatus);
DeploymentEngine.loadServiceGroup(serviceArchive, configCtx); configCtx.getAxisConfiguration().addServiceGroup(asGroup);
Deployer deployer = deploymentEngine.getDeployer(dir, extension); deployer.setDirectory(dir); addFileToDeploy(file, deployer, WSInfo.TYPE_CUSTOM); if (!file.isDirectory() && extension .equals(DeploymentFileData.getFileExtension(file.getName()))) { Deployer deployer = deploymentEngine.getDeployer(dir, extension); deployer.setDirectory(dir); addFileToDeploy(file, deployer, WSInfo.TYPE_CUSTOM);
AxisModule module = axisConfig.getModule(axismodule.getName()); if (module == null) { DeploymentEngine.addNewModule(axismodule, axisConfig);
DeploymentEngine.addServiceGroup(serviceGroup, serviceList, location,
URL url = deploymentFile.toURI().toURL(); metaData.setFileName(url); DeploymentEngine.addNewModule(metaData, axisConfig); super.deploy(deploymentFileData); log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_MODULE, } finally { if (moduleStatus.startsWith("Error:")) { axisConfig.getFaultyModules().put(DeploymentEngine.getAxisServiceName( deploymentFileData.getName()), moduleStatus);
public void deployService(Object service) throws IOException { String artifactName = service + ".aar"; File file = copyResourceToFileSystem(artifactName, artifactName); AxisServiceGroup serviceGroup = DeploymentEngine.loadServiceGroup(file, cfgCtx); cfgCtx.getAxisConfiguration().addServiceGroup(serviceGroup); }
Deployer deployer = deploymentEngine.getDeployer(dir, extension); deployer.setDirectory(dir); addFileToDeploy(file, deployer, WSInfo.TYPE_CUSTOM); if (!file.isDirectory() && extension .equals(DeploymentFileData.getFileExtension(file.getName()))) { Deployer deployer = deploymentEngine.getDeployer(dir, extension); deployer.setDirectory(dir); addFileToDeploy(file, deployer, WSInfo.TYPE_CUSTOM);