Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 65498 invoked from network); 28 Jul 2003 13:25:20 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 28 Jul 2003 13:25:20 -0000 Received: (qmail 22646 invoked by uid 97); 28 Jul 2003 13:27:56 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 22639 invoked from network); 28 Jul 2003 13:27:56 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 28 Jul 2003 13:27:56 -0000 Received: (qmail 64059 invoked by uid 500); 28 Jul 2003 13:25:00 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 64036 invoked from network); 28 Jul 2003 13:24:59 -0000 Received: from unknown (HELO warhawk.mpi.com) (63.244.250.133) by daedalus.apache.org with SMTP; 28 Jul 2003 13:24:59 -0000 Received: from lightning.mpi.com (lightning.mpi.com [63.244.252.11]) by warhawk.mpi.com (Switch-2.2.6/Switch-2.2.6) with ESMTP id h6SDOC024286 for ; Mon, 28 Jul 2003 09:24:12 -0400 (EDT) Received: from US-VS1.corp.mpi.com ([63.244.252.30]) by lightning.mpi.com (Switch-3.0.4/Switch-3.0.0) with ESMTP id h6SDOQ6W021652 for ; Mon, 28 Jul 2003 09:24:56 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [Q] Is it safe to create threads in Tomcat web-apps? Date: Mon, 28 Jul 2003 09:24:33 -0400 Message-ID: <9C5166762F311146951505C6790A9CF8A6E8E4@US-VS1.corp.mpi.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Q] Is it safe to create threads in Tomcat web-apps? Thread-Index: AcNVBwjoRPbSRKKAQuqGkarCCqo07gABEx0Q From: "Shapira, Yoav" To: "Tomcat Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Howdy, >I cannot see why creating a daemon thread cannot cater >for this. You just start the thread in the init method >of the InitServlet (or any servlet you create with >start-when-app-starts). I'm actually a fan of the background daemon-thread approach, and think= the user-threading limitations in full J2EE containers is unfortunate (although I know where it comes from). Be careful about starting and stopping threads in the init/destroy methods of servlets, however, as the container can create/destroy your= servlets (including load-on-startup servlets) almost whenever it wants= to. Consider using a context listener instead. Yoav Shapira This e-mail, including any attachments, is a confidential business com= munication, and may contain information that is confidential, propriet= ary and/or privileged. This e-mail is intended only for the individua= l(s) to whom it is addressed, and may not be saved, copied, printed, d= isclosed or used by anyone else. If you are not the(an) intended reci= pient, please immediately delete this e-mail from your computer system= and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org