tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re-factoring TLD parsing
Date Thu, 16 Aug 2012 22:44:25 GMT
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)?

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

Thanks,
-chris


Mime
View raw message