[jboss-cvs] jboss-profiler/java/src/expansion/org/jboss/profiler/exp/agent/interceptor ...

Takuro Okada t2-okada at nri.co.jp
Thu Feb 15 03:30:51 EST 2007


  User: tokada  
  Date: 07/02/15 03:30:51

  Modified:    java/src/expansion/org/jboss/profiler/exp/agent/interceptor  
                        Tag: JBossProfiler_Expansion
                        ServletInterceptor.java DriverWrapper.java
  Log:
  Modified an implementation concerned the thread pool.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.7   +8 -4      jboss-profiler/java/src/expansion/org/jboss/profiler/exp/agent/interceptor/Attic/ServletInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: ServletInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-profiler/java/src/expansion/org/jboss/profiler/exp/agent/interceptor/Attic/ServletInterceptor.java,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -b -r1.1.2.6 -r1.1.2.7
  --- ServletInterceptor.java	12 Dec 2006 05:40:57 -0000	1.1.2.6
  +++ ServletInterceptor.java	15 Feb 2007 08:30:51 -0000	1.1.2.7
  @@ -25,7 +25,7 @@
   import java.io.IOException;
   import java.lang.reflect.Constructor;
   import java.util.Map;
  -import java.util.concurrent.LinkedBlockingQueue;
  +import java.util.concurrent.ArrayBlockingQueue;
   import java.util.concurrent.RejectedExecutionException;
   import java.util.concurrent.ThreadPoolExecutor;
   import java.util.concurrent.TimeUnit;
  @@ -110,14 +110,18 @@
               String collectorPoolSizeString = filterConfig.getInitParameter("CollectorPoolSize");
               if(collectorPoolSizeString!=null) collectorPoolSize = Integer.valueOf(collectorPoolSizeString);
               
  -            int collectorQueueSize = Integer.MAX_VALUE;
  +            int collectorPoolMaxSize = Short.MAX_VALUE;
  +            String collectorPoolMaxSizeString = filterConfig.getInitParameter("CollectorPoolMaxSize");
  +            if(collectorPoolMaxSizeString!=null) collectorPoolMaxSize = Integer.valueOf(collectorPoolMaxSizeString);
  +            
  +            int collectorQueueSize = Short.MAX_VALUE;
               String collectorQueueSizeString = filterConfig.getInitParameter("CollectorQueueSize");
               if(collectorQueueSizeString!=null) collectorQueueSize = Integer.valueOf(collectorQueueSizeString);
               
               // In default, the executor gives priority to queuing.
  -            asyncExecutor = new ThreadPoolExecutor(1, collectorPoolSize,
  +            asyncExecutor = new ThreadPoolExecutor(collectorPoolSize, collectorPoolMaxSize,
                                                      1000L, TimeUnit.MILLISECONDS,
  -                                                   new LinkedBlockingQueue<Runnable>(collectorQueueSize));
  +                                                   new ArrayBlockingQueue<Runnable>(collectorQueueSize));
           }
           
           initialized.set(true);
  
  
  
  1.1.2.9   +8 -4      jboss-profiler/java/src/expansion/org/jboss/profiler/exp/agent/interceptor/Attic/DriverWrapper.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DriverWrapper.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-profiler/java/src/expansion/org/jboss/profiler/exp/agent/interceptor/Attic/DriverWrapper.java,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -b -r1.1.2.8 -r1.1.2.9
  --- DriverWrapper.java	12 Dec 2006 05:40:57 -0000	1.1.2.8
  +++ DriverWrapper.java	15 Feb 2007 08:30:51 -0000	1.1.2.9
  @@ -30,7 +30,7 @@
   import java.sql.SQLException;
   import java.util.Arrays;
   import java.util.Properties;
  -import java.util.concurrent.LinkedBlockingQueue;
  +import java.util.concurrent.ArrayBlockingQueue;
   import java.util.concurrent.RejectedExecutionException;
   import java.util.concurrent.ThreadPoolExecutor;
   import java.util.concurrent.TimeUnit;
  @@ -86,14 +86,18 @@
                   String collectorPoolSizeString = info.getProperty("jboss.profiler.CollectorPoolSize");
                   if(collectorPoolSizeString!=null) collectorPoolSize = Integer.valueOf(collectorPoolSizeString);
                   
  -                int collectorQueueSize = Integer.MAX_VALUE;;
  +                int collectorPoolMaxSize = Short.MAX_VALUE;
  +                String collectorPoolMaxSizeString = info.getProperty("jboss.profiler.CollectorPoolMaxSize");
  +                if(collectorPoolMaxSizeString!=null) collectorPoolMaxSize = Integer.valueOf(collectorPoolMaxSizeString);
  +                
  +                int collectorQueueSize = Short.MAX_VALUE;
                   String collectorQueueSizeString = info.getProperty("jboss.profiler.CollectorQueueSize");
                   if(collectorQueueSizeString!=null) collectorQueueSize = Integer.valueOf(collectorQueueSizeString);
                   
                   // In default, the executor gives priority to queuing.
  -                asyncExecutor = new ThreadPoolExecutor(1, collectorPoolSize,
  +                asyncExecutor = new ThreadPoolExecutor(collectorPoolSize, collectorPoolMaxSize,
                                                          1000L, TimeUnit.MILLISECONDS,
  -                                                       new LinkedBlockingQueue<Runnable>(collectorQueueSize));
  +                                                       new ArrayBlockingQueue<Runnable>(collectorQueueSize));
               }
               
               category = info.getProperty("jboss.profiler.Category", DEFAULT_CATEGORY);
  
  
  



More information about the jboss-cvs-commits mailing list