Examples: createReplica method (Database - Java)

This agent creates a replica of the Domlog.nsf from notesua1 on the current computer.

import lotus.domino.*;
public class JavaAgent extends AgentBase {
  public void NotesMain() {
    try {
      Session session = getSession();
      AgentContext agentContext = 
          session.getAgentContext();
      // (Your code goes here) 
      Database db = 
         session.getDatabase("notesua1", "Domlog");
      String title = db.getTitle();
      Database replica = db.createReplica(null, "Domlog");
      System.out.println
      ("Database \"" + title + "\" has a new local replica");
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}