-
1. Re: Active/passive configuration
lepe Jun 19, 2006 12:16 PM (in response to vzilka)http://tomcat.apache.org/connectors-doc/howto/workers.html
Look for disabled and redirect properties.
/L -
2. Re: Active/passive configuration
vzilka Jun 29, 2006 8:52 AM (in response to vzilka)10x, but what I ment was EJB clustering. The web machine needs to activate an EJB, and the 2 EJB machines should be configured active/passive
-
3. Re: Active/passive configuration
brian.stansberry Jun 29, 2006 4:13 PM (in response to vzilka)You'd need to write a custom load balance policy that always picked the first server from the list of targets and then stuck to it. See the code for org.jboss.ha.framework.interfaces.FirstAvailable -- change the part where it using a Random to pick the target.
You'd also have to make sure your active server was completely started before starting the passive. That way the active one would be the first target.
This is kind of a quick-and-dirty approach; with thought maybe you can come up with something more elegant.
Another point -- if you use the PooledInvoker instead of the JRMPInvoker, the targets the load balancer works on are of type ServerAddress. That class exposes the address of the host it connects to. A custom load balance policy could potentially make use of that info (e.g. check a system property for a "preferred" active host, and access that if its available, otherwise choose a passive host from the remaining targets).