> -----Original Message-----
> From: calandraca [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 08, 2004 10:04 AM
> To: Struts Users Mailing List
> Subject: strange random problem
> 
> 
> Since I have rewrited an important part of my application using struts
> I've had this problem several times. It didn't happen in development
> environment, with only one or two users using the application at the
> same time. It happends in production with 20 or 30 users.

<snip>

> 
> 
> The problem is that sometimes (about 10% more or less), once the
> object is updated, the next view shows data from another different
> object instance that is currently being managed by other user. The
> forward or the render fails. I thought about a possible coding or
> design error, but is it not impossible to access data from other
> session? moreover the object is stored into request. Am I using struts
> in a correct way? Could it be a taglibs or struts bug or configuration
> error? What do you think about trying struts 1.2.2 or using linux in
> production? I think probably is much more easy but I don't see it.

you have a multithreading issue, probably between your action class and the DAO 
classes.  I'm guessing that you're reading of other peoples data is occuring when two 
users are using the app at the exact same time, doing the exact same thing (with 
different data).  That should be easy to re-create.  This could be caused by:
1) You are using the same DAO class for all sessions.  Bad programmer, no caffeine.
2) You are using the same business object class for all sessions. Bad programmer, no 
caffeine.
3) Someting the DAO classes use is the same between sessions, that you are using to 
transfer data.  Bad Programmer, no caffeine.

I've found,  that most of the above is done to avoid a perceived performance hit.  It 
is never a good idea to code for performance before the codeing is done, ESPECIALLY on 
the web.  You usually end up creating a bottleneck, or end up in a multi-threading 
issue.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to