Bug 46923 - AJP/1.3 Connector code/documentation mismatch
Summary: AJP/1.3 Connector code/documentation mismatch
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Connectors (show other bugs)
Version: 6.0.18
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-26 12:09 UTC by John Allison
Modified: 2009-03-27 05:38 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Allison 2009-03-26 12:09:45 UTC
The docs for the ajp/1.3 connector:

http://tomcat.apache.org/tomcat-6.0-doc/config/ajp.html

make it seem like there is only 1 implementation for the protocol class but there are really 3. The docs describe the properties for the APR-enabled class org.apache.coyote.ajp.AjpAprProtocol.

They don't mention that if APR is not initialized, the class used for protocol="AJP/1.3" is actually org.apache.jk.server.JkCoyoteHandler which does not have the same interface/properties as the docs describe. In particular, I cannot use the executor, getting exceptions like:

[DATE] org.apache.catalina.startup.ConnectorCreateRule _setExecutor
WARNING: Connector [org.apache.catalina.connector.Connector@11e1e67] does not support external executors. Method setExecutor(java.util.concurrent.Executor)

which is confusing because the docs make it sound like it works. The one message I found on tomcat-users seemed to be confused with another issue and ignored.


There is however the class org.apache.coyote.ajp.AjpProtocol which matches the AjpAprProtocol interface and seems to work fine.

I suggest at least making the config/ajp.html page clear and including JkCoyoteHandler documenation, or changing org.apache.catalina.connector.Connector to use AjpProtocol.
Comment 1 Mark Thomas 2009-03-27 05:38:06 UTC
Fixed in trunk and 6.0.x and will be included in 6.0.20 onwards. Thanks for the report.