tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49986] New: Double-check locking. Possible data-race in JspServletWrapper
Date Thu, 23 Sep 2010 13:31:07 GMT

           Summary: Double-check locking. Possible data-race in
           Product: Tomcat 6
           Version: 6.0.29
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper


Common anti-pattern: Double checked locking. I don't know is this race
dangerous or no.

Race on private boolean reload

public Servlet getServlet()
        throws ServletException, IOException, FileNotFoundException
        if (reload) {
            synchronized (this) {
                // Synchronizing on jsw enables simultaneous loading
                // of different pages, but not the same page.
                if (reload) {
                    // This is to maintain the original protocol.


                    theServlet = servlet;
                    reload = false;
        return theServlet;

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message