mirror of https://github.com/apache/openjpa.git
Fix sequence bug I introduced with last sequence synchronization refactoring.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@448708 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
68572a9197
commit
d090d717f4
|
@ -157,7 +157,7 @@ public abstract class AbstractJDBCSeq
|
|||
return;
|
||||
|
||||
try {
|
||||
if (type == TYPE_TRANSACTIONAL || type == TYPE_CONTIGUOUS)
|
||||
if (type != TYPE_TRANSACTIONAL && type != TYPE_CONTIGUOUS)
|
||||
conn.commit();
|
||||
} catch (SQLException se) {
|
||||
throw SQLExceptions.getStore(se);
|
||||
|
|
|
@ -230,7 +230,7 @@ public class TableJDBCSeq
|
|||
if (current == null) {
|
||||
Connection conn = getConnection(store);
|
||||
try {
|
||||
long cur = getSequence(mapping, getConnection(store));
|
||||
long cur = getSequence(mapping, conn);
|
||||
if (cur != -1)
|
||||
current = Numbers.valueOf(cur);
|
||||
} finally {
|
||||
|
@ -614,10 +614,7 @@ public class TableJDBCSeq
|
|||
catch (NumberFormatException nfe) {
|
||||
return false;
|
||||
} finally {
|
||||
try {
|
||||
conn.close();
|
||||
} catch (SQLException se) {
|
||||
}
|
||||
try { conn.close(); } catch (SQLException se) {}
|
||||
}
|
||||
} else
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue