| | |
| | | import org.opends.admin.ads.TopologyCache; |
| | | import org.opends.admin.ads.TopologyCacheException; |
| | | import org.opends.admin.ads.util.ApplicationTrustManager; |
| | | import org.opends.admin.ads.util.ConnectionUtils; |
| | | import org.opends.guitools.uninstaller.ui.ConfirmUninstallPanel; |
| | | import org.opends.guitools.uninstaller.ui.LoginDialog; |
| | | import org.opends.quicksetup.ui.*; |
| | |
| | | getUninstallUserData().setReplicationServer( |
| | | loginDialog.getHostName() + ":" + |
| | | conf.getReplicationServerPort()); |
| | | getUninstallUserData().setReferencedHostName(loginDialog.getHostName()); |
| | | |
| | | BackgroundTask worker = new BackgroundTask() |
| | | { |
| | |
| | | { |
| | | if (adsContext.hasAdminData() && (serverADSProperties != null)) |
| | | { |
| | | LOG.log(Level.INFO, "Unregistering server on ADS of server "+ |
| | | ConnectionUtils.getHostPort(ctx)+". Properties: "+ |
| | | serverADSProperties); |
| | | adsContext.unregisterServer(serverADSProperties); |
| | | } |
| | | } |
| | |
| | | property = ServerDescriptor.ServerProperty.LDAP_PORT; |
| | | } |
| | | ArrayList ports = (ArrayList)server.getServerProperties().get(property); |
| | | if (ports == null) |
| | | if (ports != null) |
| | | { |
| | | isServerToUninstall = ports.contains(port); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | adsProperty = ADSContext.ServerProperty.LDAPS_PORT; |
| | | adsProperty = ADSContext.ServerProperty.LDAP_PORT; |
| | | } |
| | | String v = (String)server.getAdsProperties().get(adsProperty); |
| | | if (v != null) |
| | |
| | | // TODO: the host name comparison made here does not necessarily work in |
| | | // all environments... |
| | | String hostName = server.getHostName(); |
| | | boolean hostNameEquals = false; |
| | | boolean hostNameEquals = |
| | | getUninstallUserData().getReferencedHostName().equals(hostName); |
| | | try |
| | | { |
| | | InetAddress localAddress = InetAddress.getLocalHost(); |
| | |
| | | { |
| | | hostNameEquals = localAddress.equals(addresses[i]); |
| | | } |
| | | if (!hostNameEquals) |
| | | { |
| | | hostNameEquals = |
| | | localAddress.getHostName().equalsIgnoreCase(hostName) || |
| | | localAddress.getCanonicalHostName().equalsIgnoreCase(hostName); |
| | | } |
| | | } |
| | | catch (Throwable t) |
| | | { |