-
1. Re: Implementing node affinity for a stateless session bean
fredrikbromee Feb 25, 2005 9:42 AM (in response to plindsay)If I understand your question correctly, it would be OK if the session bean were deployed on all nodes but only was called on one of the nodes.
One way to do this in JBoss would be like you did in WLS, to use a custom load balancer that dispatches all requests to the bean to one of the nodes as long as that node is alive.
Another way might be to do it as a remote-enabled HA singleton service. A clustered singleton service is deployed on all nodes in a cluster but only runs on one of them - the master node. When the master node fails a new master is elected among the remaining nodes. This is the kind of functionality you're looking for, right?
In our setup we use HA singleton services as timed services triggered by time (do this every three hours, do this every day before midnight etc). However this thread http://www.jboss.org/index.html?module=bb&op=viewtopic&t=55794
shows how an HA singleton service can be remotely called just like any session bean.
Hope this helps,
/Fredrik