Sunday 14 August 2011

Open Lotus Notes database by replica id

In order to open a Lotus Notes database which is on same server of specified Lotus Notes database, you can use following snippet.

public Database openDatabaseById(Database srcDb, String replicaId) throws Exception {
    String server = srcDb.getServer();
    DbDirectory dir = srcDb.getParent().getDbDirectory(server);
    Database tagDb = dir.openDatabaseByReplicaID(replicaId);
    return tagDb;
}

No comments:

Post a Comment