Setting text and binary buffer size for tomcat 7

I have a web application that sends a large text payload through Atmosphere using websocket for the GWT client. The payload size exceeds 8192 bytes, which is the default buffer size for text and binary buffers for websocket from tomcat. If the payload exceeds the buffer limit, the client receives, because it is only broken into 8192 bytes.

I tried to increase the size of the buffer by setting the context parameters in web.xml as follows:

      <context-param>
         <param-name>org.apache.tomcat.websocket.textBufferSize</param-name>
         <param-value>32768</param-value>
    </context-param>
    <context-param>
            <param-name>org.apache.tomcat.websocket.binaryBufferSize</param-name>
            <param-value>32768</param-value>
    </context-param>

But it did not affect tomcat 7.0.47.

Can someone help if I miss something or should I use the latest version of tomcat version 7.x?

I do not want to switch to tomcat 8, as this will affect my application libraries.

Thanks, Shailesh

+3
source share

All Articles