In Java ADF, the application server thread pool size does not shrink after session expiry in OC4J 10.1.3.1.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM040011
已提交
November 11, 2008
上次修改时间
April 2, 2025
适用范围
No Product Found
找到的版本
9.2
编程语言
Java
修正版本
9.3
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
Write a httpsessionlistener class which will explicitly close all the app server threadspackage com.esri.helper;import javax.servlet.http.*; public class MySessionListenerimplements HttpSessionListener { public MySessionListener() {}public void sessionCreated(HttpSessionEvent sessionEvent) { }public void sessionDestroyed(HttpSessionEvent sessionEvent) { HttpSession session = sessionEvent.getSession();try{/*mapContext is the managed-bean-name defined for WebContext in faces config <managed-bean-name>mapContext</managed-bean-name> <managed-bean-class>com.esri.adf.web.data.WebContext</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> */ com.esri.adf.web.data.WebContext ctx = (com.esri.adf.web.data.WebContext) session.getAttribute("mapContext");com.esri.adf.web.util.GroupThreadPool gt = ctx.getThreadPool();gt.shutdown(true);}catch(Exception e){ e.printStackTrace(); }}}