i am trying to set cluster of Wildfly 9.0.0Final standanlone servers. I am using httpd2.2. and modcluster1.2.6. before them for load balancing.
Cluster works fine until i am deploying simple war only app that can be found on link Session replication works fine. After deployment i load page put.jsp and then i kill server on which page was served. Then i go and load page get.jsp that shows me same date and hour and i know that session was saved since this request was served from other node in cluster.
After successful testing on that basic example, i started deploying my own web app. I put tag in web.xml and deployed application. It went live without a problem and i logged in my page. Now i wanted that my logged in account survives killing node that was serving and don't notice a thing. After killing serving node i got for few seconds 404, Page not found on same address, after few seconds i get back my page but session didn't remain, and i not logged in anymore, so session wasn't distributed to other nodes.
To make sure that i programmed login of user right i copied also get.jsp and put.jsp to my app and redeploy it. Same thing happened with test i did first.
My app is ear package with ejb and web package inside. Beans are all implementing Serializable and web.xml has distributable tag in it. Is there any other reason for this behaviour?
I know that my nodes sees each other and httpd also sees both nodes. There is no error in httpd log or any of nodes logs.
After building my application bit by bit from bottom, i found out that problem was with using omnifaces 2.0. in my application. Somehow omnifaces prevented session replication or destroy session and every request has new session (didn't research why to details). For problems you don't need to use omnifaces in any bean just deploying it with app is causing problems.
I upgraded omnifaces to new version 2.1. with which session replication works fine.