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

Ben Wang bwang at jboss.com
Wed Nov 8 03:47:23 EST 2006


  User: bwang   
  Date: 06/11/08 03:47:23

  Modified:    src-50/org/jboss/cache/pojo   InternalConstant.java
                        CachedType.java
  Log:
  1. JBCACHE-839 to allow replicating final field.
  2. JBCACHE-619 to support Enum.
  
  Revision  Changes    Path
  1.3       +1 -0      JBossCache/src-50/org/jboss/cache/pojo/InternalConstant.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: InternalConstant.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src-50/org/jboss/cache/pojo/InternalConstant.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- InternalConstant.java	9 Oct 2006 08:11:34 -0000	1.2
  +++ InternalConstant.java	8 Nov 2006 08:47:23 -0000	1.3
  @@ -22,4 +22,5 @@
      public static final String JBOSS_INTERNAL_STRING = "__JBossInternal__";
      public static final Fqn JBOSS_INTERNAL = new Fqn(JBOSS_INTERNAL_STRING);
      public static final Fqn JBOSS_INTERNAL_MAP = new Fqn(InternalConstant.JBOSS_INTERNAL, "__RefMap__");
  +   public static final String ENUM_KEY = "name";
   }
  
  
  
  1.6       +8 -8      JBossCache/src-50/org/jboss/cache/pojo/CachedType.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CachedType.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src-50/org/jboss/cache/pojo/CachedType.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- CachedType.java	1 Nov 2006 09:27:02 -0000	1.5
  +++ CachedType.java	8 Nov 2006 08:47:23 -0000	1.6
  @@ -4,6 +4,7 @@
   import org.jboss.aop.joinpoint.FieldInvocation;
   import org.jboss.cache.pojo.memory.FieldPersistentReference;
   import org.jboss.cache.pojo.memory.PersistentReference;
  +import org.jboss.cache.pojo.interceptors.PojoBeginInterceptor;
   
   import java.lang.ref.WeakReference;
   import java.lang.reflect.Field;
  @@ -265,11 +266,16 @@
          * Whenever, user trying to access these fields, it will be accessed from the in-memory version.
          */
         if (Modifier.isStatic(mods)
  -              || Modifier.isTransient(mods)
  -              || Modifier.isFinal(mods))
  +              || Modifier.isTransient(mods))
         {
            return true;
         }
  +
  +      if(!PojoBeginInterceptor.getReplicateFinalField() && Modifier.isFinal(mods))
  +      {
  +         return true;
  +      }
  +
         return false;
      }
   
  @@ -325,12 +331,6 @@
         return false;
      }
   
  -   public static boolean isNonReplicatable(FieldInvocation fieldInvocation)
  -   {
  -      return hasTransientAnnotation(fieldInvocation) || isPrimitiveNonReplicatable(fieldInvocation.getField());
  -   }
  -
  -
      /*
       * converts a get/set method to an attribute name
       */
  
  
  



More information about the jboss-cvs-commits mailing list