Beginner |
 |
Joined: Sun Nov 07, 2004 4:19 pm Posts: 38
|
[b]Hibernate version:[/b]
3.0.2
This is more of a thready saftey question. In class org.hibernate.stat.StatisticsImpl, I noticed that synchronized is being used to update values but not when getting values. E.g
public synchronized void connect() {
connectCount++;
}
public long getConnectCount() {
return connectCount;
}
From my understanding of threading, this is not correct thready safety code. This is especially true when values are being accessed via MBeans. Comments?
Dino
|
|