tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Evans <...@webtrak.co.uk>
Subject Re: Thread worries
Date Tue, 12 Sep 2000 12:38:51 GMT
Also all the code which uses any of the DateFormat objects in

     ./src/share/org/apache/tomcat/util/DateTool.java

Such as formatDate and parseDate in 

    ./src/share/org/apache/tomcat/util/MimeHeaderField.java

Richard

 > Hi there !
 > 
 > From a quick overview on the source the following sources might be 
 > affected by the 'SimpleDateFormat not thread safe' problem.
 > 
 > Neither of them explicitly syncronizes calls to SimpleDateFormat.format() 
 > or SimpleDateFormat.parse()
 > 
 > ./src/share/org/apache/tomcat/util/FastDateFormat.java
 > ./src/share/org/apache/tomcat/util/DateTool.java
 > ./src/share/org/apache/tomcat/request/StaticInterceptor.java
 > ./src/share/org/apache/tomcat/logging/Logger.java
 > 
 > ./proposals/catalina/src/share/org/apache/tomcat/util/FastDateFormat.java
 > ./proposals/catalina/src/share/org/apache/tomcat/servlets/DefaultServlet
 > .java
 > ./proposals/catalina/src/share/org/apache/tomcat/resources/DirectoryBean
 > .java
 > ./proposals/catalina/src/share/org/apache/tomcat/connector/HttpResponseB
 > ase.java
 > ./proposals/catalina/src/share/org/apache/tomcat/connector/HttpRequestBa
 > se.java
 > 
 > Bernd
 > 
 > >>>>>>>>>>>>>>>>>> Ursprüngliche
Nachricht <<<<<<<<<<<<<<<<<<
 > 
 > Am 12.09.00, 11:32:17, schrieb "Richard Evans" <rde@webtrak.co.uk> zum 
 > Thema Thread worries:
 > 
 > 
 > > I'm worried about multithreading issues in tomcat on loaded sites.  We've
 > > seen a problem in WebSphere 2 and I'm concerned the same issue may exist 
 > in
 > > tomcat.
 > 
 > > What happens is you get error 500s when a servlet is called a lot of 
 > times;
 > > looking at backtraces shows that exceptions are being thrown when 
 > formatting
 > > dates (for response headers presumably).  This is because 
 > SimpleDateFormat
 > > is _NOT_ thread safe (see bug 4228335 on the javasoft bug parade); here's
 > > part of a backtrace:
 > 
 > >  at java.text.SimpleDateFormat.format(Compiled Code)
 > >  at java.text.DateFormat.format(Compiled Code)
 > >  at sun.servlet.http.HttpDate.toString(Compiled Code)
 > >  at sun.servlet.http.MimeHeaderField.getValue(Compiled Code)
 > >  at sun.servlet.http.MimeHeaders.getHeader(Compiled Code)
 > 
 > > Now Tomcat has MimeHeaders and MimeHeaderField classes, perhaps derived 
 > from
 > > Sun's.
 > 
 > > Is it possible that tomcat could suffer from the same problems on a 
 > loaded
 > > site, or was this problem known about and a fix put in?
 > 
 > > Richard
 > 
 > 
 > > ---------------------------------------------------------------------
 > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
 > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
 > 
 > ---------------------------------------------------------------------
 > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
 > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
 > 
 > 

Mime
View raw message