[jboss-cvs] JBossCache/src/org/jboss/cache/pojo/impl ...

Jason Thomas Greene jgreene at jboss.com
Thu Jun 7 01:50:20 EDT 2007


  User: jgreene 
  Date: 07/06/07 01:50:20

  Modified:    src/org/jboss/cache/pojo/impl  CacheListenerAdaptor.java
  Log:
  Add more thorough test coverage of notifications
  
  Revision  Changes    Path
  1.3       +19 -13    JBossCache/src/org/jboss/cache/pojo/impl/CacheListenerAdaptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheListenerAdaptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/impl/CacheListenerAdaptor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- CacheListenerAdaptor.java	31 May 2007 19:11:06 -0000	1.2
  +++ CacheListenerAdaptor.java	7 Jun 2007 05:50:20 -0000	1.3
  @@ -33,6 +33,8 @@
   import java.util.Set;
   import java.util.regex.Pattern;
   
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   import org.jboss.cache.AbstractCacheListener;
   import org.jboss.cache.Fqn;
   import org.jboss.cache.pojo.PojoCache;
  @@ -47,7 +49,7 @@
   import org.jboss.cache.pojo.notification.NotificationContext;
   import org.jboss.cache.pojo.notification.SetModifyNotification;
   
  -// $Id: CacheListenerAdaptor.java,v 1.2 2007/05/31 19:11:06 jgreene Exp $
  +// $Id: CacheListenerAdaptor.java,v 1.3 2007/06/07 05:50:20 jgreene Exp $
   
   /**
    * Adapts the core cache listener API into the POJO listener API.
  @@ -57,9 +59,12 @@
   public class CacheListenerAdaptor extends AbstractCacheListener implements NotificationContext
   {
      private static final HashSet<String> internalKeys = new HashSet<String>();
  +   private static final Log log = LogFactory.getLog(CacheListenerAdaptor.class);
  +
      static
      {
         internalKeys.add(POJOCACHE_STATUS);
  +      internalKeys.add(POJOCACHE_OPERATION);
         internalKeys.add(PojoInstance.KEY);
         internalKeys.add(PojoReference.KEY);
         internalKeys.add(PojoTxLockInterceptor.LOCK_KEY);
  @@ -91,7 +96,8 @@
         }
         catch (NoSuchFieldException e)
         {
  -         System.err.println("Could not get field " + key + " on class " + o.getClass());
  +         if (log.isWarnEnabled())
  +            log.warn("Could not get field " + key + " on class " + o.getClass());
            return null;
         }
      
  
  
  



More information about the jboss-cvs-commits mailing list