我想知道是否能够在运行在服务器A上的代理中打开服务器连接,以访问服务器B的notes.ini。我想读取该notes.ini中的参数。这可能通过编码? 我知道session.getEnvironment方法,但它们访问运行代理的服务器(或Notes客户机)的notes.ini。 任何想法?我可以从其他服务器读取notes.ini参数吗?
使用的解决方案,从叶戈尔:
/**
* checks for notes.ini value for
* @return
* @throws NotesException
*/
private boolean checkNoSessionInfo(String serverName) {
boolean result = false;
try {
String console = session.sendConsoleCommand(serverName, "show config *");
result = console.contains("LOG_DISABLE_SESSION_INFO=1");
} catch (NotesException e) {
oli.logErrorEx(e, "Could not check if server's user session info was disabled", OpenLogItem.SEVERITY_MEDIUM, null);
}
return result;
}
就像一个魅力! :-)
谢谢大家!
是的,这是有效的。如果你想获得Notes \ Data文件夹,你可以调用Session.sendConsoleCommand(“Server1/ACME”,“show config Directory”) ' – Brlja
是的,确认 - 很好,我更新了我的问题并添加我的解决方案。 –
FWIW,我不认为你真的需要Trusted Servers的权限。我认为唯一需要该权限的情况是ServerA上的代理需要访问ServerB上的数据库 - 在这种情况下,ServerB的服务器文档必须在“受信任的服务器”字段中列出ServerA。 –