You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Rajesh Balamohan <ra...@gmail.com> on 2008/04/21 13:03:10 UTC

BeanUtils.copyProperties synchronization problem - Performance

We heavily use apache common beanutils in our project. In some cases, it
reduces lots of code which is really great.

While performance benchmarking, we see lots of threads getting blocked on
synchronization problems. I am pasting one of the threaddump as below.

Please note that its due to the PropertyDescriptor being synchronized. I was
wondering if we have any workaround for this. Or do you folks using some
other method which has got less synchronization overhead?

Any pointers on this would be of great help.

 at
java.beans.PropertyDescriptor.getWriteMethod(PropertyDescriptor.java:220)
 - waiting to lock <0x0f1c7f08> (a java.beans.PropertyDescriptor)
 at
org.apache.commons.beanutils.PropertyUtilsBean.isWriteable(PropertyUtilsBean.java:1238)
 at
org.apache.commons.beanutils.BeanUtilsBean.copyProperties(BeanUtilsBean.java:256)
 at
org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:114)

-- 
~Rajesh.B