[jboss-cvs] JBossAS SVN: r68868 - projects/cluster/varia/sessionstress.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jan 11 03:45:50 EST 2008


Author: bela at jboss.com
Date: 2008-01-11 03:45:50 -0500 (Fri, 11 Jan 2008)
New Revision: 68868

Modified:
   projects/cluster/varia/sessionstress/PerfTest.java
Log:
ns

Modified: projects/cluster/varia/sessionstress/PerfTest.java
===================================================================
--- projects/cluster/varia/sessionstress/PerfTest.java	2008-01-11 08:27:04 UTC (rev 68867)
+++ projects/cluster/varia/sessionstress/PerfTest.java	2008-01-11 08:45:50 UTC (rev 68868)
@@ -10,6 +10,7 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import java.io.InputStream;
 import java.text.NumberFormat;
 import java.util.concurrent.BrokenBarrierException;
 import java.util.concurrent.CyclicBarrier;
@@ -345,17 +346,37 @@
             }
         }
         
+//        private int executeRequest(GetMethod method) throws IOException {
+//            try {
+//                int rc = session.executeMethod(method);
+//               method.getResponseBody();
+//               return rc;
+//           }
+//           finally {
+//               method.releaseConnection();
+//           }
+//        }
+
+
         private int executeRequest(GetMethod method) throws IOException {
             try {
                 int rc = session.executeMethod(method);
-               method.getResponseBody();           
-               return rc;
-           }
-           finally {
-               method.releaseConnection();
-           }
+                // method.getResponseBody();
+
+                InputStream input=method.getResponseBodyAsStream();
+                byte[] buffer = new byte[4096];
+                while ((input.read(buffer)) > 0) {
+                    ;
+                }
+                return rc;
+            }
+            finally {
+                method.releaseConnection();
+            }
         }
 
+
+
         private static void log(String msg) {
             System.out.println("[thread-" + Thread.currentThread().getId() + "]: " + msg);
         }




More information about the jboss-cvs-commits mailing list