views:

251

answers:

1

Hi all,

I'm running into problems with the size of my Sessions with my Web Application that is based on the Jboss Seam Framework. 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). 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. I'm hoping that someone with more experience with this tool will be able to point me in the right direction.

Thanks,

Damian.

Here's the output:

alt text

alt text

A: 

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.

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.

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.

Carl Smotricz
Thanks for the prompt reply (and slightly scary avatar - "here's johnny!") - Sorry I need to expand on the data. See new PNG. The total session size is about 50MB but several objects are reporting that they are of this size. It's something to do with the Seam conversation and I don't have any object anywhere near this size.
Damo
I saw that! But I don't think there's anything in that session that you did not yourself put there (you could experiment on this if you like). What I'm saying is that (at least) one of the objects you put in the session has a reference to some very large object you didn't intend to put in there.
Carl Smotricz
EntityManager and AjaxStateHolder look like likely candidates for being referred to without good reason in your objects.
Carl Smotricz
I've run some further tests and determined that it's the entityManager. See results in Seam forum : http://www.seamframework.org/Community/SeamAndHttpSessionSize. Still no idea what's causing it though.
Damo
Alas, I don't know enough about Seam to help you there. Sorry and good luck!
Carl Smotricz