2 Replies Latest reply on Nov 27, 2006 11:02 AM by timfox

    Failover logic in ClusteredConnectionFactoryDelegate

    timfox

      I notice that quite a bit of the failover logic has ended up in the ClusteredConnectionFactoryDelegate class.

      The idea with the client aop stack is all the logic - including the failover logic should be in a set of aspects and the actual delegate classes should be as dumb and thin as possible.

      So this logic should really be in a FailoverAspect, or something similar.

        • 1. Re: Failover logic in ClusteredConnectionFactoryDelegate
          clebert.suconic

          ClusteredConnectionFactoryDelegate is the class responsible for LoadBallancing ConnectionFactories.

          The only failover logic on it is the handleConnectionException which is just recreating the connection and calling ClientConnectionDelegate::failOver.

          When we start to listen exceptions on other interceptors I might refactor this.

          • 2. Re: Failover logic in ClusteredConnectionFactoryDelegate
            timfox

            There is quite a lot of logic in there.

            There is the load balancing policy - which is currently hardcoded to be round robin - needs to be separated out and made pluggable.

            As I say, this should be in an aspect. If we don't do it now, it will probably never get done and the code will drift into an unmaintainable mess.