Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 53729 invoked from network); 9 Feb 2010 12:12:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Feb 2010 12:12:13 -0000 Received: (qmail 1041 invoked by uid 500); 9 Feb 2010 12:12:09 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 924 invoked by uid 500); 9 Feb 2010 12:12:09 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 913 invoked by uid 99); 9 Feb 2010 12:12:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2010 12:12:08 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aksonkar@gmail.com designates 209.85.223.202 as permitted sender) Received: from [209.85.223.202] (HELO mail-iw0-f202.google.com) (209.85.223.202) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2010 12:12:02 +0000 Received: by iwn40 with SMTP id 40so1980649iwn.2 for ; Tue, 09 Feb 2010 04:11:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=Ubp+bVYAe8ZHMUCLL1fYiUAXlhX4RHrDlLmrqo5pcMI=; b=Q/4tDB2gT9kG5Gzy7+WretnHIdDLm3ePsaSb+hNthRetPiLT9RZZc1bV18tc1ZnJLU y90L1QdbypDOwe3zEJfNdSvsC6MJWHbQdBKyuPda9UkhX6ZenHqlj05AV/jN2HTQvcFU TfQ/XhJnPVslfHgJf+CClZ8lCxQNqmcpKJjLs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ih64rrIdFAzT1RSp9iEB8VUyrEuTs3ZXqzCQPGX36ISvjMffSJ5DVjFX/5seXeKMMi Fm9y393Oo1Afq3FcY4G/mvZ+gF2jsHgoxAh02u6+ENZz524mZyN2WM1I6uFm6JjsL7gI iuauW7gk0E0yk3uyOpUJD+SQybOzV4KiewRAY= MIME-Version: 1.0 Received: by 10.231.145.206 with SMTP id e14mr609933ibv.10.1265717500975; Tue, 09 Feb 2010 04:11:40 -0800 (PST) Date: Tue, 9 Feb 2010 17:41:40 +0530 Message-ID: <2c5e80a51002090411g1d7f2daeg611ec59399b09f0d@mail.gmail.com> Subject: Comet explicit event close From: Animesh Sonkar To: users@tomcat.apache.org Content-Type: multipart/alternative; boundary=0016e6476656081b36047f29d246 --0016e6476656081b36047f29d246 Content-Type: text/plain; charset=ISO-8859-1 Hi, I am Using a Socket client to send a http request to sever and then waits to read response from the socket inputstream.. 1. I have a comet servlet. On its read event it starts a new thread passing the request and response object. 2.The read event code block then returns. 3. The thread started in the read event starts writing the responses in the response stream. PrintWriter writer =response.getWriter(); writer.write("asynresponse"); 4. after writing say 5 responses i want to just close the request and response (not the socket which sent the request) Sending header Connection:close closes the Socket How do i do this? Since i cannot trigger the Comet servlet END event explicitly, where/how can I call event.close(); I tried passing the event object from the read event to the thread and called event.close in the thread. But an exception was thrown saying event object is no longer associated with the request and response. Thanks, Animesh P.S: BTW Kudos to the forum. Is is so alive. have been sending queries since some days and got replies. Also just to let u know i have a business problem where a http request and response are to be served using comet asyncronously on the same socket connection. So i have a single socket client which wants to send http request again and again (pipeline) and waits for a asyn response from the comet server. trying a POC for the same. Any ideas for concrete pipelining clients would be greatly appreciated. Thanks, Animesh --0016e6476656081b36047f29d246--