线程未启用自动GC

问题描述 投票:0回答:1

在 XPage 环境中运行时:

NotesDatabase db = new NotesDatabase(ExtLibUtil.getCurrentSession(), "", fakenamesPath);

我收到消息:

HTTP JVM:java.lang.IllegalStateException:未启用线程 自动气相色谱。通过 NotesGC.runWithAutoGC(Callable) 运行代码或 通过对 NotesGC.initThread() 返回的对象进行 try-with-resources。

https://www.mindoo.com/web/blog.nsf/dx/16.01.2017082125KLEAMY.htm?opendocument&comments我读过

“由于它们与 JSF 生命周期集成,因此内存管理由插件自动处理。这意味着使用 API 的代码不必包装在 NotesGC.runWithAutoGC() 块中,以便在某个时间后自动回收分配的 C 句柄和内存。 HTTP 请求。”

我安装了版本domino-jna-xpages-0.9.48

我正在尝试运行此示例应用程序: http://linqed.eu/2018/10/02/query-domino-data-and-faceted-search-with-domino-jna-part-1/

有人建议我的设置有什么问题/缺失吗?

java xpages lotus-domino
1个回答
0
投票

这是由服务器上的两个 DominoJNA 实例引起的。请参阅 GitHub 上的讨论:https://github.com/klehmann/domino-jna/issues/79

© www.soinside.com 2019 - 2024. All rights reserved.