Session Seam中的会话大小是多少?

Session Seam中的会话大小是多少?,session,seam,Session,Seam,我想知道我的应用程序中的会话大小,以优化它。为了找到这个大小,我使用mat进行堆转储并对其进行分析 Seam在哪里存储会话和会话bean 我认为它在org.apache.catalina.session.StandardSession中,但显然没有(我在这个bean中只有2个八位字节)。Seam将所有内容存储在HttpSession中 Name("someFilter") @Filter(around = { "org.jboss.seam.web.ajax4jsfFilter" }) @Sco

我想知道我的应用程序中的会话大小,以优化它。为了找到这个大小,我使用mat进行堆转储并对其进行分析

Seam在哪里存储会话和会话bean


我认为它在org.apache.catalina.session.StandardSession中,但显然没有(我在这个bean中只有2个八位字节)。

Seam将所有内容存储在HttpSession中

Name("someFilter")
@Filter(around = { "org.jboss.seam.web.ajax4jsfFilter" })
@Scope(ScopeType.APPLICATION)
@Startup
@BypassInterceptors
public class SomeFilter extends AbstractFilter {

private static final LogProvider log = Logging.getLogProvider(SomeFilter.class);

@SuppressWarnings("unchecked")
public void doFilter(ServletRequest request, ServletResponse resp, FilterChain arg2) throws IOException, ServletException {
    if (HttpServletRequest.class.isAssignableFrom(request.getClass())) {
        HttpServletRequest req = (HttpServletRequest) request;
        HttpServletResponse response = (HttpServletResponse) resp;
        HttpSession session = req.getSession();
                if (log.isInfoEnabled()) {
                    List<String> attrNames = Collections.list(session.getAttributeNames());
                    for (String o : attrNames) {
                        log.info("objects in session " + o);
                    }
                }
    }
}
Name(“someFilter”)
@过滤器(大约={“org.jboss.seam.web.ajax4jsfFilter”})
@作用域(ScopeType.APPLICATION)
@启动
@旁路拦截器
公共类SomeFilter扩展了AbstractFilter{
私有静态最终LogProvider log=Logging.getLogProvider(SomeFilter.class);
@抑制警告(“未选中”)
public void doFilter(ServletRequest请求、ServletResponse响应、FilterChain arg2)抛出IOException、ServletException{
if(HttpServletRequest.class.isAssignableFrom(request.getClass())){
HttpServletRequest req=(HttpServletRequest)请求;
HttpServletResponse=(HttpServletResponse)resp;
HttpSession session=req.getSession();
if(log.isInfoEnabled()){
List attrNames=Collections.List(session.getAttributeNames());
for(字符串o:attrNames){
log.info(“会话中的对象”+o);
}
}
}
}

是的,我也发现了。事实上,mat在直接获取堆转储时存在一些问题。如果我使用jmap,我发现了合适的大小。