tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <>
Subject Re: UserConfig: alternative implementation
Date Wed, 04 Nov 2009 00:34:57 GMT
Curious: how does it scale for large number of users, in particular if you
have NFS homes ?

It would be interesting to change this to not init the contexts when tomcat
starts - just register a handler that would start the context on first
Or as a Valve that looks for ~foo and then lookups and start the context for
that user on demand.

IMHO this could be a nice feature - but it's a perfect example of thing that
shouldn't be bundled in tomcat, but
available as a separate download. And if it used a scheme like /user/foo -
it may even be possible to implement it as a app+standard filter, with just
one 'internal API' call to load the context.


On Tue, Nov 3, 2009 at 3:16 PM, Mikhail Kryshen <> wrote:

> Hi,
> I have implemented host event listener similar to
> org.apache.catalina.startup.UserConfig but with support for multiple
> webapps per user, automatic deployment and remote user databases on UNIX.
> Currently it is available as a separate package that could be added to
> tomcat6 classpath and referenced in server.xml.
> Description:
> Code:
> Implementation details:
> Abstract class UserConfig extend HostConfig to reuse automatic deployment
> functionality. Two concrete implementations of UserConfig are provided:
> PasswdUserConfig uses local passwd file or getent command to list users
> and HomesUserConfig reads user home subdirectories in the specified base
> directory.
> I do not think it makes sense to have separate UserDatabase
> interface like in current Tomcat implementation because of tight
> coupling between the classes: UserDatabase requires UserConfig to access
> configuration properties and UserConfig have to have all properties
> needed by all UserDatabase implementations.
> I could contribute this code as a patch, but need to resolve some issues:
> - my implementation is not compatible with current UserConfig in Tomcat
> (brake compatibility or name it differently and provide as an alternative
> to the original UserConfig?);
> - it may be better to separate HostConfig methods useful for UserConfig
> in an abstract class to be extended by HostConfig and UserConfig;
> - javadoc comments may need correction (I'm not native English).
> --
> Mikhail
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message