Author: steve.ebersole(a)jboss.com
Date: 2007-11-02 12:17:07 -0400 (Fri, 02 Nov 2007)
New Revision: 14182
Modified:
core/branches/Branch_3_2/src/org/hibernate/id/enhanced/OptimizerFactory.java
Log:
HHH-2928 : synchronize enhanced id gen optimizers
Modified: core/branches/Branch_3_2/src/org/hibernate/id/enhanced/OptimizerFactory.java
===================================================================
---
core/branches/Branch_3_2/src/org/hibernate/id/enhanced/OptimizerFactory.java 2007-11-02
16:11:43 UTC (rev 14181)
+++
core/branches/Branch_3_2/src/org/hibernate/id/enhanced/OptimizerFactory.java 2007-11-02
16:17:07 UTC (rev 14182)
@@ -120,7 +120,7 @@
}
}
- public Serializable generate(AccessCallback callback) {
+ public synchronized Serializable generate(AccessCallback callback) {
if ( lastSourceValue < 0 ) {
lastSourceValue = callback.getNextValue();
while ( lastSourceValue <= 0 ) {
@@ -168,7 +168,7 @@
}
}
- public Serializable generate(AccessCallback callback) {
+ public synchronized Serializable generate(AccessCallback callback) {
if ( hiValue < 0 ) {
value = callback.getNextValue();
if ( value < 1 ) {
Show replies by date