protected synchronized void allocateInternal(int additional, JDBCStore store, ClassMapping mapping)
throws SQLException {
Connection conn = getConnection(store);
try {
if (!alterIncrementBy) {
DBDictionary dict = _conf.getDBDictionaryInstance();
// If this fails, we will warn the user at most one time and set _allocated and _increment to 1 so
// as to not potentially insert records ahead of what the database thinks is the next sequence value.
if (updateSql(conn, dict.getAlterSequenceSQL(_seq)) == -1) {
if (!alreadyLoggedAlterSeqFailure) {
Log log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
if (log.isWarnEnabled()) {
log.warn(_loc.get("fallback-no-seq-cache", _seqName));
}