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.