Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat CometProcessor NIO served via Apache httpd?

I have a CometProcessor Servlet working fine in Apache Tomcat. My server.xml connector entry is:

<Connector connectionTimeout="20000" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" redirectPort="8443"/>

I can hit the servlet (named 'EventBus') with a URL to Tomcat directly like so:

http://xyz.com:8080/EventBus

I have Apache httpd serving up .jsp files and servlets with a basic workers.properties file with a worker like:

worker.ajp13w.type=ajp13
worker.ajp13w.host=localhost
worker.ajp13w.port=8009

This works fine with everything but my CometProcessor servlet. When I try to hit this servlet I get:

HTTP method GET is not supported by this URL

Does anyone know how to properly forward requests from Apache httpd to Apache Tomcat for an NIO connection like a CometProcessor?

Thanks for any help.

like image 357
scribe Avatar asked Nov 06 '22 18:11

scribe


1 Answers

I don't think you can use CometProcessor with Apache. CometProcessor requires asynchronous I/O, it's impossible doing this through Apache httpd.

JK doesn't work for sure because only APR and NIO connectors supports CometProcessor.

You might be able to use mod_proxy to forward the connection to your NIO connector but you would not get event asynchronously.

like image 60
ZZ Coder Avatar answered Nov 15 '22 10:11

ZZ Coder