ReplicationSynchronizationProviderCfgClient sync =
(ReplicationSynchronizationProviderCfgClient)
root.getSynchronizationProvider("Multimaster Synchronization");
if (sync.hasReplicationServer())
{
ReplicationServerCfgClient replicationServer =
sync.getReplicationServer();
Set<String> replServers = replicationServer.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 replication server on "+
serverDisplay+".");
replServers.remove(replServer);
if (replServers.size() > 0)
{
replicationServer.setReplicationServer(replServers);
replicationServer.commit();
}
else
{
sync.removeReplicationServer();
sync.commit();