Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      (from Joe)

      The ContainerProvider.getClientContainer() method provides a singleton WebSocketContainer implementation.

      Issues:

      1. This means you can only have one configuration of WebSocketContainer per application. It's likely that an application may connect to many servers and would want different configuration paramaters for each of these.

      2. Multiple parts of the application can be running on different threads - they would have to coordinate access to the singleton instance.

      3. It is likely that third party libraries will build clients based on top of the WebSocket protocol and the singleton WebSocketContainer implementation. These libraries may have conflicting requirements of optimal settings on the WebSocketContainer, and even override your own applications settings without it being obvious.

      Proposal:

      ContainerProvider.getClientContainer() should always return a new instance rather than a shared singleton.

      This allows isolated instances to be used my multiple parts on the applications, in different threads and even by third party libraries, without the risk of conflict. If applications really do wish to use a singleton, they can share the instance themselves.

      Should probably rename it to newClientContainer().

      -Joe

        Activity

        Hide
        dannycoward added a comment -

        This is resolved in v012.

        Show
        dannycoward added a comment - This is resolved in v012.

          People

          • Assignee:
            dannycoward
            Reporter:
            dannycoward
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved: