Author: jfrederic.clere(a)jboss.com
Date: 2009-02-10 07:22:33 -0500 (Tue, 10 Feb 2009)
New Revision: 2271
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPRequestFactory.java
Log:
Fix MODCLUSTER-52.
Modified: trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java
===================================================================
--- trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java 2009-02-09 08:13:41
UTC (rev 2270)
+++ trunk/mod_cluster/src/main/java/org/jboss/modcluster/Utils.java 2009-02-10 12:22:33
UTC (rev 2271)
@@ -74,10 +74,18 @@
for (Connector connector: connectors)
{
- if (connector.getProtocol().startsWith("AJP")) // Return any AJP
connector found
+ /* Possible AJP protocol for the AJP connectors:
+ * protocol="org.apache.coyote.ajp.AjpProtocol"
+ * protocol="AJP/1.3"
+ */
+ if (connector.getProtocol().startsWith("AJP")) // Return the first AJP
connector found
{
return connector;
}
+ if (connector.getProtocol().startsWith("org.apache.coyote.ajp")) //
Return the first AJP connector found
+ {
+ return connector;
+ }
ProtocolHandler handler = connector.getProtocolHandler();
Modified:
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPRequestFactory.java
===================================================================
---
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPRequestFactory.java 2009-02-09
08:13:41 UTC (rev 2270)
+++
trunk/mod_cluster/src/main/java/org/jboss/modcluster/mcmp/impl/DefaultMCMPRequestFactory.java 2009-02-10
12:22:33 UTC (rev 2271)
@@ -62,7 +62,12 @@
boolean reverseConnection =
Boolean.TRUE.equals(IntrospectionUtils.getProperty(handler,
"reverseConnection"));
boolean ssl = Boolean.TRUE.equals(IntrospectionUtils.getProperty(handler,
"SSLEnabled"));
+ // The name is not enough when using org.apache.jk.common.ChannelSocket (it is
container).
boolean ajp = ((String) IntrospectionUtils.getProperty(handler,
"name")).startsWith("ajp-");
+ if (!ajp)
+ ajp = ((String) IntrospectionUtils.getProperty(connector,
"protocol")).startsWith("AJP");
+ if (!ajp)
+ ajp = ((String) IntrospectionUtils.getProperty(connector,
"protocol")).startsWith("org.apache.coyote.ajp");
if (reverseConnection)
{
Show replies by date