bloritsch    02/02/05 10:11:51

  Modified:    src/scratchpad/org/apache/avalon/excalibur/command
                        TPCThreadManager.java
  Log:
  fix nullpointerexception in CommandManager
  
  Revision  Changes    Path
  1.4       +4 -1      
jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/command/TPCThreadManager.java
  
  Index: TPCThreadManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/command/TPCThreadManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TPCThreadManager.java     4 Feb 2002 18:21:49 -0000       1.3
  +++ TPCThreadManager.java     5 Feb 2002 18:11:51 -0000       1.4
  @@ -8,6 +8,7 @@
   package org.apache.avalon.excalibur.command;
   
   import org.apache.avalon.framework.parameters.Parameters;
  +import org.apache.avalon.framework.logger.NullLogger;
   import org.apache.avalon.excalibur.concurrent.Mutex;
   import org.apache.avalon.excalibur.thread.*;
   import org.apache.avalon.excalibur.thread.impl.ResourceLimitingThreadPool;
  @@ -82,8 +83,10 @@
           int processors = Math.max( numProcessors, 1 );
           int threads = Math.max( threadsPerProcessor, 1 );
   
  -        m_threadPool = new ResourceLimitingThreadPool( "TPCThreadManager",
  +        ResourceLimitingThreadPool tpool = new ResourceLimitingThreadPool( 
"TPCThreadManager",
                   ( processors * threads ) + 1, true, true, 1000L, 10L * 1000L 
);
  +        tpool.enableLogging( new NullLogger() );
  +        m_threadPool = tpool;
   
           m_sleepTime = sleepTime;
           m_threadControl = m_threadPool.execute( this );
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to