jsr356-experts@websocket-spec.java.net

[jsr356-experts] Problem with getOpenSessions()

From: Danny Coward <danny.coward_at_oracle.com>
Date: Fri, 01 Feb 2013 14:56:20 -0800

Hi folks,

This could be a quickie to clear up: right now getOpenSessions() is
scoped to the WebSocketContainer and returns all the open sessions to
that container. (http://java.net/jira/browse/WEBSOCKET_SPEC-74)

This is both less than useful (called from an endpoint, it gives you the
open sessions to any of the other endpoints in the name
application...not quite what you wanted to know if you are broadcasting
stock updates in an application that contains other endpoints), and
doesn't scale to large applications, still less a distributed setting.

So the suggestion is to move it to Session, and have it return just
those other open Sessions that represent connections to the same
endpoint this session instance represents a client connection to. I
think it makes much better sense there.

Any other thoughts on that ?

- Danny
-- 
<http://www.oracle.com> 	*Danny Coward *
Java EE
Oracle Corporation