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(); }}}