diff --git a/quartz/src/main/java/org/quartz/impl/jdbcjobstore/JobStoreSupport.java b/quartz/src/main/java/org/quartz/impl/jdbcjobstore/JobStoreSupport.java index 1897d4604..4ba8de22e 100644 --- a/quartz/src/main/java/org/quartz/impl/jdbcjobstore/JobStoreSupport.java +++ b/quartz/src/main/java/org/quartz/impl/jdbcjobstore/JobStoreSupport.java @@ -1112,9 +1112,12 @@ protected void storeJob(Connection conn, if (!replaceExisting) { throw new ObjectAlreadyExistsException(newJob); } - getDelegate().updateJobDetail(conn, newJob); - } else { - getDelegate().insertJobDetail(conn, newJob); + if (getDelegate().updateJobDetail(conn, newJob) > 0) { + return; + } + } + if (getDelegate().insertJobDetail(conn, newJob) < 1) { + throw new JobPersistenceException("Couldn't store job. Insert failed."); } } catch (IOException e) { throw new JobPersistenceException("Couldn't store job: "