| To: | <lei.han@xxxxxxxxxxxxx>, <tom.rose@xxxxxxxxxxxx> |
|---|---|
| Subject: | RE: [cinjug-users] How much data can session store? |
| From: | "Mascolino, Mark R." <mark.mascolino@xxxxxx> |
| Date: | Wed, 2 Nov 2005 09:54:37 -0600 |
| Cc: | <users@xxxxxxxxxx> |
| Delivered-to: | mailing list users@cinjug.org |
| Mailing-list: | contact users-help@cinjug.org; run by ezmlm |
| Thread-index: | AcXftWBPHrxibeDuRnS51Apa3qd4PQAD0NAw |
| Thread-topic: | [cinjug-users] How much data can session store? |
|
I believe if you read the Servlet specs it makes no
restrictions on the size of things that can be placed in the HTTP Session
object.
I echo everyone's prior comments about Session watchouts
and I'll add a few. Be careful of using Session information in load
balanced scenarios. If you aren't using some form of "sticky" sessions,
you can run into problems where your cached data isn't available like you think
it should be.
Also, due to the stateless nature of the web, you need to
think long and hard about assuming that something is going to be in the
session. You need to strongly consider writing code that checks the
session for information and falls back on recreating the data if it wasn't found
in the session.
Thirdly, delete items from the session as soon as
possible, you don't want things sticking around that might effect behavior
on other screens. I saw this recently on a site that stored the result set
page number in the session. If you were on page 5 of the search results
and then back buttoned to the search screen, then ran a search that resulted in
only 1 page of results, it would error out because there wasn't that many result
pages available. In short, don't do stuff like this.
m
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: [cinjug-users] How much data can session store?, lei . han |
|---|---|
| Next by Date: | .NET training for Java developers?, Herbers, Joe |
| Previous by Thread: | RE: [cinjug-users] How much data can session store?, Amol Deshmukh |
| Next by Thread: | .NET training for Java developers?, Herbers, Joe |
| Indexes: | [Date] [Thread] [Top] [All Lists] |