In StandardWrapper.java lines 651 through 664 of Tomcat 4.0.4, the double-check locking idiom is used to avoid synchronization.
The double-check locking idiom does not work reliably in Java. For reasons why, see: http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html The result of using the current code is that requests can be processed (the servlet's service method can be called) before the servlet's init method has completed and/or before values written in init are visible to other threads that are running the service method. To fix, take out the outermost "if" statement. That is, remove "if (instance == null) { ... }" but keep the code inside the "if" statement as is. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>