Shapira,

Seems like too much work/complication for a small gain.  How inefficient
is the current mechanism and how much performance would we gain from
your approach?

What do you mean by "too much work"? :) I already have a patch ready to be committed. It's just a few line changes.

Just to give you an idea of the proposal's benefit. Currently, we're
scanning the following global JARs for TLDs (depending on your runtime, there may be even more!), none of which contain any TLDs:


/home/luehe/ws/jakarta-tomcat-5/build/common/lib/servlet-api.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/commons-dbcp.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/naming-common.jar
/net/koori.sfbay/a/v07/jdk/1.4/fcs/binaries/solsparc/jre/lib/ext/localedata.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/commons-modeler.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/servlets-invoker.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/tomcat-jk.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/naming-resources.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/servlets-webdav.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/jakarta-regexp-1.2.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/commons-beanutils.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/catalina-cluster.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/jkshm.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/endorsed/xmlParserAPIs.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/jasper-compiler.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/tomcat-http11.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/ant.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/naming-factory.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/tomcat-jni.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/jmx-tools.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/catalina-ant.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/catalina-i18n-fr.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/tomcat-jk2.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/commons-logging.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/commons-el.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/jkconfig.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/servlets-default.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/catalina-optional.jar
/net/koori.sfbay/a/v07/jdk/1.4/fcs/binaries/solsparc/jre/lib/ext/sunjce_provider.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/commons-logging-api.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/naming-java.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/catalina.jar
/net/koori.sfbay/a/v07/jdk/1.4/fcs/binaries/solsparc/jre/lib/ext/ldapsec.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/tomcat-util.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/commons-pool.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/commons-digester.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/catalina-i18n-ja.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/catalina-i18n-es.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/tomcat-coyote.jar
/net/koori.sfbay/a/v07/jdk/1.4/fcs/binaries/solsparc/lib/tools.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/commons-fileupload-1.0.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/endorsed/xercesImpl.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/commons-collections.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/jasper-runtime.jar
/net/koori.sfbay/a/v07/jdk/1.4/fcs/binaries/solsparc/jre/lib/ext/dnsns.jar
/home/luehe/ws/jakarta-tomcat-5/build/server/lib/servlets-common.jar
/home/luehe/ws/jakarta-tomcat-5/build/bin/bootstrap.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/jmx.jar
/home/luehe/ws/jakarta-tomcat-5/build/common/lib/jsp-api.jar


Notice that we're scanning this list twice: once for context listeners (in TldConfig.java), and again in Jasper's TldLocationsCache for taglibs.


Jan



Yoav Shapira
Millennium ChemInformatics



-----Original Message-----
From: Jan Luehe [mailto:[EMAIL PROTECTED]
Sent: Monday, September 22, 2003 3:40 PM
To: Tomcat Developers List
Subject: [PROPOSAL] Narrow down the list of JARs to be scanned for TLDs

Currently, any JARs in the classloader delegation chain of a webapp's
classloader are scanned for packaged TLDs. This is convenient, as it
allows a JAR-packaged taglib to be simply dropped in common/lib and
shared by all webapps, rather than requiring each webapp to bundle the
taglib in its own WEB-INF/lib.

However, scanning all available JARs for TLDs is not very efficient,
especially if the names of the JAR-packaged taglibs are known in
advance.

The proposal is to add a configurable String property ("tldJarNames")
on Context, which specifies the comma-separated list of JAR file names
(without any path info) that must be scanned for TLDs.

Catalina will continue to traverse the classloader delegation chain,
but only consider those JARs that match the names in the
comma-separated list.

If a JAR appears more than once in the classloader delegation chain,
we will pick its first occurrence.

If the "tldJarNames" property is not set, Catalina will continue to

scan


all JARs in the classloader delegation chain for TLDs.

Comments?

Jan






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to