/** * 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"); }
/** * 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); }