You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Ronald Klop <ro...@base.nl> on 2003/02/18 12:45:11 UTC

Users get wrong session after reload.

Hello,

We are using Tomcat 4.1.18 here.
If we reload our application, sometimes a user gets a session of 
somebody else. Big problem.

I think the problem is here:
In ...catalina.session.JDBCStore.java, line 507, there is this code.

             preparedLoadSql.setString(1, id);
             rst = preparedLoadSql.executeQuery();

Is this thread safe?
Isn't this better?

         synchronized(preparedLoadSql) {
             preparedLoadSql.setString(1, id);
             rst = preparedLoadSql.executeQuery();
         }

Any suggestions?
If this isn't the cause of the problem, what can be the cause?
Because it's a race condition it's difficault to debug.

Greetings,

Ronald.



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org