Hi 2011/8/4 Martin Koci <[email protected]>: > Hi, > > I'm testing a view where hundreds of concurrent users are expected. I > noticed that java.beans.PropertyDescriptor.getReadMethod() is > sychronized method and many times are other threads blocked with same > lock (java.beans.PropertyDescriptor instance). Myfaces use it in > _ComponentAttributesMap: > > > <BLOCKED> java.beans.PropertyDescriptor.getReadMethod <- > javax.faces.component._ComponentAttributesMap.getComponentProperty(PropertyDescriptor)<- > javax.faces.component._ComponentAttributesMap.get(Object) > > All threads share the same java.beans.PropertyDescriptor instance. > > Very similar problem was reported by a user [1]. For this case, it seems > that weblogic "thinks" that thread is [STUCK] beacuse it was simply > blocked for too long. > > Any ideas hot to improve it? Are Method instances cacheable? For > example, Spring [2] cache them under certain circumstances. I don't know > this low level of reflection well ... >
In theory method instances are cacheable, because once initialized, it never changes. Maybe we can create a fine wrapper over the real PropertyDescriptor that cache Method instances or something like that. regards, Leonardo Uribe > > Regards, > > Kočičák > > [1] http://www.mail-archive.com/[email protected]/msg57504.html > [2] > http://javasourcecode.org/html/open-source/spring/spring-3.0.5/org/springframework/beans/CachedIntrospectionResults.java.html > >
