are you using mod_jk for load balancing (round robin), sticky sessions and failover? JBoss has mod_cluster which is an improved mod_jk. I wrote this clustering setup doc for JBoss 4.2.x and Windows: http://community.jboss.org/message/215073#215073. HTH.
I am currently using modjk. I will gladly switch to modcluster.
I guess I'm more trying to figure out how to cluster the application, so that signing onto one node will sign the user onto other nodes. Is that possible?
You are outjecting a session-scoped Account instance which presumably is authentication related. Make sure session replication is turned on in your cluster config. I believe JBoss replicates session-state in HttpSession after each public interface method call (although I believe this is configurable as well, read the JBoss docs on this). In case of failover for a node, then your Account should already be available in the backup JBoss node for that session (seamless failover).
In Section 1.5.3, 'Configure worker nodes in mod_jk', we covered how to use sticky sessions to make sure that a client in a session always hits the same server node in order to maintain the session state. However, that is not an ideal solution. The load might be unevenly distributed over the nodes over time and if a node goes down, all its session data is lost. A better and more reliable solution is to replicate session data across all nodes in the cluster. This way, the client can hit any server node and obtain the same session states.
Thanks for your help with this Arbi.
According to the Jboss AS 5.1 documentation, as per my understand of it anyway, all I need to do to enable http session replication is to add <distributable/> to my web.xml...which I have done. According to Seam I need to add <core:init distributable="true"/> to components.xml.
Account is a persistence entity, and it is serializable. I am Outjecting an instance of that as userSessionAccount when the user authenticates.
I'm probably missing something simple...I just can't seem to figure out what.
I also tried enabling
and that didnt seem to help.
I'm now just running the Seam Booking example...and that doesnt seem to work either. If I log in on one server, and switch to the other server, I will not be authenticated.
How do you switch to the other server? You need to access Apache, login, check the logs to see which server you accessed (or the session cookie), kill that server's JBoss, then try to access some page requiring authentication. If you are not prompted for login, it worked. If you do, there is something wrong with your setup. For failover to work you need to do some setup at both nodes as well (set node names, etc.), do check the docs once again.
Yup...I'm a moron. I had miss configured Mod JK (Taken a node out for testing, and forgot to put it back in). This is now working perfectly. Thanks all for your help!
I am testing seam's booking example with Jboss 5.1 for clustering and session failover. I am facing the same problem as you mention in this thread. Can you please share the steps that you followed to make it working? Do we have to use Mod JK. I was not able to find the instruction for configuring Mod JK while working with seam examples.
Also, were you able to find Category: jboss.cache : Entry: service:TomcatClusteringCache in jmx-console ?