tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 7681] - Tomcat does not work properly in multithread environment
Date Wed, 03 Apr 2002 06:46:14 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7681>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7681

Tomcat does not work properly in multithread environment





------- Additional Comments From marcin_ol@poczta.onet.pl  2002-04-03 06:46 -------
Of course, I agree. 
But it is not the case: my bean is a session bean, so the object should be 
created only once per user session, while now, its constructor often gets 
called twice per one user session (two objects are created, and the second one 
replaces the first one in session object. 
That means, any state preserved by a page in first frame will then be discarded 
by a second frame, that also created such object. Synchronization won't help 
unless I made all bean methods static synchronized, but then I won't need any 
bean. (Actually, I do have my methods synchronized; but I see no reason why 
session beans should be created more than once per user session). 

Also, as I said, in generated servlet there is a "synchronized (session)" 
block - and session object is always different (see 
HttpRequestFacade.getSession method - it always created a new 
StandardSessionFacade), so there is no use to make that block synchronized, and 
synchronization pays significant role in performance decrease...

I'm leaving the state of this bug as it is - if You accept the explanation, 
please reopen it.

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


Mime
View raw message