[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Failover refactoring

ovidiu.feodorov@jboss.com do-not-reply at jboss.com
Sun Dec 31 05:53:54 EST 2006


1. The clustering/failover support has been refactored as follows:

There is a new PER_INSTANCE ClusteringAspect  part of ClusteredConnectionFactory's stack, which encapsulates load balancing and failover node picking policies. Each client-side delegate is guarded by a PER_INSTANCE FailoverValveInterceptor instance. The valve is normally open. On failover, all valves under a connection are closed recursively. If there are active threads through valve on closing, the current behavior is that closeValve() waits until all active threads unwrap (I could change this if necessary). Once the valve is closed, no threads are allowed through it until is explicitly opened again. The client-side failover event (which includes operating the valves, among other things) is detected and controlled by PER_VM FailoverAspect.

2. ClientClusteredConnectionFactoryDelegate doesn't extend ClientConnectionFactoryDelegate anymore. Also, I introduced two distinct aspect stacks corresponding to clustered ConnectionFactories and non-clustered ConnectionFactories.

3. One can register a FailoverListener to a JBossConnection and so to be notified when a failover starts and ends. So far, known events are FAILURE_DETECTED, FAILOVER_STARTED, FAILOVER_COMPLETED, FAILOVER_FAILED.

4. The initialization of the AOP stack is done by a specialized component (ClientAOPStackLoader). Both ConnectionDelegate and ClusteredConnectionDelegate delegate to it. getAOPStackConfig() is not part of the ConnectionFactory interface anymore.

Some tests fail, but I will follow up on that soon.

I added a boatload of failover mop-up tasks, grouped under http://jira.jboss.org/jira/browse/JBMESSAGING-706

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997042#3997042

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997042



More information about the jboss-dev-forums mailing list