Re: ServerSocket from within Tapestry

Eugen <[email protected]>
Newsgroups gmane.comp.java.tapestry.user
Message-ID <CAE+3ZKsZGAgicEEt48qyqXRA1FeF8mSryvG=0ys0p2zS_8b4KA@mail.gmail.com>
Hi Christopher,
In my case the annotation @ServerEndpoint decorates an Service
implementation class.

I don't invoke any threads in WS Methods, but, i think You can use the
Tapestry's ParralelExecutor Service to optimize the processing of client
requests (see https://tapestry.apache.org/parallel-execution.html)

As WebSocket Client I use this library -
https://github.com/TooTallNate/Java-WebSocket

Regards
Eugen


2018-06-07 8:10 GMT+02:00 Christopher Dodunski <
[email protected]>:

> Thanks Eugen, and where did you place the server-side class decorated with
> @ServerEndpoint("/ws")?  Perhaps it doesn't matter whether it is placed in
> 'pages' or 'services', as Tomcat finds it regardless.
>
> Is it necessary to invoke new threads (multi-threading) within each of the
> methods decorated with @OnOpen, @OnClose, @OnMessage and @OnError, or does
> Tomcat automatically handle cases of multiple, simultaneous client
> connections?
>
> I found the below 'howto' on using Tomcat WebSockets, but the client side
> code is implemented in HTML and JavaScript, not Java.  It would be useful
> to find some sample, client-side Java code for connecting and
> communicating via a Tomcat WebSocket.
>
> https://examples.javacodegeeks.com/enterprise-java/tomcat/apache-tomcat-
> websocket-tutorial/
>
> Regards,
>
> Chris.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.