use of org.apache.dubbo.registry.support.SkipFailbackWrapperException in project dubbo by alibaba.
the class RegistryProtocol method doReExport.
private <T> void doReExport(final Invoker<T> originInvoker, ExporterChangeableWrapper<T> exporter, URL registryUrl, URL oldProviderUrl, URL newProviderUrl) {
if (getProviderUrl(originInvoker).getParameter(REGISTER_KEY, true)) {
Registry registry = null;
try {
registry = getRegistry(originInvoker);
} catch (Exception e) {
throw new SkipFailbackWrapperException(e);
}
LOGGER.info("Try to unregister old url: " + oldProviderUrl);
registry.reExportUnregister(oldProviderUrl);
LOGGER.info("Try to register new url: " + newProviderUrl);
registry.reExportRegister(newProviderUrl);
}
try {
ProviderModel.RegisterStatedURL statedUrl = getStatedUrl(registryUrl, newProviderUrl);
statedUrl.setProviderUrl(newProviderUrl);
exporter.setRegisterUrl(newProviderUrl);
} catch (Exception e) {
throw new SkipFailbackWrapperException(e);
}
}
Aggregations