Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 72646 invoked from network); 19 Sep 2009 10:55:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 19 Sep 2009 10:55:54 -0000 Received: (qmail 63422 invoked by uid 500); 19 Sep 2009 10:55:51 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 63339 invoked by uid 500); 19 Sep 2009 10:55:50 -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 63328 invoked by uid 99); 19 Sep 2009 10:55:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Sep 2009 10:55:50 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [81.169.146.162] (HELO mo-p00-ob.rzone.de) (81.169.146.162) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Sep 2009 10:55:38 +0000 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1253357718; l=5474; s=domk; d=labeo.de; h=Content-Type:Subject:To:MIME-Version:From:Date:X-RZG-CLASS-ID: X-RZG-AUTH; bh=iQGMlSJVAoH78lwZ7drBZDcQzsY=; b=C90eyoQJUYUxaQdv3zaRV6m4FtsxRUXB0wfHJmlbOIGbtMPmhXHa1FVVHAg45kb0Kay zzdLoLRcTh4M6q8HkJ8x2lInvh5zyKEgdWfLd0eAk/t6ctqI6VzIRQun2l0Wt3PlUubPc OC7L8bJafmifz5xML8y1RntVCMiVxs3+yIc= X-RZG-AUTH: :P3gBc0GmW/MphhhpU4BSj2bmx/Zwgz97J2mNwJqPPEL+U9r/pmo3xem0XcjQ X-RZG-CLASS-ID: mo00 Received: from [127.0.0.1] (p5DC6D9CE.dip.t-dialin.net [93.198.217.206]) by post.strato.de (mrclete mo10) (RZmta 21.0) with ESMTP id 907033l8JANrkM for ; Sat, 19 Sep 2009 12:55:18 +0200 (MEST) Message-ID: <4AB4B897.70906@labeo.de> Date: Sat, 19 Sep 2009 12:55:19 +0200 From: Stefan Zoerner User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: users@tomcat.apache.org Subject: [Fwd: Re: Implementing and adding an arbitrary component to Apache Tomcat 6.0] Content-Type: multipart/mixed; boundary="------------010001070207020302040201" X-Virus-Checked: Checked by ClamAV on apache.org --------------010001070207020302040201 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thanks Mark. I forward it to the users list. Greetings from Hamburg, Stefan --------------010001070207020302040201 Content-Type: message/rfc822; name="Re: Implementing and adding an arbitrary component to Apache Tomcat 6.0.eml" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename*0="Re: Implementing and adding an arbitrary component to Apache"; filename*1=" Tomcat 6.0.eml" X-Account-Key: account2 X-Mozilla-Keys: X-Envelope-From: X-Envelope-To: X-Delivery-Time: 1253357347 X-UID: 86775 Return-Path: X-RZG-CLASS-ID: mi Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mailin.webmailer.de (bertie mi21) (RZmta 21.0) with SMTP id p03261l8JAbDMy for ; Sat, 19 Sep 2009 12:49:06 +0200 (MEST) Received: (qmail 61210 invoked by uid 500); 19 Sep 2009 10:49:05 -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 61199 invoked by uid 99); 19 Sep 2009 10:49:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Sep 2009 10:49:05 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [193.252.22.151] (HELO smtp6.freeserve.com) (193.252.22.151) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Sep 2009 10:48:55 +0000 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3509.me.freeserve.com (SMTP Server) with ESMTP id A247A7000083 for ; Sat, 19 Sep 2009 12:48:32 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3509.me.freeserve.com (SMTP Server) with ESMTP id 956697000085 for ; Sat, 19 Sep 2009 12:48:32 +0200 (CEST) Received: from mx01.dev.local (unknown [91.109.130.132]) by mwinf3509.me.freeserve.com (SMTP Server) with ESMTP id 700397000083 for ; Sat, 19 Sep 2009 12:48:32 +0200 (CEST) X-ME-UUID: 20090919104832458.700397000083@mwinf3509.me.freeserve.com Received: from localhost (localhost [127.0.0.1]) by mx01.dev.local (Postfix) with ESMTP id D3C5B32164 for ; Sat, 19 Sep 2009 11:48:33 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at homeinbox.net Received: from mx01.dev.local ([127.0.0.1]) by localhost (mx01.dev.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9lEt5TEwQQvJ for ; Sat, 19 Sep 2009 11:48:28 +0100 (BST) Received: from [192.168.0.9] (study03.dev.local [192.168.0.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.dev.local (Postfix) with ESMTPSA id EE8EA3215C for ; Sat, 19 Sep 2009 11:48:27 +0100 (BST) Message-ID: <4AB4B6E8.7050309@apache.org> Date: Sat, 19 Sep 2009 11:48:08 +0100 From: Mark Thomas User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: Implementing and adding an arbitrary component to Apache Tomcat 6.0 References: <4AB4B4FC.6040400@labeo.de> In-Reply-To: <4AB4B4FC.6040400@labeo.de> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Stefan Zoerner wrote: > Hi all, > > I try to figure out what the best way for an arbitrary extension to > tomcat would be. If I implement my own realm, valve etc., there are > specific interfaces with corresponding life cycles. But how about > extension which are not standard components? > > If I have a class which implements org.apache.catalina.Lifecycle, it has > nice methods for starting and stopping. But I see no chance to add such > a general thing in the server.xml. Or do I miss something? > > An idea that works is implementing LifecycleListener, which can easily > be added to server.xml on many places (""). If I add it on > server level for instance, I get events if the server starts, stops etc. > and can react. But I have to call my life cycle methods (e.g. start and > stop from the Lifecycle interface) on my own. > > Is there any generic way to implement a custom component, which has a > lifecyle, and can easily be added to the configuration? It might seem odd but since you are using Tomcat rather than changing the source code, this question belongs on the users list. The dev list is solely for the development *of* tomcat. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org --------------010001070207020302040201 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org --------------010001070207020302040201--