Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 67246 invoked from network); 23 Apr 2007 21:52:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Apr 2007 21:52:31 -0000 Received: (qmail 91342 invoked by uid 500); 23 Apr 2007 21:52:33 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 91305 invoked by uid 500); 23 Apr 2007 21:52:33 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 91294 invoked by uid 500); 23 Apr 2007 21:52:33 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 91291 invoked by uid 99); 23 Apr 2007 21:52:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Apr 2007 14:52:33 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Apr 2007 14:52:26 -0700 Received: by brutus.apache.org (Postfix, from userid 33) id DDBB571404A; Mon, 23 Apr 2007 14:52:05 -0700 (PDT) From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 42198] - Insufficient synchronization for CometEvent.close In-Reply-To: X-Bugzilla-Reason: AssignedTo Message-Id: <20070423215205.DDBB571404A@brutus.apache.org> Date: Mon, 23 Apr 2007 14:52:05 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . 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=42198 matthias.reich@siemens.com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20017|0 |1 is obsolete| | ------- Additional Comments From matthias.reich@siemens.com 2007-04-23 14:52 ------- Created an attachment (id=20025) --> (http://issues.apache.org/bugzilla/attachment.cgi?id=20025&action=view) Corrected version of comettest.war You are right - it is not a bug! I synchronized access to the output stream by synchronizing on the event object, and the synchronization problem is solved - Thank you for your quick comment. Synchronization on the CometEvent object works fine with the current implementation which reuses the same CometEventImpl instance throughout the lifetime of a request, but is this part of the contract between container and the Servlet? I would not like the idea of synchronizing write operations on lots of connections with the help of a single synchronizer object like the example ChatServlet does. An alternative would be to synchronize on the HttpServletResponse object. What do you recommend? As I understood your comment, event.close and outputStream.close are not intended to be coupled as close as they are in the current implementation. Thus, would it be the recommended use of the Comet interface if the response provider thread closes only the stream but not the event, so that the Servlet's event method will be triggered with an END event, and the event method can close the event? Will a close of the event be required in case of an END event (e.g. to enable recycling of request and response) or is it optional? -- 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: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org