0 Replies Latest reply on Aug 17, 2012 5:37 PM by kgoedert

    sticky session not working?

    kgoedert

      Hi

       

      I have an app using jsf 2 + seam 3 + cdi in a jboss 6.1. All my beans in the app are viewScoped except for one that keeps the authenticated user, that is session scoped. When not running in cluster, everything works. But when I try to cluster, sessions don't seem to be sticky. I checked the configuration and sticky session is true. I followed this guide to setup apache mod_jk as the load balancer and jboss nodes. http://docs.jboss.org/jbossclustering/cluster_guide/5.1/html/clustering-http.html#clustering-http-modjk

       

      I suspect that the sessions are not sticky, because looking at the logs, I see one of the nodes receiving for example the request for a database search. It works. When I try to click in one of the elements of the search result I get a viewExpiredException that is show on the log of the other node. So I presume that the apache configuration for load balancing is working.

       

      The point of being sticky is to keep every request to the same node, right? And while in cluster if I enable a check that happens on a pre render view event that checks if the user is authenticated, then most of the times I am considered not authenticaded. Being this bean that handles the login, a session scoped one, I suppose this should not happen.

       

      So, is there anything else to make the session replication work? Some app configuration or a jboss one that is not on the mentioned docs? Are the view scoped beans able to work in a clustered environment?

       

      Appreciate any help

       

      Kelly