简体   繁体   English

Java EE / Seam应用程序中的会话大小

[英]Session size in Java EE/Seam Application

I'm running into problems with the size of my Sessions with my Web Application that is based on the Jboss Seam Framework. 我遇到了基于Jboss Seam Framework的Web应用程序的Sessions大小的问题。 I am using MessAdmin to investigate and it is reporting that as soon as a User logs in, their session size jumps from 50KB to 55MB (ouch). 我正在使用MessAdmin进行调查,并报告用户登录后,其会话大小从50KB跃升至55MB(哎呀)。 This seems crazy as I keep very few Objects in the Conversation/Session scopes. 这似乎很疯狂,因为我在“对话/会话”范围中保留了很少的对象。

The output from MessAdmin makes it hard to determine the cause. MessAdmin的输出使得很难确定原因。 I'm hoping that someone with more experience with this tool will be able to point me in the right direction. 我希望有更多使用此工具的经验的人能够为我指明正确的方向。

Here's the output: 这是输出:

替代文字
(source: locuslive.com ) (来源: locuslive.com

替代文字
(source: locuslive.com ) (来源: locuslive.com

An explanation to shared objects can be found in the [MessAdmin documentation][1] 共享对象的说明可以在[MessAdmin文档] [1]中找到。

[1]: http://messadmin.sourceforge.net/#[[HttpSession size]] [1]:http://messadmin.sourceforge.net/# [[HttpSession大小]]

Looks simple enough: There is a handful of objects in that list with a size in excess of 50 MB, and those are the ones you need to get rid of. 看起来很简单:列表中只有少数几个对象,大小超过50 MB,而这些都是您需要删除的对象。

Your application objects (Task List whatever) may not be large, but if any of them contain a reference to one of those big objects, that will get pulled into your session too. 您的应用程序对象(无论是任务列表)可能不会很大,但是如果其中任何一个包含对这些大对象之一的引用,那么它们也将被拉入您的会话中。 You need to go over your application objects with a fine tooth comb to weed out any references to any of the objects mentioned in that printout, especially if they're not other app objects of yours. 您需要使用细齿梳检查您的应用程序对象,以清除对该打印输出中提到的任何对象的任何引用,尤其是如果它们不是您的其他应用程序对象时。 It may be feasible to mark such references (fields) as transient rather than getting rid of them outright, but I'm not sure if that will have the desired effect. 将此类引用(字段)标记为transient而不是完全消除它们可能是可行的,但是我不确定这是否会达到预期的效果。

Just to make things a little more clear: MessAdmin mentions a bunch of big objects, but some of those are probably your app objects and themselves not very big, were it not for the fact that they access something else that is not an app object and is big. 为了使事情更清楚一点:MessAdmin提到了一堆大对象,但是其中一些可能是您的应用程序对象,它们本身不是很大,不是因为它们访问的不是应用程序对象,而是大。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM