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:
Michael Dick 2009-07-13 14:54:26 +00:00
parent ba73316f83
commit 47173558ef
1 changed files with 3 additions and 1 deletions

View File

@ -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);