Mikhail Kryshen

UserConfig — event listener for Tomcat

Host lifecycle event listener for Apache Tomcat 6.0 to automatically deploy update and undeploy applications from user home directories.

This is a rewrite of org.apache.catalina.startup.UserConfig listener included in Tomcat which adds the following features:

Installation

Copy userconfig.jar to Tomcat lib directory. Add Listener to the Host element in the Tomcat configuration file (server.xml).

Listener that uses passwd database to list users:

<Listener className="kryshen.catalina.userconfig.PasswdUserConfig"/>

Listener that considers all home directories in the specified base directory:

<Listener className="kryshen.catalina.userconfig.HomesUserConfig"/>

Note: UserConfig starts all user applications at server startup. It may take more than 2 minutes to start 1000 applications from NFS on decent hardware.

Listener properties

Example

<Host name="localhost"  appBase="webapps"
      unpackWARs="true" autoDeploy="true"
      xmlValidation="false" xmlNamespaceAware="false"
      backgroundProcessorDelay="15">

     <Listener className="kryshen.catalina.userconfig.PasswdUserConfig"
               getent="/usr/bin/getent" directoryName="public_html"
               appsPerUser="5"/>
</Host>

Download

userconfig-20091103.tar.gz

License: Apache License, Version 2.0

Mercurial repository