https://bz.apache.org/bugzilla/show_bug.cgi?id=56026

--- Comment #12 from balusc <bal...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to