首页 Domino Java
文章
取消

Domino Java

如果可能,最好不要用Domino Java(是C++的对象,不能回收)!用的话注意内存回收(Recyle)

Java 类路径

Include the classes in the agent/web service you are writing.

Put the classes in a Java script library and include the script library.

Use the JavaUserClasses notes.ini setting.

Put the classes in the jvm/lib/ext folder.

Session session = getSession();

PrintWriter pw = getAgentOutput();

AgentContext agentContext = session.getAgentContext();

Database dbCur = agentContext.getCurrentDatabase();

Document doc = agentContext.getDocumentContext();

安全设置

jvmlibsecurityjava.policy

设置

;JavaMinHeapSize=67108864    64MB
;JavaMaxHeapSize=1073741824    1024MB。  容易照成OutOfMemory错误
HTTPJVMMaxHeapSize=1024M 1/4内存  容易照成内存不够的错误 导致系统崩溃
HTTPJVMMaxHeapSizeSet=1
JavaVerboseGC=1 开启内存GC信息
JavaVerbose=1 开启Java详细信息

Runtime.getRuntime().totalMemory() ,Runtime.getRuntime().freeMemory()可以查看JVM内存使用情况

链接:Java in Notes/Domino Explained: Classloading

Managing external Java dependencies in Domino Designer

Java memory management in Notes/Domino

Understanding the IBM Software Developers Kit (SDK) for Java

Using existing Java in an Xpage

本文由作者按照 CC BY 4.0 进行授权