jvanzyl     01/06/14 07:41:59

  Modified:    src/java/org/apache/turbine/services/pool
                        TurbinePoolService.java
  Log:
  - updating service as per notes.
  
  Revision  Changes    Path
  1.12      +10 -13    
jakarta-turbine/src/java/org/apache/turbine/services/pool/TurbinePoolService.java
  
  Index: TurbinePoolService.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine/src/java/org/apache/turbine/services/pool/TurbinePoolService.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TurbinePoolService.java   2001/04/26 19:49:40     1.11
  +++ TurbinePoolService.java   2001/06/14 14:41:59     1.12
  @@ -59,17 +59,13 @@
   import java.util.Iterator;
   import java.lang.reflect.Method;
   
  -import javax.servlet.ServletConfig;
  -
  -import org.apache.velocity.runtime.configuration.Configuration;
  -
   import org.apache.turbine.util.TurbineException;
   import org.apache.turbine.util.pool.Recyclable;
   import org.apache.turbine.util.pool.ArrayCtorRecyclable;
   import org.apache.turbine.util.pool.BoundedBuffer;
   import org.apache.turbine.util.pool.ObjectInputStreamForContext;
   import org.apache.turbine.services.TurbineServices;
  -import org.apache.turbine.services.TurbineBaseService;
  +import org.apache.turbine.services.BaseService;
   import org.apache.turbine.services.InitializationException;
   import org.apache.turbine.services.factory.FactoryService;
   import org.apache.turbine.services.factory.TurbineFactoryService;
  @@ -86,7 +82,7 @@
    * a dispose method, when they are returned to the pool.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Ilkka Priha</a>
  - * @version $Id: TurbinePoolService.java,v 1.11 2001/04/26 19:49:40 ilkka Exp $
  + * @version $Id: TurbinePoolService.java,v 1.12 2001/06/14 14:41:59 jvanzyl Exp $
    */
   public class TurbinePoolService 
       extends TurbineFactoryService
  @@ -359,15 +355,16 @@
        * @param config initialization configuration.
        * @throws InitializationException if initialization fails.
        */
  -    public void init()
  +    public void init() 
           throws InitializationException
       {
  -        Configuration conf = getConfiguration();
  -        if (conf != null)
  +        if (getConfiguration() != null)
           {
               try
               {
  -                int capacity = conf.getInt(POOL_CAPACITY,DEFAULT_POOL_CAPACITY);
  +                int capacity = 
  +                    getConfiguration().getInt(POOL_CAPACITY,DEFAULT_POOL_CAPACITY);
  +                
                   if (capacity <= 0)
                   {
                       throw new IllegalArgumentException("Capacity must be >0");
  @@ -563,12 +560,12 @@
           {
               /* Check class specific capacity. */
               int capacity = poolCapacity;
  -            Configuration conf = getConfiguration();
  -            if (conf != null)
  +
  +            if (getConfiguration() != null)
               {
                   try
                   {
  -                    capacity = conf.getInt(
  +                    capacity = getConfiguration().getInt(
                           POOL_CAPACITY + '.' + className,poolCapacity);
                       if (capacity <= 0)
                       {
  
  
  

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

Reply via email to