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);
}