websocket-spec
  1. websocket-spec
  2. WEBSOCKET_SPEC-150

Encoder/Decoder lifecycle consistency between pe and ae's

    Details

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

      Description

      Currently, Encoders and Decoders are singletons for programmatic endpoints

      and they are per-connection objects for annotated endpoints.

      They should have the same lifecycle.

      Probably per-connection is best, so register by class on EndpointConfiguration, not by instance.

      Also, they need some view into the rest of the websocket API. Suggest

      setEndpointConfiguration(EndpointConfiguration ec)

      as a mini lifecycle.

        Activity

        Hide
        dannycoward added a comment -

        proposed to expert group as described.

        Show
        dannycoward added a comment - proposed to expert group as described.
        Hide
        dannycoward added a comment -

        This has now been incorporated into v014

        Show
        dannycoward added a comment - This has now been incorporated into v014
        Hide
        jitu added a comment -

        I think encoder/decoder instances should be created using the same algorithm (EE section 5.2.4 for creating non-contextual beans) so that injection works in these instances. Of course,
        this should be done only in the CDI enabled environments.

        Then websocket container manages the lifecycle and will destroy these instances when the connection is closed.

        Show
        jitu added a comment - I think encoder/decoder instances should be created using the same algorithm (EE section 5.2.4 for creating non-contextual beans) so that injection works in these instances. Of course, this should be done only in the CDI enabled environments. Then websocket container manages the lifecycle and will destroy these instances when the connection is closed.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: