[atmosphere-users] Can't get rid of the BlockIOCometSupport fallback in Tomcat
I know this issue has been raised a couple times already, so sorry for
reposting it. I can't figure out how to resolve this even after reading
through pretty much anything I've found on the issue.
The problem is the following warning in my server's log file:
2011-09-16 12:00:36,623 [http-8080-exec-1] WARN
org.atmosphere.cpr.AtmosphereServlet - failed using comet support:
org.atmosphere.container.TomcatCometSupport, error: Tomcat failed to detect
this is a Comet application because context.xml is missing or the
Http11NioProtocol Connector is not enabled.
If that's not the case, you can also remove META-INF/context.xml and
2011-09-16 12:00:36,625 [http-8080-exec-1] WARN
org.atmosphere.cpr.AtmosphereServlet - Using BlockingIOCometSupport.
I am using version 0.7.1 of Atmosphere in combination with the Guice
integration module (atmosphere-guice) as well as the Google Web Toolkit
(GWT) integration (atmosphere-gwt-common, atmosphere-gwt-client,
atmosphere-gwt-server, atmosphere-gwt-poll). There are also the
atmosphere-runtime (obviously), the atmosphere-jersey and the
atmosphere-annotations JARs on my classpath but they shouldn't be in use
(except by Atmosphere internally).
What have I done so far:
0) I have tried getting it to work on Tomcat 7 (v7.0.21) and Tomcat 6
(v6.0.33); on Tomcat 7 I also can't get it to use Servlet 3.0 (maybe because
GWT requires me to specify the web module to be a version 2.5 module)
1) I have enabled the Http11NioProtocol Connnector in my Tomcat server.xml
2) I have removed the "atmosphere-compat-tomcat-0.7.1.jar" from WEB-INF/lib
since it contains fake classes only. (this only works for Tomcat 6 since
Tomcat 7 requires the fake classes from the JAR because it appears that the
namespaces for Tomcat's Comet types have changed)
3) I have tried removing the META-INF/context.xml to no avail.
4) I have tried adding <Loader delegate="true"/> to META-INF/context.xml
I think my issue has to do with the fact that I am using the Guice
integration (or the GWT integration).
I've noticed that the fix proposed there is included in the
AtmosphereGuiceServlet class as well as the GuiceManagedAtmosphereServlet
class. The code in the method detectSupportedFramework() is however never
called in my case since I supply an atmosphere.xml that defines one dummy
handler that I programmatically remove before programmatically adding my own
handler (I do this adding of the atmosphere handler programmatically because
the handler itself is constructed by Guice since it depends on some other
application classes that are injected to its constructor; if I don't do it
this way, it blows up at creation time since the handler does not define a
default constructor). Could this be somehow related to my problem? (Sorry,
I've been getting slightly confused over the past 3 hours)
Does anyone have any additional hints what I could try in order to activate
the non-blocking support for Tomcat?