Description
In heavy traffic , lock occurs at com.ibatis.common.beans.ClassInfo#getInstance in case of cacheEnabled = true.
It seems to be happend because of "double synchronized"
ClassInfo.java
—
private static final Map CLASS_INFO_MAP = Collections.synchronizedMap(new HashMap());
public static ClassInfo getInstance(Class clazz) {
if (cacheEnabled) {
synchronized (clazz) {
—
I think we get more concurrency to access getInstance if the synchronized clause in getInstance method is deleted.
There is no side-effect to do this.
#just created several useless ClassInfo objects