Even if we keep a single valve instance per connection, I see no reason to involve
remotingConnection at such low level, as you do in
| JMSRemotingConnection remotingConnection = null;
|
| try
| {
| valve.enter();
|
| // it's important to only retrieve the remotingConnection while inside
the Valve, as we
| // guarantee that no failover has happened yet
| remotingConnection = connectionState.getRemotingConnection();
| return invocation.invokeNext();
| }
| catch (CannotConnectException e)
| {
| log.warn("We got a CannotConnectionException and we are trying a
failover", e);
|
((ConnectionDelegate)connectionState.getDelegate()).performFailover(remotingConnection);
| return invocation.invokeNext();
|
| }
| catch (IOException e)
| {
| log.warn("We got an IOException and we are trying a failover", e);
|
((ConnectionDelegate)connectionState.getDelegate()).performFailover(remotingConnection);
| return invocation.invokeNext();
| }
Why don't we just message the connection: "there's failure, deal with
it!".
The connection has access to the proper remoting connection instance, why does it need to
receive as an argument of the call?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999282#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...