Tomcat 7 will only use BlockingIO

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Tomcat 7 will only use BlockingIO

neojonas
I'm running Tomcat 7.0.5 and I get the following messages in catalina.out when I first connect to my comet servlet.

Dec 26, 2010 10:36:11 PM org.atmosphere.cpr.AtmosphereServlet doCometSupport
WARNING: 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 WEB-INF/lib/atmosphere-compat-tomcat.jar
Dec 26, 2010 10:36:11 PM org.atmosphere.cpr.AtmosphereServlet doCometSupport
WARNING: Using the BlockingIOCometSupport.
Dec 26, 2010 10:36:11 PM myapp.integration.comet.AsyncHttpRequestHandlingMessageAdapter subscribe
INFO: Handling subscription request for resource with broadcaster ID: /user
Dec 26, 2010 10:36:11 PM myapp.integration.comet.AsyncHttpRequestHandlingMessageAdapter subscribe
INFO: Resource with broadcaster ID: /user suspended.


I have the following at META-INF/context.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Context>
   
    <Loader delegate="true"/>
</Context>


Comet part of web.xml:

 
  <servlet>
    <servlet-name>cometServlet</servlet-name>
    <servlet-class>org.atmosphere.cpr.MeteorServlet</servlet-class>
    <init-param>
      <param-name>org.atmosphere.servlet</param-name>
      <param-value>org.springframework.web.servlet.DispatcherServlet</param-value>
    </init-param>
    <init-param>
      <param-name>org.atmosphere.cpr.broadcasterClass</param-name>
      <param-value>myapp.integration.comet.HttpMessageBroadcaster</param-value>
    </init-param>
    <init-param>
      <param-name>org.atmosphere.useStream</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>org.atmosphere.useNative</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name>
      <param-value>org.atmosphere.cache.HeaderBroadcasterCache</param-value>
    </init-param>
    <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>/WEB-INF/comet-config.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    <async-supported>true</async-supported>
  </servlet>

  <servlet-mapping>
    <servlet-name>cometServlet</servlet-name>
    <url-pattern>/pubsub/*</url-pattern>
  </servlet-mapping>


My connector in tomact/conf/server.xml:
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" connectionTimeout="20000" redirectPort="8443" />

I've tried installing the APR based tomcat native libraries and all sorts of settings, but I can't figure out why it's still using blocking IO.  Is there a problem with Tomcat, Atmosphere, or something else?  Anyone else successful with Tomcat 7?
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 7 will only use BlockingIO

neojonas
Quick Update: It doesn't give me those errors when I run it under Tomcat 6.0.29.  I'm wondering if it has to do with the fact that Tomcat changed where it's comet classes are located.  From the Tomcat 7 migration guide:

To enabled Comet to work correctly when running under a security manager, the Comet classes have been moved from the org.apache.catalina package to the org.apache.catalina.comet package. Code using Comet will need to be updated and recompiled to reflect the new package name.

I'm not sure how to do this myself.  Any suggestions?
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 7 will only use BlockingIO

Jeanfrancois Arcand-4
Salut,

On 10-12-27 12:48 AM, neojonas wrote:

>
> Quick Update: It doesn't give me those errors when I run it under Tomcat
> 6.0.29.  I'm wondering if it has to do with the fact that Tomcat changed
> where it's comet classes are located.  From the Tomcat 7 migration guide:
>
> To enabled Comet to work correctly when running under a security manager,
> the Comet classes have been moved from the org.apache.catalina package to
> the org.apache.catalina.comet package. Code using Comet will need to be
> updated and recompiled to reflect the new package name.
>
> I'm not sure how to do this myself.  Any suggestions?

Let me take a look this morning and I will reply back.

Thanks

-- Jeanfrancois


>
ale
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 7 will only use BlockingIO

ale
Hello. I have the same problem with Tomcat 7.0.16 and atmosphere-0.8-SNAPSHOT


Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 7 will only use BlockingIO

Dheeraj G
This post has NOT been accepted by the mailing list yet.
I have exact same problem. Everything works in 6.0.33 and it does not work in 7.0.22. I have even compiled atmosphere-compat.tomcat.jar to include org.apache.catalina.comet.CometProcessor which is a package name change in tomcat 7. Still it is not able to recognize at comet application.

I have Context.xml
<?xml version="1.0" encoding="UTF-8"?>
<Context>
    <Loader delegate="true"/>
</Context>

And server.xml
<Connector connectionTimeout="20000" maxThreads="32000" port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" redirectPort="8443"/> 


The error is
WARNING: 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 WEB-INF/lib/atmosphere-compat-tomcat.jar
Oct 5, 2011 10:15:25 AM org.atmosphere.cpr.AtmosphereServlet doCometSupport
WARNING: Using BlockingIOCometSupport.
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 7 will only use BlockingIO

jfarcand
Administrator
Please use Atmosphere 0.8.0-RC1 to see if that issue has been fixed.

Thanks!

-- Jeanfrancois
sd
Reply | Threaded
Open this post in threaded view
|

Re: Tomcat 7 will only use BlockingIO

sd
Still seeing this issue on RC1, I didn't see it with 0.7.2 for some reason
Reply | Threaded
Open this post in threaded view
|

[atmosphere-users] Re: Tomcat 7 will only use BlockingIO

Jeanfrancois Arcand-4
OK try the latest SNAPSHOT (0.8.0-RC2-SNAPSHOT)...this is fixed.

-- Jeanfrancois

On 11-10-08 6:36 PM, sd wrote:
> Still seeing this issue on RC1, I didn't see it with 0.7.2 for some reason
>
> --
> View this message in context: http://atmosphere-users-mailling-list.2493822.n2.nabble.com/Tomcat-7-will-only-use-BlockingIO-tp5868824p6873356.html
> Sent from the Atmosphere users mailling list mailing list archive at Nabble.com.