4 Replies Latest reply on Jul 4, 2006 6:29 AM by kabirkhan

    Contention point in the AOP layer


      I cannot seem to be able to drive the CPU load to >85% in my Seam application stress testing. If I increase the client threads, the response time would simply increase and the CPU stays at around 85%. So, I did a thread dump, and found most HTTP threads are waiting at line 161 of class org.jboss.aop.metadata.MethodMetaData. This line is a synchronized access to a HashMap, and it is appreantly a contention point where multiple CPUs have to wait on each other.

      public class MethodMetaData implements MetaDataResolver {
      
       public synchronized Object getMethodMetaData(Method method, Object tag, Object attr) {
      
       // This is line 161:
       SimpleMetaData methodData = (SimpleMetaData)methodMetaData.get(method.toString());
      
       }
      }
      


      Clebert suggested to use a concurrent HashMap instead of the method level synchronization here. What do you guys think?