ashishanand
asked on
Session mixup problem
Hi,
We are facing a strange problem with one of application running on JBoss 4.0.4 GA (with Apache Tomcat 5.5.17) and Oracle XE (10.2.0.1) .
There are several uses who have logged into the system. Let's say user "A" and "B" also have logged into the system (on different machines).
User A creates a record and saves it into the database.
When the saved record is checked it shows "B" as the creator of document instead of "A".
This happens sometimes and we are unable to reproduce the problem. The only thing we suspect is that the user "A" session is overwritten when user "B" logs into the system.
Please note, the above problem is not specifically with user "A" and "B", it has happened between other users also. I've used "A" and "B" to quote an example.
Any idea what could be the problem.
Regards,
We are facing a strange problem with one of application running on JBoss 4.0.4 GA (with Apache Tomcat 5.5.17) and Oracle XE (10.2.0.1) .
There are several uses who have logged into the system. Let's say user "A" and "B" also have logged into the system (on different machines).
User A creates a record and saves it into the database.
When the saved record is checked it shows "B" as the creator of document instead of "A".
This happens sometimes and we are unable to reproduce the problem. The only thing we suspect is that the user "A" session is overwritten when user "B" logs into the system.
Please note, the above problem is not specifically with user "A" and "B", it has happened between other users also. I've used "A" and "B" to quote an example.
Any idea what could be the problem.
Regards,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Your pointer towards static definition help to resolve the problem.
ASKER
I finally found the problem & solution. The problem was that the HttpSession variable was defined at the class level (i.e. global). This was causing user A's session to be overwritten by user B's session.
I changed this and defined them in each of the methods inside the servlet class.
Thanks successcraft for your comments. Static definition was also another problem.
Regards,
Anand