mirror of https://github.com/apache/openjpa.git
OPENJPA-466: Get rid of possible duplicate sequence values
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@773999 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f221b1fa85
commit
13819e01f7
|
@ -57,8 +57,9 @@ public abstract class AbstractJDBCSeq
|
|||
public Object next(StoreContext ctx, ClassMetaData meta) {
|
||||
JDBCStore store = getStore(ctx);
|
||||
try {
|
||||
current = nextInternal(store, (ClassMapping) meta);
|
||||
return current;
|
||||
Object currentLocal = nextInternal(store, (ClassMapping) meta);
|
||||
current = currentLocal;
|
||||
return currentLocal;
|
||||
} catch (OpenJPAException ke) {
|
||||
throw ke;
|
||||
} catch (SQLException se) {
|
||||
|
|
|
@ -296,9 +296,7 @@ public class NativeJDBCSeq
|
|||
try {
|
||||
stmnt = conn.prepareStatement(_select);
|
||||
dict.setTimeouts(stmnt, _conf, false);
|
||||
synchronized(this) {
|
||||
rs = stmnt.executeQuery();
|
||||
}
|
||||
if (rs.next())
|
||||
return rs.getLong(1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue