[jboss-cvs] JBoss Messaging SVN: r1860 - trunk/src/main/org/jboss/jms/client/container
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Dec 27 13:12:52 EST 2006
Author: clebert.suconic at jboss.com
Date: 2006-12-27 13:12:50 -0500 (Wed, 27 Dec 2006)
New Revision: 1860
Modified:
trunk/src/main/org/jboss/jms/client/container/HAAspect.java
Log:
adding attribute to enable/disable the valve
Modified: trunk/src/main/org/jboss/jms/client/container/HAAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/HAAspect.java 2006-12-24 23:01:01 UTC (rev 1859)
+++ trunk/src/main/org/jboss/jms/client/container/HAAspect.java 2006-12-27 18:12:50 UTC (rev 1860)
@@ -84,8 +84,11 @@
public static final int MAX_RECONNECT_HOP_COUNT = 10;
- public static final int MAX_IO_RETRY_COUNT = 10;
+ public static final int MAX_IO_RETRY_COUNT = 2;
+ // Setting this attribute to false will disable the valve
+ public static final boolean INSTALL_VALVE = false;
+
// Static --------------------------------------------------------
private static boolean trace = log.isTraceEnabled();
@@ -164,11 +167,17 @@
ClientConnectionDelegate cd = (ClientConnectionDelegate)res.getDelegate();
- ((ConnectionState) ((DelegateSupport) cd).getState()).
- getRemotingConnectionListener().addDelegateListener(new ConnectionFailureListener(cd));
+ // TODO: The valve is optional for now
+ if (INSTALL_VALVE)
+ {
+ installValveAspect(cd, new ValveAspect(cd, this));
+ }
+ else
+ {
+ ((ConnectionState) ((DelegateSupport) cd).getState()).
+ getRemotingConnectionListener().addDelegateListener(new ConnectionFailureListener(cd));
+ }
- //installValveAspect(cd, new ValveAspect(cd, this));
-
if(trace) { log.trace(this + " got local connection delegate " + cd); }
// Add a connection listener to detect failure; the consolidated remoting connection listener
More information about the jboss-cvs-commits
mailing list