DO NOT REPLY [Bug 41706] - StandardWrapper uses double-checked locking
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=41706. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=41706 --- Additional Comments From [EMAIL PROTECTED] 2007-02-27 00:48 --- (In reply to comment #2) Any particular reason not to address this? The reason is that it is extremely unlikely there will ever be a problem, and OTOH the lock would be pretty heavily contested (so high cost, with no gain). For example, all requests for JSPs would sync on that single lock, simply to ensure that no request - right after the server was initialized - ever used a second instance of the servlet (as far as I can tell). -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 41706] - StandardWrapper uses double-checked locking
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=41706. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=41706 [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX --- Additional Comments From [EMAIL PROTECTED] 2007-02-26 10:23 --- Thanks. This is obviously not going to be addressed, however. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 41706] - StandardWrapper uses double-checked locking
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=41706. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=41706 --- Additional Comments From [EMAIL PROTECTED] 2007-02-26 11:56 --- Any particular reason not to address this? I realize that the Tomcat devs are very sensitive about performance issues, but in this case (actually, all cases) the use of DCL doesn't guarantee correct operation. For instance, instance could be non-null but also not initialized. Perhaps nobody ever sees this in the wild. I haven't had an actual problem, but noticed the use of the DCL anti-pattern while reading the source for other reasons. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DO NOT REPLY [Bug 41706] - StandardWrapper uses double-checked locking
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://issues.apache.org/bugzilla/show_bug.cgi?id=41706. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=41706 --- Additional Comments From [EMAIL PROTECTED] 2007-02-26 12:20 --- Oh, wait. I'm sorry. I think that since this piece of code calls a method to instantiate and initialize the instance member, it turns out that this is actually NOT a bug. You can even avoid the synchronized block, since the loadServlet method itself is synchronized, and uses only local variables. My recommendation would be to document the code to mention DCL and why it's still safe to do in this case, remove the synchronization within the allocate() method, or both. This code will be functionally the same as the existing code: // Load and initialize our instance if necessary if (instance == null) { try { if (log.isDebugEnabled()) log.debug(Allocating non-STM instance); instance = loadServlet(); } catch (ServletException e) { throw e; } catch (Throwable e) { throw new ServletException (sm.getString(standardWrapper.allocate), e); } } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug, or are watching the assignee. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]