[wsas-java-dev] svn commit r9718 - branches/wsas/java/2.1/commons/throttle/src/main/java/org/wso2/throttle/module

svn at wso2.org svn at wso2.org
Mon Nov 12 22:25:05 PST 2007


Author: indika
Date: Mon Nov 12 22:25:02 2007
New Revision: 9718

Modified:
   branches/wsas/java/2.1/commons/throttle/src/main/java/org/wso2/throttle/module/ThrottleModule.java
Log:
some fixes for deploying module in a cluster 


Modified: branches/wsas/java/2.1/commons/throttle/src/main/java/org/wso2/throttle/module/ThrottleModule.java
==============================================================================
--- branches/wsas/java/2.1/commons/throttle/src/main/java/org/wso2/throttle/module/ThrottleModule.java	(original)
+++ branches/wsas/java/2.1/commons/throttle/src/main/java/org/wso2/throttle/module/ThrottleModule.java	Mon Nov 12 22:25:02 2007
@@ -82,7 +82,9 @@
                         throttles = new HashMap();
                         configctx.setProperty(ThrottleConstants.THROTTLES_MAP, throttles);
                     }
-                    throttles.put(ThrottleConstants.GLOBAL_IP_BASED_THROTTLE_KEY, throttle);
+                    if (!throttles.containsKey(ThrottleConstants.GLOBAL_IP_BASED_THROTTLE_KEY)) {
+                        throttles.put(ThrottleConstants.GLOBAL_IP_BASED_THROTTLE_KEY, throttle);
+                    }
                 }
             }
         }
@@ -125,7 +127,9 @@
                         throttles = new HashMap();
                         configctx.setProperty(ThrottleConstants.THROTTLES_MAP, throttles);
                     }
-                    throttles.put(currentService.getName(), throttle);
+                    if (!throttles.containsKey(currentService.getName())) {
+                        throttles.put(currentService.getName(), throttle);
+                    }
                 }
             }
         } else if (axisDescription instanceof AxisOperation) {
@@ -163,7 +167,9 @@
                         throttles = new HashMap();
                         configctx.setProperty(ThrottleConstants.THROTTLES_MAP, throttles);
                     }
-                    throttles.put(currentServiceName + currentOperation.getName(), throttle);
+                    if (!throttles.containsKey(currentServiceName + currentOperation.getName())) {
+                        throttles.put(currentServiceName + currentOperation.getName(), throttle);
+                    }
                 }
             }
         }




More information about the Wsas-java-dev mailing list