Examples: openWithFailover method
This agent opens names.nsf on a server, but fails over if the server is in a cluster and another server contains the database.
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("", "");
if (db.openWithFailover("Slapper/East/Acme", "names"))
System.out.println("Names.nsf opened on " + db.getServer());
else
System.out.println("Names.nsf not opened");
} catch(Exception e) {
e.printStackTrace();
}
}
}