tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <rainer.j...@kippdata.de>
Subject Re: Multiple catalina.properties
Date Thu, 23 Jun 2011 08:54:51 GMT
On 23.06.2011 09:42, Rainer Jung wrote:
> Noticing that e maintain two copies of jarsToSkip lists, one in
> catalina.properties and one in TomcatBaseTest, I was thinking about a
> test case to compare the two. I then stumbled over our
> catalina.properties "copy" in the startup package, which doesn't have a
> jarsToSkip at all.
> 
> File java/org/apache/catalina/startup/catalina.properties is identical
> to conf/catalina.properties except for:
> 
> -common.loader=${catalina.home}/lib,${catalina.home}/lib/*.jar
> +common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
> 
> and the missing jarsToSkip block.
> 
> I think there is no reason for these differences and that the file in
> the startup package should be the same as the default conf one we ship.
> Right?
> 
> If so, shouldn't we simply remove the file in startup from svn, and add
> a copy to tomcat.classes from the conf version to the copy to classes
> part of the "compile" target? The file is also packaged into the src
> jars. For this we can add a copy from conf to startup at the beginning
> of the compile and add the file to the svn:ignore. Does that work for you?
> 
> Concerning the skipToJars in TomcatBaseTest: What about making
> loadProperties in CatalinaProperties protected and use that one to
> populate the System Properties that are defined in catalina.properties.
> That would also ensre, that we test against any other sysprops we add to
> the default catalina.properties, like
> tomcat.util.buf.StringCache.byte.enabled=true

In fact since loadProperties() is automatically called in
CatalinaProperties when loading the class, we don't need to make it
protected. Adding

+        // Trigger loading of catalina.properties
+        CatalinaProperties.getProperty("foo");

to TomcatBaseTest and of course having jarsToSkip in the startup copy of
catalina.properties is enough.

Regards,

Rainer

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


Mime
View raw message