You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/05/14 13:58:24 UTC
svn commit: r1482310 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/catalina/startup/ContextConfig.java
webapps/docs/changelog.xml
Author: markt
Date: Tue May 14 11:58:24 2013
New Revision: 1482310
URL: http://svn.apache.org/r1482310
Log:
Prevent possible WAR file locking when reading context.xml from WAR
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1482309
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1482310&r1=1482309&r2=1482310&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java Tue May 14 11:58:24 2013
@@ -615,7 +615,9 @@ public class ContextConfig implements Li
try {
source = new InputSource(contextXml.toString());
- stream = contextXml.openStream();
+ URLConnection xmlConn = contextXml.openConnection();
+ xmlConn.setUseCaches(false);
+ stream = xmlConn.getInputStream();
} catch (Exception e) {
log.error(sm.getString("contextConfig.contextMissing",
contextXml) , e);
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1482310&r1=1482309&r2=1482310&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue May 14 11:58:24 2013
@@ -64,6 +64,12 @@
application. Also fix some whitespace parsing issues identified by the
additional test cases. (markt)
</fix>
+ <fix>
+ Prevent possible WAR file locking when reading a context.xml file from
+ an unexpanded WAR file. Note that in normal usage, the
+ <code>JreMemoryLeakPreventionListener</code> would protect against this.
+ (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Cluster">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org