[jboss-cvs] JBossCache/src/org/jboss/cache/eviction ...

Elias Ross genman at noderunner.net
Thu Jan 25 16:54:04 EST 2007


  User: genman  
  Date: 07/01/25 16:54:04

  Modified:    src/org/jboss/cache/eviction  BaseEvictionAlgorithm.java
  Log:
  JBCACHE-952 -  Replace calls to Throwable.printStackTace with logging
  
  Revision  Changes    Path
  1.20      +11 -11    JBossCache/src/org/jboss/cache/eviction/BaseEvictionAlgorithm.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BaseEvictionAlgorithm.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/eviction/BaseEvictionAlgorithm.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- BaseEvictionAlgorithm.java	20 Dec 2006 02:16:24 -0000	1.19
  +++ BaseEvictionAlgorithm.java	25 Jan 2007 21:54:04 -0000	1.20
  @@ -23,7 +23,7 @@
    * abstract methods and a policy.
    *
    * @author Daniel Huang - dhuang at jboss.org 10/2005
  - * @version $Revision: 1.19 $
  + * @version $Revision: 1.20 $
    */
   public abstract class BaseEvictionAlgorithm implements EvictionAlgorithm
   {
  @@ -208,21 +208,21 @@
         {
            log.trace("Attempting to evict cache node with fqn of " + fqn);
         }
  -      EvictionPolicy policy = region.getEvictionPolicy();
  -      // Do an eviction of this node
   
  +      EvictionPolicy policy = region.getEvictionPolicy();
         try
         {
            policy.evict(fqn);
         }
  -      catch (Exception e)
  +      catch (TimeoutException e)
         {
  -         if (e instanceof TimeoutException)
  -         {
  -            log.warn("eviction of " + fqn + " timed out. Will retry later.");
  +         log.warn("Eviction of " + fqn + " timed out, retrying later");
  +         log.debug(e, e);
               return false;
            }
  -         e.printStackTrace();
  +      catch (Exception e)
  +      {
  +         log.error("Eviction of " + fqn + " failed", e);
            return false;
         }
   
  @@ -446,7 +446,7 @@
            }
            catch (InterruptedException e)
            {
  -            e.printStackTrace();
  +            log.debug(e, e);
               break;
            }
   
  @@ -473,7 +473,7 @@
               }
               catch (InterruptedException e)
               {
  -               e.printStackTrace();
  +               log.debug(e, e);
               }
               break;
            }
  
  
  



More information about the jboss-cvs-commits mailing list