I logged a bug a couple of days ago:

http://issues.apache.org/bugzilla/show_bug.cgi?id=39218

Since nobody gave any response, I wanted to ping the list.

The current implementation of the server, common and shared class loaders use the catalina.properties file to make the group of repositories which are searched for classes configurable.

Unfortunately the order of repositories in the entries is not respected. Instead they are rearranched into packed (jar files), unpacked (class directories) and a URL list. Then all unpacked are searched first, after that all jars and at the end all URLs.

A typical user would understand the configuration lines in catalina.properties as an analogy to the usual classpath of the system classloader. And I think that's intended. He would rely on the fact, that the order of entries is respected by the class loader. So he will order his patches etc. in the most obvious way. We throw away the order and rearrange via undocumented rules.

I attached a patch to bugzilla adding another signature to the creation of the classloader, allowing to pass in all repositories in the correct order. It's not a major redesign of the loading, because I want to keep the risk of breaking something minimal.

Any comments?

An example:

The tomcat product deployer might add a patch into CATALINA_HOME/server/classes (they don't want to overwrite the original jar files and adding them into server/lib is no way, since there is no way of knowing, in which order *.jar will be evaluated).

The application project team prepares an instance in CATALINA_BASE and deploys a newer version or a collection of patches as a jar file into CATALINA_HOME/server/lib.

They prepare a catalina.properties file with

server.loader=${catalina.base}/server/lib/*.jar,\
${catalina.home}/server/classes,\
${catalina.home}/server/lib/*.jar

Their version of the patch will not be loaded, because we regroup the entries and ${catalina.home}/server/classes will come first!



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

Reply via email to