OMElement loadbalanceElement
= fac.createOMElement("loadbalance", SynapseConstants.SYNAPSE_OMNAMESPACE);
endpointElement.addChild(loadbalanceElement);
LoadbalanceAlgorithm algorithm = loadbalanceEndpoint.getAlgorithm();
String algorithmName = "roundRobin";
if (algorithm instanceof RoundRobin) {
algorithmName = "roundRobin";
}
loadbalanceElement.addAttribute(XMLConfigConstants.ALGORITHM_NAME, algorithmName, null);