Edmund Lian wrote: > Geoff wrote: > > >>Love, Jay wrote: > > You need to store the sessions in an SQL server. > > I think there is an SQL sessionstore already written. If > > not, it wouldn't > > be difficult at all. > > You can run into trouble if 2 servlets are executing > simultaneously. If > they both make changes to the session, one of the servlets > changes will get > overwritten by the other servlet's changes. This may or may not be a > problem for your application, depending on exactly how you make use of > sessions, but you need to be aware of the possibility. > > The same problem can happen with SessionFileStore even on a > single machine. > << > > > Just have each servlet lock the row(s) atomically when needed, and the > problem will go away. > > ...Edmund. >
But it seems to me that in general, you'd have to lock the row for the entire duration of the servlet's processing. What if a user accesses a servlet that takes 20 seconds to process, then in a different window or frame tries to access a servlet that only takes 1/10 of a second to process? That first servlet will still be processing, and the second servlet will be locked out for another 20 seconds. In other words, you'd have to serialize the requests for a particular session, which is NOT the case if sessions are stored in memory. Maybe I'm missing something. Does anyone have experience with other clustered app servers that have a central session store? How do they handle concurrent access to the same session? - Geoff _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
