1

Is there a working way to remove all replication options set in a Lotus Notes database (using java)?

I have tried the following approach:

I changed replication settings (added formula, enabled/disabled flags in "Advanced" tab, etc).

Then I invoked the code:

Replication replication = currentDb.getReplicationInfo();
ReplicationEntry any2AnyEntry = replication.getEntry("-", "-");
ReplicationEntry any2ThisSrvEntry = replication.getEntry("-", currentDb.getServer());
....

if an entry is not null I invoke someReplicationEntry.remove(); and after that I call replication.save();

But when I check replication options in the Notes client, there are the same settings, which were before.

How can I reset replication options to the state like the state for a just created Notes database? Is there a way? (tried replication.reset() with save, but without success).

Thank you.

apaderno
  • 28,547
  • 16
  • 75
  • 90

1 Answers1

0

Don't call the replication.save() after the remove() as you are just creating the document again.

Sample code detailed here:

http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_EXAMPLES_REMOVE_METHOD_RE_JAVA.html

Simon O'Doherty
  • 9,259
  • 3
  • 26
  • 54