Bug 36020 - Patch for Enhancement of MemoryUserDatabase
Summary: Patch for Enhancement of MemoryUserDatabase
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.10
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2005-08-04 11:39 UTC by Rainer Jung
Modified: 2005-08-04 07:14 UTC (History)
0 users

readonly MemoryUserDatabase and warning instead of exception (4.61 KB, patch)
2005-08-04 11:40 UTC, Rainer Jung
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Jung 2005-08-04 11:39:33 UTC
As discussed on tomcat-dev I contribute a patch for MemoryUserDatabase that:

1) Logs a warning, if the persistance directory is not writeable (instead of an
ugly Exception)
2) Implements an additional attribute "readonly" (default: false) that one can
use to not get the warning in cases, where it's clear, that the directory is not

The patch does not include a changelog-Patch, because that changes too often.
CVS Head and 5.5.10 is the same for all files with changes.

The Warn message is only contained in the english LocalString.properties. Anyone
who could do es/fr/ja ?

I think, at the moment there is no documentation for Userdatabase, so no place
to add "readonly" information. If I'm wrong, please correct me.

I'll try to add the readonly info to admin too (later).

Last question: the close() for the MemoryUserDatabase is never called,
especially not during shutdown of tomcat. Anyone with a good hint, where to look
for adding a hook to close MemoryUserDatabase during tomcat shutdown?
Comment 1 Rainer Jung 2005-08-04 11:40:38 UTC
Created attachment 15885 [details]
readonly MemoryUserDatabase and warning instead of exception
Comment 2 Remy Maucherat 2005-08-04 15:14:28 UTC
I applied the patch, but I changed "persistable" -> "writeable". Thanks.