Author: steve.ebersole(a)jboss.com
Date: 2007-11-02 12:18:14 -0400 (Fri, 02 Nov 2007)
New Revision: 14183
Modified:
core/trunk/core/src/main/java/org/hibernate/id/enhanced/OptimizerFactory.java
Log:
HHH-2928 : synchronize enhanced id gen optimizers
Modified: core/trunk/core/src/main/java/org/hibernate/id/enhanced/OptimizerFactory.java
===================================================================
---
core/trunk/core/src/main/java/org/hibernate/id/enhanced/OptimizerFactory.java 2007-11-02
16:17:07 UTC (rev 14182)
+++
core/trunk/core/src/main/java/org/hibernate/id/enhanced/OptimizerFactory.java 2007-11-02
16:18:14 UTC (rev 14183)
@@ -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