String[] domainNames = sync.listReplicationDomains();
if (domainNames != null)
{
for (int i=0; i<domainNames.length; i++)
{
ReplicationDomainCfgClient domain =
sync.getReplicationDomain(domainNames[i]);
Set<String> replServers = domain.getReplicationServer();
if (replServers != null)
{
String replServer = null;
for (String o : replServers)
{
if (getUninstallUserData().getReplicationServer().
equalsIgnoreCase(o))
{
replServer = o;
break;
}
}
if (replServer != null)
{
LOG.log(Level.INFO, "Updating references in domain " +
domain.getBaseDN()+" on " + serverDisplay + ".");
replServers.remove(replServer);
if (replServers.size() > 0)
{
domain.setReplicationServer(replServers);
domain.commit();
}
else
{
sync.removeReplicationDomain(domainNames[i]);
sync.commit();