I implemented a cluster on Payara Server with 3 Nodes (A, B & C) as Standalone Instances. I use HAproxy as load balancer and everything works fine.
I added WebSockets in my project and HAProxy switches automatically from HTTP to tunnel mode when the client request a websocket.
My problem is this : I need to retrieve websocket session regardless of connected node. For example: "I have 3 users connected to application. User 1 and User 2 are connected to the Node A. User 3 is connected to the Node B. An event occurs on the Node C that requires user 1 and 3 to be notified. But I haven't on the Node C User 1 and User 2 sessions."
I tried to use a Hazelcast distributed List to store sessions at the User connection (OnOpen method). But when I called "add" method on the list, this throws a HazelcastSerializationException because Tyrus Session Object isn't Serializable.
How can I resolve my problem?
Thanks