Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 44727 invoked from network); 23 Aug 2010 14:11:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Aug 2010 14:11:48 -0000 Received: (qmail 79107 invoked by uid 500); 23 Aug 2010 14:11:44 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 78191 invoked by uid 500); 23 Aug 2010 14:11:42 -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 78182 invoked by uid 99); 23 Aug 2010 14:11:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 14:11:41 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of wesley.acheson@gmail.com designates 209.85.161.173 as permitted sender) Received: from [209.85.161.173] (HELO mail-gx0-f173.google.com) (209.85.161.173) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Aug 2010 14:11:34 +0000 Received: by gxk5 with SMTP id 5so2595795gxk.18 for ; Mon, 23 Aug 2010 07:11:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=kWFvhxOReOD4hsV4wqUV98koxJoA+CSOt5tZguYfLeY=; b=KId3biacZ5iXkhoruSHnbVBmUJqnxT6wkwvNTwqI5Z03MVbnfv8X4Ks3NzDkMsDHv5 cvbE4SFv8U5t06o9ri6LvwJib6AJdoLv4BUhB3WvU/B84LWOYsGKlLje2tsvhkUJ/F+9 Luy7o5Ba+2gAqHmFMMy9eke4XzVdXrrZvsdMY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=hzf/QLvhXvLMOtH/f4cQcutJs0eByh22e5ZJRJTqZX5UAqh7an6geBW2LpTVAs+MPY h89vWhkQVITEV2sO7l/u2Kuq5IJqNUqCrrwROP8NRekGSsC6K5HGbLa9q4IsLuNWGUjs 1ff4cilpzobbm628r8AvNug8LCV70zSpwqbCI= MIME-Version: 1.0 Received: by 10.100.210.6 with SMTP id i6mr5438918ang.143.1282572674200; Mon, 23 Aug 2010 07:11:14 -0700 (PDT) Received: by 10.231.151.206 with HTTP; Mon, 23 Aug 2010 07:11:14 -0700 (PDT) Date: Mon, 23 Aug 2010 16:11:14 +0200 Message-ID: Subject: How to spwan child processes. From: Wesley Acheson To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Hi, As far as I'm aware your not supposed to extend Thread in JEE. I've seen similar questions on Stack Overflow where it was suggested you may use your containers Thread pool. This sounds like a terrible idea for portability. So take the following example. 1 A request for something specific is made to tomcat. That specific request needs to two actions. 2 Process the users request. 3 Notify another application over http Now If the notification fails in step 3 the users request still needs to process and not to error so we would like to send the notification as a background task. This is pretty easy with Threads but we shouldn't extend Thread according to the specifications. Questions: 1 Should this be delegated to the container? 2 If it should be delegated to the container how would I/we achieve this in tomcat 6. 3 If it shouldn't be delegated to the container where should I ask how to achieve a background task, because it isn't a tomcat question. (Disclaimer: If you really want to give me the answer I won't mind :P ) Regards, Wesley --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org