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,
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
View the original post :
Reply to the post :