[jboss-cvs] JBoss Messaging SVN: r1851 - trunk/src/main/org/jboss/jms/client/container

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Dec 22 17:50:46 EST 2006


Author: clebert.suconic at jboss.com
Date: 2006-12-22 17:50:45 -0500 (Fri, 22 Dec 2006)
New Revision: 1851

Modified:
   trunk/src/main/org/jboss/jms/client/container/ValveAspect.java
Log:
I removed valveInstall in one of my cleanups. 
This class is not used on the main branch, but if we meant to use it, we need to install delegate on created delegates.

Modified: trunk/src/main/org/jboss/jms/client/container/ValveAspect.java
===================================================================
--- trunk/src/main/org/jboss/jms/client/container/ValveAspect.java	2006-12-22 22:03:55 UTC (rev 1850)
+++ trunk/src/main/org/jboss/jms/client/container/ValveAspect.java	2006-12-22 22:50:45 UTC (rev 1851)
@@ -92,16 +92,16 @@
       boolean failure = false;
 
       // Eventually retries in case of listed exceptions
-      for (int i = 0; i < MAX_IO_RETRY_COUNT; i++)
+      for (int invocationCount = 0; invocationCount < MAX_IO_RETRY_COUNT; invocationCount++)
       {
 
-         if (i > 0)
+         if (invocationCount > 0)
          {
-            log.info("Retrying a call " + i);
+            log.info("Retrying a call " + invocationCount);
          }
 
          // We shouldn't have any calls being made while the failover is being executed
-         if (i > 0)
+         if (invocationCount > 0)
          {
             // On retries we will use writeLocks, as the failover was already being processed
             lockValve.writeLock().acquire();
@@ -116,15 +116,20 @@
          try
          {
             returnObject = invocation.invokeNext();
+
+            if (returnObject instanceof DelegateSupport)
+            {
+               installValveAspect((DelegateSupport) returnObject, this);
+            }
          }
          catch (CannotConnectException e)
          {
-            log.error("Got an exception on HAAspect, retryCount=" + i, e);
+            log.error("Got an exception on HAAspect, retryCount=" + invocationCount, e);
             failure = true;
          }
          catch (IOException e)
          {
-            log.error("Got an exception on HAAspect, retryCount=" + i, e);
+            log.error("Got an exception on HAAspect, retryCount=" + invocationCount, e);
             failure = true;
          }
          catch (Throwable e)
@@ -134,7 +139,7 @@
          }
          finally
          {
-            if (i > 0)
+            if (invocationCount > 0)
             {
                lockValve.writeLock().release();
             }




More information about the jboss-cvs-commits mailing list