一段时间以来,在 Domino 中调试 Java 代理的方式一直是双头野兽。说明请参考本帖:
使用来自 openntf 的新 API,我被困住了,因为不再有 createSession() 方法,我想知道如何做到这一点?
下面是我的“主要”:
public static void main(String[] args) {
Session s = null;
Database d = null;
Database l = null;
Database m = null;
lotus.domino.NotesThread.sinitThread();
try {
s = NotesFactory.createSession((String) null,
(String) null, "mypassword");
d = s.getDatabase("DeepThought/tradechannel",
"tradesec/7.0/tradesec.nsf");
JavaAgent a = new JavaAgent(s, d);
a.NotesMain();
}
/**
* This is only here for debugging purposes
*
*
*
*/
public JavaAgent() {
}
/**
* This is only here for debugging purposes
*
* @param s
* Session
* @param d
* Database
* @param l
* Database
*/
public JavaAgent(Session s, Database d) {
session = s;
db = d;
}
public void NotesMain() {
if (session != null) {
session = session;
db = db;
logDb = logDb;
agentName = "Archive Agent";
alog = alog;
} else {
session = getSession();
agentContext = session.getAgentContext();
agentName = agentContext.getCurrentAgent().getName();
db = agentContext.getCurrentDatabase();
}
}
我正在使用 Domino 9 HF441,org.openntf.domino.xsp_1.0.0.201309021740