4 Replies Latest reply on Apr 13, 2009 7:28 AM by Kabir Khan

    Change to Advisor, EJB3 Acceptance Testing

    Andrew Rubinger Master

      The following is going into AOP, so we'll need to verify all's OK on our end (at times we hack into AOP internals):

      [kabir@~/sourcecontrol/jboss-aop/branches/Branch_2_1/subversion/aop]
      $svn diff -r87077:87081 src/main/java/org/jboss/aop/Advisor.java
      Index: src/main/java/org/jboss/aop/Advisor.java
      ===================================================================
      --- src/main/java/org/jboss/aop/Advisor.java (revision 87077)
      +++ src/main/java/org/jboss/aop/Advisor.java (revision 87081)
      @@ -82,6 +82,7 @@
       import org.jboss.metadata.spi.signature.MethodSignature;
       import org.jboss.util.NestedRuntimeException;
       import org.jboss.util.NotImplementedException;
      +import org.jboss.util.collection.ConcurrentSet;
      
       /**
       * Manages the interceptor chains of an aspect context (usually, this context is
      @@ -176,7 +177,7 @@
       /** Contains all the interceptor instances applied to this context. */
       protected HashMap<AspectDefinition, Map<String, Interceptor>> adviceInterceptors = new HashMap<AspectDefinition, Map<String, Interceptor>>();
       /** Contains all definitions of PER_INSTANCE aspects applied to this context. */
      - protected volatile CopyOnWriteArraySet<AspectDefinition> perInstanceAspectDefinitions = UnmodifiableEmptyCollections.EMPTY_COPYONWRITE_ARRAYSET;
      + protected volatile Set<AspectDefinition> perInstanceAspectDefinitions = UnmodifiableEmptyCollections.EMPTY_CONCURRENT_SET;
       /** Contains all definitions of PER_JOINPOINT scoped aspects applied to this sccontext*/
       protected volatile ConcurrentHashMap<AspectDefinition, Set<Joinpoint>> perInstanceJoinpointAspectDefinitions = UnmodifiableEmptyCollections.EMPTY_CONCURRENT_HASHMAP;
       /** The {@code java.lang.String} class */
      @@ -2079,13 +2080,13 @@
      
       protected void initPerInstanceAspectDefinitionsSet()
       {
      - if (perInstanceAspectDefinitions == UnmodifiableEmptyCollections.EMPTY_COPYONWRITE_ARRAYSET)
      + if (perInstanceAspectDefinitions == UnmodifiableEmptyCollections.EMPTY_CONCURRENT_SET)
       {
       synchronized(lazyCollectionLock)
       {
      - if (perInstanceAspectDefinitions == UnmodifiableEmptyCollections.EMPTY_COPYONWRITE_ARRAYSET)
      + if (perInstanceAspectDefinitions == UnmodifiableEmptyCollections.EMPTY_CONCURRENT_SET)
       {
      - perInstanceAspectDefinitions = new CopyOnWriteArraySet<AspectDefinition>();
      + perInstanceAspectDefinitions = new ConcurrentSet<AspectDefinition>();
       }
       }
       }


      https://jira.jboss.org/jira/browse/JBAOP-716

      S,
      ALR