mirror of https://github.com/apache/openjpa.git
OPENJPA-466:
Synchronize the call to obtain the next sequence value. Submitted by: Tim McConnell. modified: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@793599 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ba73316f83
commit
47173558ef
|
@ -296,7 +296,9 @@ public class NativeJDBCSeq
|
||||||
try {
|
try {
|
||||||
stmnt = conn.prepareStatement(_select);
|
stmnt = conn.prepareStatement(_select);
|
||||||
dict.setTimeouts(stmnt, _conf, false);
|
dict.setTimeouts(stmnt, _conf, false);
|
||||||
rs = stmnt.executeQuery();
|
synchronized(this) {
|
||||||
|
rs = stmnt.executeQuery();
|
||||||
|
}
|
||||||
if (rs.next())
|
if (rs.next())
|
||||||
return rs.getLong(1);
|
return rs.getLong(1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue