[mod_cluster-commits] mod_cluster SVN: r797 - in branches/MOD_CLUSTER_1_0_10_GA_CP/src: test/java/org/jboss/modcluster and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Apr 9 12:51:47 EDT 2012
Author: jfrederic.clere at jboss.com
Date: 2012-04-09 12:51:47 -0400 (Mon, 09 Apr 2012)
New Revision: 797
Modified:
branches/MOD_CLUSTER_1_0_10_GA_CP/src/main/java/org/jboss/modcluster/Utils.java
branches/MOD_CLUSTER_1_0_10_GA_CP/src/test/java/org/jboss/modcluster/CatalinaEventHandlerTestCase.java
Log:
Fix MODCLUSTER-300.
Modified: branches/MOD_CLUSTER_1_0_10_GA_CP/src/main/java/org/jboss/modcluster/Utils.java
===================================================================
--- branches/MOD_CLUSTER_1_0_10_GA_CP/src/main/java/org/jboss/modcluster/Utils.java 2012-04-09 16:45:00 UTC (rev 796)
+++ branches/MOD_CLUSTER_1_0_10_GA_CP/src/main/java/org/jboss/modcluster/Utils.java 2012-04-09 16:51:47 UTC (rev 797)
@@ -207,24 +207,21 @@
{
Connector connector = findProxyConnector(engine.getService().findConnectors());
InetAddress localAddress = (InetAddress) IntrospectionUtils.getProperty(connector.getProtocolHandler(), "address");
- if ((engine.getJvmRoute() == null || localAddress == null) && !mcmpHandler.getProxyStates().isEmpty())
+ // Automagical JVM route (address + port + engineName)
+ if (localAddress == null)
{
- // Automagical JVM route (address + port + engineName)
- if (localAddress == null)
- {
- localAddress = mcmpHandler.getLocalAddress();
- String hostAddress = (localAddress != null) ? localAddress.getHostAddress() : "127.0.0.1";
- IntrospectionUtils.setProperty(connector.getProtocolHandler(), "address", hostAddress);
- log.info(sm.getString("modcluster.util.address", hostAddress));
- }
- if (engine.getJvmRoute() == null)
- {
- String hostName = (localAddress != null) ? localAddress.getHostName() : "127.0.0.1";
- String jvmRoute = hostName + ":" + connector.getPort() + ":" + engine.getName();
- engine.setJvmRoute(jvmRoute);
- log.info(sm.getString("modcluster.util.jvmRoute", engine.getName(), jvmRoute));
- }
+ localAddress = mcmpHandler.getLocalAddress();
+ String hostAddress = (localAddress != null) ? localAddress.getHostAddress() : "127.0.0.1";
+ IntrospectionUtils.setProperty(connector.getProtocolHandler(), "address", hostAddress);
+ log.info(sm.getString("modcluster.util.address", hostAddress));
}
+ if (engine.getJvmRoute() == null)
+ {
+ String hostName = (localAddress != null) ? localAddress.getHostName() : "127.0.0.1";
+ String jvmRoute = hostName + ":" + connector.getPort() + ":" + engine.getName();
+ engine.setJvmRoute(jvmRoute);
+ log.info(sm.getString("modcluster.util.jvmRoute", engine.getName(), jvmRoute));
+ }
}
/**
Modified: branches/MOD_CLUSTER_1_0_10_GA_CP/src/test/java/org/jboss/modcluster/CatalinaEventHandlerTestCase.java
===================================================================
--- branches/MOD_CLUSTER_1_0_10_GA_CP/src/test/java/org/jboss/modcluster/CatalinaEventHandlerTestCase.java 2012-04-09 16:45:00 UTC (rev 796)
+++ branches/MOD_CLUSTER_1_0_10_GA_CP/src/test/java/org/jboss/modcluster/CatalinaEventHandlerTestCase.java 2012-04-09 16:51:47 UTC (rev 797)
@@ -695,8 +695,6 @@
EasyMock.expect(engine.getService()).andReturn(service);
EasyMock.expect(service.findConnectors()).andReturn(new Connector[] { connector });
EasyMock.expect(engine.getJvmRoute()).andReturn(null);
- EasyMock.expect(this.mcmpHandler.getProxyStates()).andReturn(Collections.singleton(EasyMock.createMock(MCMPServerState.class)));
- EasyMock.expect(engine.getJvmRoute()).andReturn(null);
EasyMock.expect(this.mcmpHandler.getLocalAddress()).andReturn(InetAddress.getByName("localhost"));
EasyMock.expect(engine.getName()).andReturn("engine");
More information about the mod_cluster-commits
mailing list