On 16 August 2012 23:44, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> All,
>
> The first item in the TOMCAT-NEXT.txt is this:
>
>  1. Refactor the TLD parsing. TLDs are currently parsed twice. Once by
>     Catalina looking for listeners and once by Jasper.
>
> I had a conversation in Vancouver with David Blevins about the scourge
> of JAR-scanning in general (in that case, we were discussing
> annotation-processing) and I suggested that a generic JAR scanner could
> be built that would simply scan JARs and emit events like "found
> annotation" or "found JAR" or "found file" or whatever.
>
> I don't know enough about how Catalina and Jasper each handle these
> things, but would such a scanning component be helpful to them? If both
> components (Catalina and Jasper, other components) could register event
> handlers with the scanner, the number of times each JAR would be scanned
> would be limited to 1.
>
> Perhaps this strategy could be extended to TLD processing as well: the
> scanner could be configured to send TLD-specific notifications (or maybe
> just have a TLD-specific listener registered with the scanner that
> generates events like "read TLD component" or what have you).
>
> I guess the question is whether each component (Catalina, Jasper,
> whatever add-ons might be interested in similar information) can cleanly
> register their interest in receiving notification of these kinds of
> events. Is there a convenient place where components hosted by Catalina
> could naturally register for these kinds of events (or even request that
> a JAR scan occur)?

What about timing?
If the components start up independently, there could be issues with
knowing when all interested parties have declared themselves and when
it is safe to start the scan. Equally, one component may require the
information before another registers.

> Is this kind of thing overkill, or does it sound like it would be a
> truly useful utility?
>
> Thanks,
> -chris
>

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

Reply via email to