3

I read some question here some days ago that made me understand that a view scoped bean is on the session. Is this right?

I am asking because I have an jsf 2 + seam 3 + cdi app that on a single node works perfectly with the view scoped beans, and as soon as it is put on a cluster, I get one request working and the next is a view expired exception.

So, am I correct to assume that my session is not replicating correctly? On my web.xml I have the distributable tag. I am using jboss 6.1. Should I do anything else, on the app or jboss (apart from using the all context) to make it work?

Or I cannot use view scoped beans on a clustered environment?

Kelly Goedert
  • 1,027
  • 2
  • 11
  • 37
  • Just adding the load balancing is made by apache mod_jk – Kelly Goedert Aug 17 '12 at 18:43
  • Stumbled here as I'm having same issues. Although I'm trying to get fail over working when a jvm dies. Your issue is more than likely to do with sticky sessions. Most load balancers have this option. Yours is most likely hitting server 1 first and server 2 on the next request. Replication is failing however. – andyfinch Aug 20 '12 at 07:51
  • That is exactly what is happening, but I dont seem to get it working. Apache is configured for sticky sessions and so is jboss, so I am really lost here – Kelly Goedert Aug 20 '12 at 10:33
  • Might be worth checking that Cookie is set correctly with jsessionid etc on 1st request. Might also be worth checking that IP address is not dynamically changing somehow. – andyfinch Aug 20 '12 at 10:46
  • Right now I just saw a line on mod_jk log Could not find worker with name 'jk-status'. I my node names are node1, node2 – Kelly Goedert Aug 20 '12 at 11:27
  • Would you mind showing us your configuration files? – f_puras Sep 04 '12 at 09:52

0 Answers0