HHH-2928 : synchronize enhanced id gen optimizers
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14183 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
d3ddcc4c55
commit
40fbb3d31e
|
@ -120,7 +120,7 @@ public class OptimizerFactory {
|
|||
}
|
||||
}
|
||||
|
||||
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 class OptimizerFactory {
|
|||
}
|
||||
}
|
||||
|
||||
public Serializable generate(AccessCallback callback) {
|
||||
public synchronized Serializable generate(AccessCallback callback) {
|
||||
if ( hiValue < 0 ) {
|
||||
value = callback.getNextValue();
|
||||
if ( value < 1 ) {
|
||||
|
|
Loading…
Reference in New Issue