[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] Concurrency issues with the WebSocket client
|
Joakim Erdfelt <joakim@...> writes:
> single-invocation-per-endpoint-instance contract WSC-5.1-2 does not apply to a
> <at> OnMessage annotated method that works with Streams.
>
>
> The very nature of <at> OnMessage with streams is that the first frame of
a message causes an invocation that is dispatched to a new thread, and all
subsequent frames for that message arrive via that dispatched thread (really
via the buffers that the thread has an is using)
>
> If another Message arrives, then that is also dispatched to a new thread, etc.
Thanks for your response. Unfortunately, I am not sure, that I can follow
you, in particular with respect to the streams you mention. I am using
atomic messages only. The messages are sent using sendObject(...) with a
suitable encoder configured and received through a corresponding decoder. It
is my understanding that each message should therefore occupy exactly one frame.
Should I switch to using a MessageHandler?