[WEBSOCKET_SPEC-150] Encoder/Decoder lifecycle consistency between pe and ae's Created: 23/Feb/13  Updated: 28/Feb/13  Resolved: 28/Feb/13

Status: Resolved
Project: websocket-spec
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: dannycoward Assignee: dannycoward
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Tags: v014


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.

Comment by dannycoward [ 26/Feb/13 ]

proposed to expert group as described.

Comment by dannycoward [ 28/Feb/13 ]

This has now been incorporated into v014

Comment by jitu [ 28/Feb/13 ]

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.

Generated at Thu Oct 27 06:30:58 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.