https://bz.apache.org/bugzilla/show_bug.cgi?id=58590

--- Comment #2 from Aidan <apa...@leocap.com> ---
(In reply to Konstantin Kolinko from comment #1)

Hi Konstantin,

> 1. Code conventions:
> http://tomcat.apache.org/getinvolved.html
> 
> Actually Sun's conventions but with spaces instead of tabs.

Ok, I can edit to conform with that.

> 2. backgroundProcess() runs frequently. I see no need to perform this work
> on each run.

Every 10 seconds for this container, by default, I believe - that doesn't seem
too often to merely check the modified date of a file.

> 3. It shall work without stopping and starting the realm. Users should not
> be locked from the system while it reloads.

OK, fair point, I can try to address that.

> 4. MemoryRealm is rarely used.  The usual configuration uses
> UserDatabaseRealm + MemoryUserDatabase (created by
> MemoryUserDatabaseFactory).

True, but it wasn't clear to me how to effect the same change in
UserDatabaseRealm and I was a bit pushed for time.

> 5. It should be possible to turn this feature on or off.

As I wasn't proposing this change for the default Realm I didn't think that was
necessary.

> I do not know what the default should be.
> On one hand we already have <Host autoDeploy="true"> so we are already
> checking hard drive by default.
> 
> On other hand, on production systems such setting is likely to be off by
> default (as there is an expectation that nobody will ever update that file).

I think that setting only relates to .war files ?? AFAIK there is currently no
mechanism to force re-reading of tomcat-users.xml without a restart. But I
accept that if a user requires runtime user/role loading then they should
probably use a JNDI or JDBC-based realm instead. However, I think it's nice to
have an out-of-the-box alternative that has this capability. 
I wrote this patch at the bank where I work where we use Tomcat (with the APR)
to serve several hundred internal users 24x5. We rarely update tomcat-users.xml
but when we do we have to perform a disruptive restart. The patch fixes that,
at least.

> 6. There shall be an explicit method to reload and an explicit method to
> perform an up-to-date check - so that it were possible to call them via JMX.

I hadn't thought of that. But as cool and useful as JMX is, it's beyond a lot
of the casual users whom this patch is aimed at, I suspect.

Having said all that, I'm happy to rework it as best I can in order to address
all your points or for you to simply reject it.

Kind Regards,
Aidan

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to