Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 07A21664D for ; Tue, 7 Jun 2011 16:38:57 +0000 (UTC) Received: (qmail 3285 invoked by uid 500); 7 Jun 2011 16:38:53 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 3228 invoked by uid 500); 7 Jun 2011 16:38:53 -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 3215 invoked by uid 99); 7 Jun 2011 16:38:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 16:38:53 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [155.52.251.71] (HELO phsmgmx12.partners.org) (155.52.251.71) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Jun 2011 16:38:46 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtQDAFZT7k2bNC9AgWdsb2JhbABShEqhVRQBARYmJbldiCGIdIErg2yBCgSRCoRMgwqICw Received: from pascal.dfci.harvard.edu ([155.52.47.64]) by phsmgmx12-out.partners.org with ESMTP; 07 Jun 2011 12:38:24 -0400 Received: from [155.52.5.78] (fstrf-lenovo-27.dfci.harvard.edu [155.52.5.78]) by pascal.dfci.harvard.edu (Postfix) with ESMTP id F0E214CC5C; Tue, 7 Jun 2011 12:38:24 -0400 (EDT) Message-ID: <4DEE5400.8010906@jimmy.harvard.edu> Date: Tue, 07 Jun 2011 12:38:24 -0400 From: Seth Lenzi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Tomcat Users List Cc: markt@apache.org Subject: Re: Asynchronous servlets + Tomcat + mod_jk References: <4DED3B8C.3040206@jimmy.harvard.edu> <4DED3D5B.9010909@ice-sa.com> <4DED416D.9010609@jimmy.harvard.edu> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit I got the asynch servlet working with Apache and mod_jk. The issue turned out to not be with mod_jk. I was deploying to a clustered environment with two tomcats that were set up to do session replication. I installed a third lone tomcat, linked it to apache with mod_jk, and it worked perfectly. So now I guess my question is somewhat vague, but how would I go about getting asynchronous servlets to work with clustering enabled? The isAsyncSupported() method of the request object returns false in my cluster setup... I've included the cluster element from my server.xml file. I have this between the element. -S On 6/6/2011 5:21 PM, markt@apache.org wrote: > Seth Lenzi wrote: > >> >> I'm using Tomcat v7.0.14, Apache v2.2.17, and mod_jk v1.2.30. >> >> The Servlet I have does not implement CometProcessor. It's just a >> regular HttpServlet which creates an AsyncContext from the >> HttpServletRequest object. Like the example Servlet at this page, >> http://developerlife.com/tutorials/?p=1437 >> >> It does work nicely when accessed directly from Tomcat on port 8080... >> Only throws the IllegalStateExeception when going through Apache + >> mod_jk. I'm using the default HTTP connector, no NIO API... Since it >> was >> working through Tomcat I figured I didn't need the NIO HTTP connector. >> >> Thanks for your reply. >> >> -S >> >> >> On 6/6/2011 4:49 PM, André Warnier wrote: >>> Seth Lenzi wrote: >>>> Anyone here have any experience with asynchronous servlets under a >>>> Tomcat that's linked to Apache via mod_jk? I have an asynchronous >>>> servlet that's working nicely when accessed directly from Tomcat, >> but, >>>> when I access it by going through Apache and mod_jk the >>>> ServletRequest.startAsync() function call throws an >>>> IllegalStateException saying the feature is not supported. >>>> >>> You do not give a clue about which version of Tomcat you are using, >> but >>> this may provide an explanation : >>> http://tomcat.apache.org/tomcat-7.0-doc/aio.html > Tomcat 7 has passed the Servlet TCK with all possible combinations of protocol (HTTP, AJP), connector implementation (BIO, NIO, APR) and httpd module (mod_jk, mod_proxy_http, mod_proxy_ajp). > > Asynchronous servlets work in all combinations. > > The best thing to do is create the simplest possible test case (ie a single Servlet) that demonstrates this issue and attach it to a bugzilla issue. > > Mark > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org