We have a Seam app deployed to a two node JBoss cluster. During our failover testing, we noticed the following problem. Since three seem not be any related issues in JIRA, I report it here first.
Setup: 1. two nodes (node1, node2) 2. load balancing/failover by Apache with mod_jk 3. sticky sessions 4. session replication confirmed to work for http session and SFSB (by JBoss trace log) 5. shared database
Steps to reproduce: 1. login to app, go to same page backed by a SFSB, start new conversation 2. enter some data (saved in SFSB fields) 3. stop JBoss on node1 gracefully (shutdown.sh) 4. click submit 5. NoSuchEJBException: "Could not find stateful bean: 4sv1g5o-jqzric-fhyhsk09-1-fhyhunhd-9"
It seems that SeamListener.sessionDestroyed calls ServletLifecycle.endSession, which in turn destroys all conversations and calls the @Destroy method on SFSB's. So even though session is properly replicated you get no failover.
The next request, creates a new SFSB/conversation and it works as expected from there. Note that if I kill -s 9 JBoss, SFSB's are not removed and failover works as expected.