tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Zoerner <>
Subject Implementing and adding an arbitrary component to Apache Tomcat 6.0
Date Sat, 19 Sep 2009 10:39:56 GMT
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 ("<Listener />"). 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?

Thanks in advance + Greetings from Hamburg,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message