Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Does calling session.invalidate() also removes all the session attriutes?

843842Oct 21 2008 — edited Oct 22 2008
Hi,

I want to know whether calling session.invalidate() also removes any objects in the session attributes.or we have to explicitly remove objects from the attributes.

I want to know this because my application is having some memory related problems. In my application when a user logs in we put many String objects int the session using session.setAttribute.
Now when the user logs out we call session.invalidate() .
Will these String objects occupy memory (i.e. will they be garbage collected ) after I call session.invalidate() ?
or
I have to explicitly remove all the session attributes programmatically?

Any assistance would be of great help.

Thanks & Regards,
Nirmal
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 19 2008
Added on Oct 21 2008
9 comments
1,171 views