Session data getting corrupted.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shiv

    Session data getting corrupted.

    I have a servlet driven web application using ServletExec 4.2 AS, IIS
    4.0 as the platform. Some user data is stored is persisted in a user
    object at the beginning of the session which includes use rid, client id
    etc.

    There have been intermittent problems with the application, when for a
    split second, one user suddenly gets somebody elses data like name
    etc. As soon as the user refreshes the page the problem goes away.

    Initially we concluded that the sessions may be getting swapped,
    however on debugging we found that no such thing is happening and the
    session ids never get crossed. Our other approach was not to store
    anything in the user object associated with each session, rather get
    such information every time from data base(this may have a performance
    impact).

    Is it true that when a servlet is called the first time, the same
    instance services all other requests for the servlet?? i.e. at any
    given time there is one and only one instance of certain servlet
    running in the servlet container
    If the above is true, is it possible that the same servlet instance is
    swapping data from the user objects associated with different
    sessions??.
    How does the servlet resolve the context in a single threaded model??

    Can anybody shed light on any similar experience and possible
    resolutions of the same..

    Shiv
Working...