Hello we are using WildFly for a wile in our application. In our application, we opens a port on the server and client(s) connects to it. The problem with this approach is that we've to add an exception to the firewall on the server machine which most clients do not like.
I'm aware that WildFly is using port multiplexing to handle different protocols. For example, web and ejb communication both uses port 8080.
I want to use the existing feature of port-multiplexing of WildFly to listen on port 8080, without opening our separate port.
How can I achieve the same.
What you are looking for is http upgrade mechanism.
Which can either be done by servlet api https://weblogs.java.net/blog/swchan2/archive/2013/05/07/protocol-upgrade-servlet-31-example
or by undertow's native http handler api http://undertow.io/documentation/core/undertow-handler-guide.html