I'm writing a bunch of blog posts on WildFly and WebSockets including TornadoFX apps that register lambdas to respond to the bi-directional WebSocket calls. I have to get a few set up posts out of the way first. This first one doesn't involve desktop code at all, but if you're considering WildFly (formerly free JBoss), it might be of interest.
https://courses.bekwam.net/public_tutorials/bkcourse_wildfly_restful_devenv.html