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

Brian Stansberry brian.stansberry at jboss.com
Sun Aug 13 16:10:09 EDT 2006


  User: bstansberry
  Date: 06/08/13 16:10:09

  Modified:    src/org/jboss/cache/aop    Tag: Branch_JBossCache_1_4_0_MUX
                        TreeCacheAopDelegate.java CachedType.java
                        PojoTxSynchronizationHandler.java
  Log:
  Update to 1.4.0.SP1
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.74.4.3  +12 -6     JBossCache/src/org/jboss/cache/aop/TreeCacheAopDelegate.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCacheAopDelegate.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/aop/TreeCacheAopDelegate.java,v
  retrieving revision 1.74.4.2
  retrieving revision 1.74.4.3
  diff -u -b -r1.74.4.2 -r1.74.4.3
  --- TreeCacheAopDelegate.java	21 Jul 2006 02:51:29 -0000	1.74.4.2
  +++ TreeCacheAopDelegate.java	13 Aug 2006 20:10:09 -0000	1.74.4.3
  @@ -15,6 +15,7 @@
   import org.jboss.cache.marshall.MethodCallFactory;
   import org.jboss.cache.marshall.MethodDeclarations;
   import org.jboss.cache.aop.util.AopUtil;
  +import org.jboss.cache.aop.util.SecurityActions;
   import org.jboss.cache.aop.collection.AbstractCollectionInterceptor;
   import org.jboss.cache.aop.references.FieldPersistentReference;
   import org.jboss.cache.Fqn;
  @@ -26,6 +27,7 @@
   import org.jgroups.blocks.MethodCall;
   
   import java.lang.reflect.Field;
  +import java.lang.reflect.Constructor;
   import java.util.Map;
   import java.util.HashMap;
   import java.util.Iterator;
  @@ -122,7 +124,9 @@
   
         if (Advised.class.isAssignableFrom(clazz)) {
            try {
  -            obj = clazz.newInstance();
  +            Constructor ctr = clazz.getDeclaredConstructor(null);
  +            SecurityActions.setAccessible(ctr);
  +            obj = ctr.newInstance(null);
               // TODO Need to populate the object from the cache as well.
            }
            catch(Exception e) {
  @@ -412,6 +416,7 @@
         Map subPojoMap = new HashMap();
         boolean hasFieldAnnotation = hasAnnotation(obj.getClass(), ((Advised)obj)._getAdvisor(), type);
   
  +      boolean todo = false;
         for (Iterator i = type.getFieldsIterator(); i.hasNext();) {
            Field field = (Field) i.next();
            Object value = null;
  @@ -422,11 +427,6 @@
               throw new CacheException("field access failed", e);
            }
            CachedType fieldType = cache_.getCachedType(field.getType());
  -         // check for non-replicatable types
  -         if(CachedType.isPrimitiveNonReplicatable(field))
  -         {
  -            continue;
  -         }
   
            if(hasFieldAnnotation)
            {
  @@ -436,6 +436,12 @@
               }
            }
   
  +         // check for non-replicatable types
  +         if(CachedType.isPrimitiveNonReplicatable(field))
  +         {
  +            continue;
  +         }
  +
            // we simply treat field that has @Serializable as a primitive type.
            if (fieldType.isImmediate() ||
                    (hasFieldAnnotation &&
  
  
  
  1.9.4.2   +0 -0      JBossCache/src/org/jboss/cache/aop/CachedType.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CachedType.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/aop/CachedType.java,v
  retrieving revision 1.9.4.1
  retrieving revision 1.9.4.2
  diff -u -b -r1.9.4.1 -r1.9.4.2
  --- CachedType.java	21 Jul 2006 02:51:29 -0000	1.9.4.1
  +++ CachedType.java	13 Aug 2006 20:10:09 -0000	1.9.4.2
  @@ -393,7 +393,7 @@
       * that
       * 
       * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
  -    * @version $Id: CachedType.java,v 1.9.4.1 2006/07/21 02:51:29 bstansberry Exp $
  +    * @version $Id: CachedType.java,v 1.9.4.2 2006/08/13 20:10:09 bstansberry Exp $
       */
      private class FieldsIterator implements Iterator
      {
  
  
  
  1.1.4.2   +0 -0      JBossCache/src/org/jboss/cache/aop/PojoTxSynchronizationHandler.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: PojoTxSynchronizationHandler.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/aop/PojoTxSynchronizationHandler.java,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -b -r1.1.4.1 -r1.1.4.2
  --- PojoTxSynchronizationHandler.java	21 Jul 2006 02:51:29 -0000	1.1.4.1
  +++ PojoTxSynchronizationHandler.java	13 Aug 2006 20:10:09 -0000	1.1.4.2
  @@ -21,7 +21,7 @@
    * Handling the rollback operation for PojoCache level, specifically interceptor add/remove, etc.
    *
    * @author Ben Wang
  - * @version $Id: PojoTxSynchronizationHandler.java,v 1.1.4.1 2006/07/21 02:51:29 bstansberry Exp $
  + * @version $Id: PojoTxSynchronizationHandler.java,v 1.1.4.2 2006/08/13 20:10:09 bstansberry Exp $
    */
   
   public class PojoTxSynchronizationHandler implements Synchronization {
  
  
  



More information about the jboss-cvs-commits mailing list