}
else
{
final String serviceDescription = config.getAttribute(ListenerTagNames.SERVICE_DESCRIPTION_TAG) ;
final String eprDescription = config.getAttribute(ListenerTagNames.EPR_DESCRIPTION_TAG) ;
final Registry registry = RegistryFactory.getRegistry() ;
if (logger.isDebugEnabled())
{
logger.debug("Registering < " + name + ", " + epr + " >") ;
}
registryLock.lock();
try
{
if ("true".equalsIgnoreCase(removeOldService))
registry.unRegisterService(category, name);
registry.registerEPR(category, name,
serviceDescription, epr, eprDescription) ;
}
catch (ServiceNotFoundException ex)
{
// ignore as it's possible another client just did the removal for us.