Closed ldewailly closed 11 years ago
This store does not implement clustering support. I'm not sure why the Spring method may be using replaceExisting
but it's wrong.
Making storeJobInMongo
create a new document even if replaceExisting
is true
would simply hiding the actual issue.
Okay, thanks for taking a look. I didn't realise clustering was not supported!
On a side note the JDBC implementation of JobStore.storeJob
does exhibit the behaviour I described above (inserting instead of updating if the job does not exist regardless of the value of replaceExisting
).
Ok, then I'd accept a pull request that makes the change.
Hi,
I've been testing replacing Quartz DB clustering with yours and I am running into an issue when the scheduler starts:
Note that I am using the following:
Here is a extract from my Spring wiring:
MongoDBJobStore.storeJobInMongo is invoked but it is invoked with replaceExisting set to true. Which causes an update on a non existing record. The flag is set to true in the Spring code ( org.springframework.scheduling.quartz.addJobToScheduler ). That said I think storeJobInMongo() should be creating the record regardless of replaceExisting if it doesn't exist.
What do you think? Happy to contribute a fix you think it makes sense.
Thanks, Ludovic