{
synchronized (_implementations)
{
org.w3c.dom.Text child = DomUtil.getTextNode(protocol, CoordinatorXSD.coordinatorType);
String protocolType = child.getNodeValue();
SagasHLS coordHLS = (SagasHLS) _implementations.get(protocolType);
if (coordHLS == null)
{
Object implementation = _protocolManager.getProtocolImplementation(protocol);
if (implementation instanceof String)
{
Class c = Class.forName((String) implementation);
coordHLS = (SagasHLS) c.newInstance();
}
else
coordHLS = (SagasHLS) implementation;
_implementations.put(protocolType, coordHLS);
}
return coordHLS.coordinatorManager();
}
}
catch (ProtocolNotRegisteredException ex)
{
throw ex;