Author: markt Date: Wed Oct 6 22:54:13 2010 New Revision: 1005284 URL: http://svn.apache.org/viewvc?rev=1005284&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49957 Correct regression due to Lifecycle re-factoring that cleared all work directories (with compiled JSPs and persisted sessions) when Tomcat was stopped.
Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1005284&r1=1005283&r2=1005284&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Wed Oct 6 22:54:13 2010 @@ -1332,8 +1332,6 @@ public class HostConfig if (log.isDebugEnabled()) log.debug(sm.getString("hostConfig.stop")); - undeployApps(); - if (oname != null) { try { Registry.getRegistry(null, null).unregisterComponent(oname); @@ -1349,32 +1347,6 @@ public class HostConfig /** - * Undeploy all deployed applications. - */ - protected void undeployApps() { - - if (log.isDebugEnabled()) - log.debug(sm.getString("hostConfig.undeploying")); - - // Soft undeploy all contexts we have deployed - DeployedApplication[] apps = - deployed.values().toArray(new DeployedApplication[0]); - for (int i = 0; i < apps.length; i++) { - try { - host.removeChild(host.findChild(apps[i].name)); - } catch (Throwable t) { - ExceptionUtils.handleThrowable(t); - log.warn(sm.getString - ("hostConfig.context.remove", apps[i].name), t); - } - } - - deployed.clear(); - - } - - - /** * Check status of all webapps. */ protected void check() { Modified: tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties?rev=1005284&r1=1005283&r2=1005284&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties (original) +++ tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties Wed Oct 6 22:54:13 2010 @@ -99,7 +99,6 @@ hostConfig.start=HostConfig: Processing hostConfig.stop=HostConfig: Processing STOP hostConfig.undeploy=Undeploying context [{0}] hostConfig.undeploy.error=Error undeploying web application at context path {0} -hostConfig.undeploying=Undeploying deployed web applications tldConfig.addListeners=Adding {0} listeners from TLD files tldConfig.cce=Lifecycle event data object {0} is not a Context tldConfig.dirFail=Failed to process directory [{0}] for TLD files Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1005284&r1=1005283&r2=1005284&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed Oct 6 22:54:13 2010 @@ -70,6 +70,11 @@ <bug>49956</bug>: Handle case when @Resource annotation uses the full JNDI name for a resource. Based on a patch by Gurkan Erdogdu. (markt) </fix> + <fix> + <bug>49557</bug>: Correct regression due to Lifecycle refactoring that + cleared all work directories (with compiled JSPs and persisted sessions) + when Tomcat was stopped. (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org