Author: pferraro
Date: 2008-10-31 16:56:32 -0400 (Fri, 31 Oct 2008)
New Revision: 2043
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/MCMPUtils.java
Log:
ENABLE-APP requests should use aliases from host, not response
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/MCMPUtils.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/MCMPUtils.java 2008-10-31
20:34:30 UTC (rev 2042)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/MCMPUtils.java 2008-10-31
20:56:32 UTC (rev 2043)
@@ -277,7 +277,11 @@
engineRequests.add(createConfigRequest(jvmRoute, service.findConnectors(),
nodeConfig, balancerConfig));
- Set<ResetRequestSource.VirtualHost> virtualHosts =
response.get(jvmRoute);
+ Set<ResetRequestSource.VirtualHost> responseHosts =
Collections.emptySet();
+ if (response.containsKey(jvmRoute))
+ {
+ responseHosts = response.get(jvmRoute);
+ }
for (Container child: engine.findChildren())
{
@@ -287,15 +291,12 @@
VirtualHost responseHost = null;
- if (virtualHosts != null)
+ for (VirtualHost virtualHost: responseHosts)
{
- for (VirtualHost virtualHost: virtualHosts)
+ if (virtualHost.getAliases().contains(hostName))
{
- if (virtualHost.getAliases().contains(hostName))
- {
- responseHost = virtualHost;
- break;
- }
+ responseHost = virtualHost;
+ break;
}
}
@@ -332,14 +333,14 @@
{
if (status != ResetRequestSource.Status.ENABLED)
{
- engineRequests.add(createContextRequest(MCMPRequestType.ENABLE_APP,
jvmRoute, responseAliases, path));
+ engineRequests.add(createContextRequest(MCMPRequestType.ENABLE_APP,
jvmRoute, aliases, path));
}
}
else
{
if (status == ResetRequestSource.Status.ENABLED)
{
- engineRequests.add(createContextRequest(MCMPRequestType.STOP_APP,
jvmRoute, responseAliases, path));
+ engineRequests.add(createContextRequest(MCMPRequestType.STOP_APP,
jvmRoute, aliases, path));
}
}
}
Show replies by date