[jboss-remoting-commits] JBoss Remoting SVN: r6334 - in remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src: tests/org/jboss/test/remoting/transport/bisocket/dos and 1 other directory.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Mon Apr 25 11:34:52 EDT 2011


Author: jbertram at redhat.com
Date: 2011-04-25 11:34:52 -0400 (Mon, 25 Apr 2011)
New Revision: 6334

Modified:
   remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/main/org/jboss/remoting/transport/bisocket/
   remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/main/org/jboss/remoting/transport/bisocket/Bisocket.java
   remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/main/org/jboss/remoting/transport/bisocket/BisocketServerInvoker.java
   remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/tests/org/jboss/test/remoting/transport/bisocket/dos/
   remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/tests/org/jboss/test/remoting/transport/bisocket/dos/DosTestCase.java
Log:
JBPAPP-6352


Property changes on: remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/main/org/jboss/remoting/transport/bisocket
___________________________________________________________________
Added: svn:mergeinfo
   + /remoting2/branches/2.2/src/main/org/jboss/remoting/transport/bisocket:6272-6273

Modified: remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/main/org/jboss/remoting/transport/bisocket/Bisocket.java
===================================================================
--- remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/main/org/jboss/remoting/transport/bisocket/Bisocket.java	2011-04-25 14:48:31 UTC (rev 6333)
+++ remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/main/org/jboss/remoting/transport/bisocket/Bisocket.java	2011-04-25 15:34:52 UTC (rev 6334)
@@ -78,11 +78,11 @@
    public static final String SECONDARY_CONNECT_PORT = "secondaryConnectPort";
 
    /**
-    * Configuration keys and default valuesfor parameters related to DOS attack
+    * Configuration keys and default values for parameters related to DOS attack
     * on BisocketServerInvoker.SecondaryServerSocketThread
     */
-   public static final String DOS_MAX_THREADS = "dosMaxThreads";
-   public static final String DOS_TIMEOUT = "dosTimeout";
-   public static final int DOS_MAX_THREADS_DEFAULT = 50;
-   public static final int DOS_TIMEOUT_DEFAULT = 60;
+   public static final String SECONDARY_MAX_THREADS = "secondaryMaxThreads";
+   public static final String SECONDARY_TIMEOUT = "secondaryTimeout";
+   public static final int SECONDARY_MAX_THREADS_DEFAULT = 50;
+   public static final int SECONDARY_TIMEOUT_DEFAULT = 60000;
 }

Modified: remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/main/org/jboss/remoting/transport/bisocket/BisocketServerInvoker.java
===================================================================
--- remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/main/org/jboss/remoting/transport/bisocket/BisocketServerInvoker.java	2011-04-25 14:48:31 UTC (rev 6333)
+++ remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/main/org/jboss/remoting/transport/bisocket/BisocketServerInvoker.java	2011-04-25 15:34:52 UTC (rev 6334)
@@ -87,8 +87,8 @@
    protected boolean isCallbackServer = false;
    protected int secondaryBindPort = -1;
    protected int secondaryConnectPort = -1;
-   protected int dosMaxThreads = Bisocket.DOS_MAX_THREADS_DEFAULT;
-   protected int dosTimeout = Bisocket.DOS_TIMEOUT_DEFAULT;
+   protected int dosMaxThreads = Bisocket.SECONDARY_MAX_THREADS_DEFAULT;
+   protected int dosTimeout = Bisocket.SECONDARY_TIMEOUT_DEFAULT;
 
 
    public static BisocketServerInvoker getBisocketServerInvoker(String listenerId)
@@ -539,7 +539,7 @@
          log.warn("\"" + Bisocket.SECONDARY_CONNECT_PORT + "\" must be specified as a String");
       }
       
-      o = configuration.get(Bisocket.DOS_MAX_THREADS);
+      o = configuration.get(Bisocket.SECONDARY_MAX_THREADS);
       if (o instanceof String && ((String) o).length() > 0)
       {
             try
@@ -549,15 +549,15 @@
             }
             catch (NumberFormatException e)
             {
-               log.warn("Invalid format for " + "\"" + Bisocket.DOS_MAX_THREADS + "\": " + o);
+               log.warn("Invalid format for " + "\"" + Bisocket.SECONDARY_MAX_THREADS + "\": " + o);
             }
       }
       else if (o != null)
       {
-         log.warn("\"" + Bisocket.DOS_MAX_THREADS + "\" must be specified as a String");
+         log.warn("\"" + Bisocket.SECONDARY_MAX_THREADS + "\" must be specified as a String");
       }
       
-      o = configuration.get(Bisocket.DOS_TIMEOUT);
+      o = configuration.get(Bisocket.SECONDARY_TIMEOUT);
       if (o instanceof String && ((String) o).length() > 0)
       {
             try
@@ -567,12 +567,12 @@
             }
             catch (NumberFormatException e)
             {
-               log.warn("Invalid format for " + "\"" + Bisocket.DOS_TIMEOUT + "\": " + o);
+               log.warn("Invalid format for " + "\"" + Bisocket.SECONDARY_TIMEOUT + "\": " + o);
             }
       }
       else if (o != null)
       {
-         log.warn("\"" + Bisocket.DOS_TIMEOUT + "\" must be specified as a String");
+         log.warn("\"" + Bisocket.SECONDARY_TIMEOUT + "\" must be specified as a String");
       }
       
       if (isCallbackServer)


Property changes on: remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/tests/org/jboss/test/remoting/transport/bisocket/dos
___________________________________________________________________
Added: svn:mergeinfo
   + /remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/dos:6271

Modified: remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/tests/org/jboss/test/remoting/transport/bisocket/dos/DosTestCase.java
===================================================================
--- remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/tests/org/jboss/test/remoting/transport/bisocket/dos/DosTestCase.java	2011-04-25 14:48:31 UTC (rev 6333)
+++ remoting2/branches/2.2.3-SP1_JBREM-1269_JBREM-1275_JBREM-1261_JBREM-1277_JBREM-1280_JBREM-1281/src/tests/org/jboss/test/remoting/transport/bisocket/dos/DosTestCase.java	2011-04-25 15:34:52 UTC (rev 6334)
@@ -215,7 +215,7 @@
    public void testConfigurationDefault() throws Throwable
    {
       log.info("entering " + getName());
-      doConfigurationTest(false, false, Integer.valueOf(Bisocket.DOS_MAX_THREADS_DEFAULT).intValue(), Integer.valueOf(Bisocket.DOS_TIMEOUT_DEFAULT).intValue());
+      doConfigurationTest(false, false, Bisocket.SECONDARY_MAX_THREADS_DEFAULT, Bisocket.SECONDARY_TIMEOUT_DEFAULT);
       log.info(getName() + " PASSES");
    }
 
@@ -325,13 +325,13 @@
       {
          if (useInvokerLocator)
          {
-            locatorURI += "&" + Bisocket.DOS_MAX_THREADS + "=" + Integer.toString(dosMaxThreadsValue);
-            locatorURI += "&" + Bisocket.DOS_TIMEOUT + "=" + Integer.toString(dosTimeoutValue);
+            locatorURI += "&" + Bisocket.SECONDARY_MAX_THREADS + "=" + Integer.toString(dosMaxThreadsValue);
+            locatorURI += "&" + Bisocket.SECONDARY_TIMEOUT + "=" + Integer.toString(dosTimeoutValue);
          }
          else
          {
-            config.put(Bisocket.DOS_MAX_THREADS, Integer.toString(dosMaxThreadsValue));
-            config.put(Bisocket.DOS_TIMEOUT, Integer.toString(dosTimeoutValue));
+            config.put(Bisocket.SECONDARY_MAX_THREADS, Integer.toString(dosMaxThreadsValue));
+            config.put(Bisocket.SECONDARY_TIMEOUT, Integer.toString(dosTimeoutValue));
          }
       }
       serverLocator = new InvokerLocator(locatorURI);



More information about the jboss-remoting-commits mailing list