[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Client-side failover valve

clebert.suconic@jboss.com do-not-reply at jboss.com
Fri Dec 29 00:00:01 EST 2006


1. The Valve is an interceptor.
    I first wanted to implement it as an aspect, but then I had a problem of enabling/disabling the valve when we are calling a ClusteredCF and a non ClusteredCF. Another point also is... the Valve needs to be instantiated per connection, i.e.  All objects created after a connection will share the same instance.
    We could use ConnectionState to store the data. That was one of the questions I had on another thread but we left the discussion for later.

2. As I said on 1. ValveAspect is an interceptor. Maybe we should rename it.

I have kept is as an extension, because HAAspect is per-instance and leaves per connectionFactory, while ValveAspect is perConnection and leaves on any object created after Connection. The valve works more like a proxy.

The Valve also needs some features existent on HAAspect that's why we have the inheritance. Maybe we could merge ValveAspect into HAAspect (even I wouldn't agree, since the Valve is more like a proxy).

3. As I said on 1 and 2... The Valve is a proxy, holding any calls while failover is happening on any thread or object associated with a Connection. It's using readWriteLock to perform such feature.

Regarding the observations I will see what's going on with 2 and will change 1.


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

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



More information about the jboss-dev-forums mailing list