You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/06/17 21:39:49 UTC

svn commit: r1603274 - /tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoAsyncAnnotation.java

Author: markt
Date: Tue Jun 17 19:39:48 2014
New Revision: 1603274

URL: http://svn.apache.org/r1603274
Log:
Enable the async echo endpoint

Modified:
    tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoAsyncAnnotation.java

Modified: tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoAsyncAnnotation.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoAsyncAnnotation.java?rev=1603274&r1=1603273&r2=1603274&view=diff
==============================================================================
--- tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoAsyncAnnotation.java (original)
+++ tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoAsyncAnnotation.java Tue Jun 17 19:39:48 2014
@@ -23,6 +23,7 @@ import java.nio.ByteBuffer;
 import javax.websocket.OnMessage;
 import javax.websocket.PongMessage;
 import javax.websocket.Session;
+import javax.websocket.server.ServerEndpoint;
 
 /**
  * The three annotated echo endpoints can be used to test with Autobahn and
@@ -32,7 +33,7 @@ import javax.websocket.Session;
  * Note: This one is disabled by default since it allocates memory, and needs
  * to be enabled back.
  */
-//@javax.websocket.server.ServerEndpoint("/websocket/echoAsyncAnnotation")
+@ServerEndpoint("/websocket/echoAsyncAnnotation")
 public class EchoAsyncAnnotation {
 
     StringBuilder sb = null;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1603274 - /tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoAsyncAnnotation.java

Posted by Rémy Maucherat <re...@apache.org>.
2014-06-17 22:36 GMT+02:00 Mark Thomas <ma...@apache.org>:

> There are some large messages in the Autobahn tests (multi-MB).
>
> On reflection I think it will be easier to just disable it again.
>
> Good job on fixing the example, I couldn't see anything wrong with it !
Besides that IMO it should remain disabled, it is nice that it does
something different (buffering) but then it can use an arbitrary amount of
memory which looked like a dos to me.

Rémy

Re: svn commit: r1603274 - /tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoAsyncAnnotation.java

Posted by Mark Thomas <ma...@apache.org>.
On 17/06/2014 20:47, Konstantin Kolinko wrote:
> 2014-06-17 23:39 GMT+04:00  <ma...@apache.org>:
>> Author: markt
>> Date: Tue Jun 17 19:39:48 2014
>> New Revision: 1603274
>>
>> URL: http://svn.apache.org/r1603274
>> Log:
>> Enable the async echo endpoint
>>
>> Modified:
>>     tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoAsyncAnnotation.java
> 
>> @@ -32,7 +33,7 @@ import javax.websocket.Session;
>>   * Note: This one is disabled by default since it allocates memory, and needs
>>   * to be enabled back.
>>   */
> 
> If you enable it, then the above comment have to be removed,
> see r1598981.
> 
> I think there have to be some size limit to 'sb' and 'bytes' fields.
> How much is needed to pass Autobahn test?

There are some large messages in the Autobahn tests (multi-MB).

On reflection I think it will be easier to just disable it again.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r1603274 - /tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoAsyncAnnotation.java

Posted by Konstantin Kolinko <kn...@gmail.com>.
2014-06-17 23:39 GMT+04:00  <ma...@apache.org>:
> Author: markt
> Date: Tue Jun 17 19:39:48 2014
> New Revision: 1603274
>
> URL: http://svn.apache.org/r1603274
> Log:
> Enable the async echo endpoint
>
> Modified:
>     tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/EchoAsyncAnnotation.java

> @@ -32,7 +33,7 @@ import javax.websocket.Session;
>   * Note: This one is disabled by default since it allocates memory, and needs
>   * to be enabled back.
>   */

If you enable it, then the above comment have to be removed,
see r1598981.

I think there have to be some size limit to 'sb' and 'bytes' fields.
How much is needed to pass Autobahn test?

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org