views:

86

answers:

3

We have a web-based application with tech stack - 1. Java Struts based 2. Hibernate 3. DB - Oracle 4. App server - JBoss server

We are facing an issue related to concurrent usage of the application by two or more users. When I am doing an operation and I submit the changes, the next page or success message that comes up is of a different operation that another user is performing at the same time.

Users are logged in as different users and so are using different sessions.

We have no clue of where the problem is, so I am not sure what other details I can provide.

Has anyone else faced such an issue or any pointers?

A: 

I am not familiar with specific libraries you are using, but let me try.

How stateless are your application code? Do you have any sort of global state like singleton with member fields? If the service is stateful and are using singleton, you could have such mixups.

eed3si9n
+1  A: 

Are you using application context instead of session context? Moreover, as Eed3si9n said, beware of Singletons, that might be causing this.

"In addition check for the use of static fields. One app I was brought in to fix used a static string for error message. As soon as any user received an error they all did. Worked fine until there wasmore than one concurrent user." – Michael Rutherfurd (posted it as a comment)

Adeel Ansari
In addition check for the use of static fields. One app I was brought in to fix used a static string for error message. As soon as any user received an error they all did. Worked fine until there wasmore than one concurrent user.
Michael Rutherfurd
A sad story. You don't want me get started over fixing those kinda codes.
Adeel Ansari
Please allow me, Michael, to include your comment in my post. Folks don't go for comments sometimes.
Adeel Ansari
A: 

Check if the form is defined as application scope and the message you showing on the screen is coming from that form.

Bhushan