473,386 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
Jul 17 '05 #1
2 3897
sh*************@db.com (Shiv) wrote in message news:<68*************************@posting.google.c om>...
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


As a quick idea, I suspect that your HttpSession objects and/or
request related data are not synchronized, or, your servlet implements
SingleThreadModel ...
Jul 17 '05 #2
sh*************@db.com (Shiv) wrote in message news:<68*************************@posting.google.c om>...
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


As a quick idea, I suspect that your HttpSession objects and/or
request related data are not synchronized, or, your servlet implements
SingleThreadModel ...
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
0
by: Shiv | last post by:
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...
14
by: Darrin J Olson | last post by:
I am trying to end a session for a site without having to completely close the browser to end it. When I access the site and log in it works fine. If I log out and in with a different account...
0
by: news.paradise.net.nz | last post by:
My database appears to be a little corrupted, so far it's running along 99% ok, but i am getting some strange results. Primarily i can't back it up because of the following error. Similar errors...
2
by: John Mullin | last post by:
We are having a problem which appears similar to a previous posting: http://groups.google.com/groups?hl=en&lr=&frame=right&th=d97f552e10f8c94c&seekm=OZw33z9EDHA.2312%40TK2MSFTNGP10.phx.gbl#link1 ...
8
by: Leon | last post by:
I know that I can access session state on an asp.net page using Page objects, but how do I access store data in sessionstate from the middle tiers?
2
by: DC | last post by:
Hi, we are using ASP.Net 1.1 on eight servers with one session state server (the windows 2003 service). Too often we are getting the exception "Unable to make the session state request to the...
0
by: =?Utf-8?B?bGY=?= | last post by:
Hi, we are in the process of converting an existing web application to VS 2005 and 2.0 framework. We are getting errors that indicate there is a problem with session state: "The session state...
9
by: Big Daddy | last post by:
We have a problem where the session is getting abandoned for no apparent reason. It's not timing out. We save some important data in the Session object. The user will click on something, causing a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.