[jboss-cvs] JBossCache/src-50/org/jboss/cache/pojo/interceptors/dynamic ...

Ben Wang bwang at jboss.com
Wed Jan 3 03:55:37 EST 2007


  User: bwang   
  Date: 07/01/03 03:55:37

  Modified:    src-50/org/jboss/cache/pojo/interceptors/dynamic 
                        CacheFieldInterceptor.java
  Log:
  Siwtch RuntimeException to PojoCacheException inside PojoCache.
  
  Revision  Changes    Path
  1.15      +3 -2      JBossCache/src-50/org/jboss/cache/pojo/interceptors/dynamic/CacheFieldInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheFieldInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src-50/org/jboss/cache/pojo/interceptors/dynamic/CacheFieldInterceptor.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -b -r1.14 -r1.15
  --- CacheFieldInterceptor.java	31 Dec 2006 02:08:40 -0000	1.14
  +++ CacheFieldInterceptor.java	3 Jan 2007 08:55:37 -0000	1.15
  @@ -23,6 +23,7 @@
   import org.jboss.cache.pojo.PojoCacheAlreadyDetachedException;
   import org.jboss.cache.pojo.PojoInstance;
   import org.jboss.cache.pojo.PojoUtil;
  +import org.jboss.cache.pojo.PojoCacheException;
   import org.jboss.cache.pojo.impl.PojoCacheImpl;
   import org.jboss.cache.pojo.memory.FieldPersistentReference;
   import org.jboss.cache.pojo.util.AopUtil;
  @@ -224,7 +225,7 @@
            detached = true;
            Object obj = invocation.getTargetObject();
            if (!(obj instanceof Advised))
  -            throw new RuntimeException("Interception on non-advised pojo " + obj.toString());
  +            throw new PojoCacheException("Interception on non-advised pojo " + obj.toString());
   
            InstanceAdvisor advisor = ((Advised) obj)._getInstanceAdvisor();
            CacheFieldInterceptor interceptor = (CacheFieldInterceptor) AopUtil.findCacheInterceptor(advisor);
  @@ -243,7 +244,7 @@
      {
         if (this != cache_.get(fqn_, PojoInstance.KEY))
         {
  -         throw new RuntimeException("Cache inconsistency: Outdated PojoInstance");
  +         throw new PojoCacheException("Cache inconsistency: Outdated PojoInstance");
         }
      }
   
  
  
  



More information about the jboss-cvs-commits mailing list