tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Re: [Proposal] Change in behaviour of
Date Tue, 21 Nov 2006 14:03:13 GMT
Hi Mladen,

Mladen Turk schrieb:
> Rainer Jung wrote:
>> I understand, but it can be used in a much more powerful way.
>> It's an external file with an easy syntax, so external monitor and
>> manage scripts can easily manipulate it's contents.
> If you think you can do that in a simple way, then fine.
> But if it would require a lots of changes, then I think
> we should go with the more powerful solution as part
> of 1.3 branch, by using shared memory, web interface, etc.
> I just don't think that this is so important if you
> still cannot manage it via jkstatus.

Yes, it is simple. We can add a source_type to the uri_worker_record
that describes, where the rule came from:

#define SOURCE_TYPE_WORKERDEF       0x0001
#define SOURCE_TYPE_JKMOUNT         0x0002
#define SOURCE_TYPE_URIMAP          0x0003
#define SOURCE_TYPE_DISCOVER        0x0004

In the existing code all rules are added via uri_worker_map_add(). All
calls to uri_worker_map_add() are in common/*, and the places never are
used for more than one SOURCE_TYPE, so one can directly add the
SOURCE_TYPE to the signature of uri_worker_map_add(). No need to change
any apache or iis specific code.

Then one calls a new function to delete all entries of type
SOURCE_TYPE_URIMAP from uri_worker_map_load() [which is exactly used to
load the]. Deletion is easy, we can simply move
all entries after the entry to delte one place further to the front and
decrement the size. No memory problems.

Finally we do no more delete duplicates, instead we sort duplicates by
the source type numerically (higher source type wins).

So when we delete the uriworkermap entries during file reload, all the
other rules are still there and every time the rule map looks the same
as after doing a restart (apart from the interval it takes to actually
load a changed file).



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

View raw message