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) {
|
public Object next(StoreContext ctx, ClassMetaData meta) {
|
||||||
JDBCStore store = getStore(ctx);
|
JDBCStore store = getStore(ctx);
|
||||||
try {
|
try {
|
||||||
current = nextInternal(store, (ClassMapping) meta);
|
Object currentLocal = nextInternal(store, (ClassMapping) meta);
|
||||||
return current;
|
current = currentLocal;
|
||||||
|
return currentLocal;
|
||||||
} catch (OpenJPAException ke) {
|
} catch (OpenJPAException ke) {
|
||||||
throw ke;
|
throw ke;
|
||||||
} catch (SQLException se) {
|
} catch (SQLException se) {
|
||||||
|
|
|
@ -296,9 +296,7 @@ public class NativeJDBCSeq
|
||||||
try {
|
try {
|
||||||
stmnt = conn.prepareStatement(_select);
|
stmnt = conn.prepareStatement(_select);
|
||||||
dict.setTimeouts(stmnt, _conf, false);
|
dict.setTimeouts(stmnt, _conf, false);
|
||||||
synchronized(this) {
|
|
||||||
rs = stmnt.executeQuery();
|
rs = stmnt.executeQuery();
|
||||||
}
|
|
||||||
if (rs.next())
|
if (rs.next())
|
||||||
return rs.getLong(1);
|
return rs.getLong(1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue