You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2016/06/10 14:33:58 UTC
[Bug 56026] RemoteEndpoint.Async#sendText(String, SendHandler) not
thread safe
https://bz.apache.org/bugzilla/show_bug.cgi?id=56026
--- Comment #12 from balusc <ba...@gmail.com> ---
Just in case, I investigated this issue for JSF <f:websocket> and OmniFaces
<o:socket> too. This threadsafety problem doesn't occur on Jetty, Undertow
(WildFly) nor Tyrus (GlassFish/Payara). It occurs on Tomcat only.
Work around was to synchronize session:
synchronized (session) {
results.add(session.getAsyncRemote().sendText(text));
}
Frankly, this kind of contradicts the javax.websocket.Session javadoc
http://docs.oracle.com/javaee/7/api/javax/websocket/Session.html:
> Session objects may be called by multiple threads. Implementations must ensure the integrity of the mutable properties of the session under such circumstances.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org