tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Writing MemoryUserDatabase on Startup
Date Tue, 02 Aug 2005 09:57:27 GMT

I wonder, why


saves the MemoryUserDatabase directly after opening it:

     public Object getObjectInstance(Object obj, Name name, Context
nameCtx, Hashtable environment) throws Exception {


         // Return the configured database instance;;
         return (database);


That means, the runtime user of tomcat needs write permissions on the
directory, the file is in (see the implementation of

Ogf course in case one likes to administer the user database the save
function is necessary. But there are two cases where one would prefer to
have tomcat not trying to save the database during startup:

1) Running tomcat from CD
2) Having a very secure setup of tomcat, where all the configs are write

The call to is in the code since the very first version
in TC 4, but I can't really see, why it is necessary.

Another possibility would be to catch the Exception thrown when there is
no write permission and to simply log a warning.

Also: there is a save() done in close(). I don't know, where the close
is called from, but it looks like nowhere in catalina code (eventually
in admin).

Any comments? Thanks!


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

View raw message