JETTY-1054 Avoid double deploys

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@441 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2009-06-27 03:46:09 +00:00
parent 876369b567
commit f4bea1ebc3
2 changed files with 18 additions and 8 deletions

View File

@ -3,6 +3,7 @@ jetty-7.0.0.M4-SNAPSHOT
+ JETTY-1042 Prevent cookie leak between shared connection + JETTY-1042 Prevent cookie leak between shared connection
+ JETTY-1048 Fix for large partially filtered static content + JETTY-1048 Fix for large partially filtered static content
+ JETTY-1049 Improved transparent proxy usability + JETTY-1049 Improved transparent proxy usability
+ JETTY-1054 Avoid double deploys
jetty-7.0.0.M3 20 June 2009 jetty-7.0.0.M3 20 June 2009
+ fixed race with expired async listeners + fixed race with expired async listeners

View File

@ -22,6 +22,7 @@ import org.eclipse.jetty.server.handler.HandlerCollection;
import org.eclipse.jetty.util.AttributesMap; import org.eclipse.jetty.util.AttributesMap;
import org.eclipse.jetty.util.URIUtil; import org.eclipse.jetty.util.URIUtil;
import org.eclipse.jetty.util.component.AbstractLifeCycle; import org.eclipse.jetty.util.component.AbstractLifeCycle;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.resource.Resource; import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.webapp.WebAppContext; import org.eclipse.jetty.webapp.WebAppContext;
@ -223,18 +224,26 @@ public class WebAppDeployer extends AbstractLifeCycle
for (int i=0; i<installed.length; i++) for (int i=0; i<installed.length; i++)
{ {
ContextHandler c=(ContextHandler)installed[i]; ContextHandler c=(ContextHandler)installed[i];
if (context.equals(c.getContextPath())) if (context.equals(c.getContextPath()))
continue files; continue files;
String path; try
if (c instanceof WebAppContext) {
path = ((WebAppContext)c).getWar(); String path=null;
else if (c instanceof WebAppContext)
path = (c.getBaseResource()==null?"":c.getBaseResource().getFile().getAbsolutePath()); path = Resource.newResource(((WebAppContext)c).getWar()).getFile().getAbsolutePath();
else if (c.getBaseResource()!=null)
path = c.getBaseResource().getFile().getAbsolutePath();
if (path.equals(app.getFile().getAbsolutePath())) if (path!=null && path.equals(app.getFile().getAbsolutePath()))
continue files; continue files;
}
catch (Exception e)
{
Log.ignore(e);
}
} }
} }