Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 7.2.0
-
Fix Version/s: 7.2.1
-
Component/s: None
-
Labels:None
-
Environment:Ubuntu 10.04 using
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
or Oracle JRockit(R) (build R28.0.0-679-130297-1.6.0_17-20100312-2121-linux-x86_64, compiled mode)
-
Number of attachments :
Description
One Jetty server serves several virtual hosts. The configuration files for the contexts look like this:
contexts/foo.xml
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="resourceBase">/data/foo</Set>
<Set name="contextPath">/</Set>
<Set name="virtualHosts">
<Array type="java.lang.String">
<Item>foo.example.org</Item>
</Array>
</Set>
</Configure>
contexts/bar.xml
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="resourceBase">/data/bar</Set>
<Set name="contextPath">/</Set>
<Set name="virtualHosts">
<Array type="java.lang.String">
<Item>bar.example.org</Item>
</Array>
</Set>
</Configure>
When I hot-redeploy one of the contexts (by updating the files change date) the other context gets undeployed and as a result I have only one of the contexts active and the other is gone.
I ran the Jetty server with the debugger and found the problem. In DeploymentManager.java line 452 requestAppGoal(App,String) the "app" object is the correct one. The corresponding AppEntry object is searched by the result of app.getContextId(). In the case of several virtual hosts this is always '/' so a randmon AppEntry object will be selected (and undeployed) later.
Oh boy, I can't believe we didn't see this one sooner!
Thanks for the report.
Fixed in svn rev 2427.