commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh Balamohan" <rajesh.balamo...@gmail.com>
Subject BeanUtils.copyProperties synchronization problem - Performance
Date Mon, 21 Apr 2008 11:03:10 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message