michaelklishin / quartz-mongodb

A MongoDB-based store for the Quartz scheduler. This fork strives to be as feature complete as possible. Originally by MuleSoft.
Other
248 stars 203 forks source link

Upgrade to MongoDB Java driver 3.x #95

Closed netvl closed 9 years ago

netvl commented 9 years ago

Currently quartz-mongodb can't be used in environments where 3.x Java driver is used. It leads to weird class initialization errors due to class versions mismatch.

Are there plans to upgrade quartz-mongodb to use more recent version of Java driver?

michaelklishin commented 9 years ago

@netvl I'd accept a pull request that upgrades the client.

sclausen commented 9 years ago

I would really like to participate, but unfortunately the project setup is clojure, so I'm drawing a blank on that one. If it only had been maven…

pwojnowski commented 9 years ago

After upgrade Client should work only with Mongo 3.x or rather with 3.x and 2.x?

sclausen commented 9 years ago

I used the new mongo driver with 2.4, 2.6 and 3.0, so it could basically workd, but I don't know this project enough which changes have to be made to get this to work. As I wrote, a project setup with clojure is not my field.

michaelklishin commented 9 years ago

@sclausen all you have to do is to install Leiningen and run lein test. Not any different from Maven.

sclausen commented 9 years ago

Yeah, it didn't worked very well with leiningen for me. Maybe I was a bit impatient and invested too little time. I'll go and start a second try tomorrow ;)

michaelklishin commented 9 years ago

@pwojnowski this compatibility table is the best I could find. Java driver 2.13 supports MongoDB 2.6 and 3.0. I'd expect 3.0 to mostly work with the 2.6 server.

pwojnowski commented 9 years ago

Hi. I already did most of the work here: https://github.com/pwojnowski/quartz-mongodb I still have one test to fix (units-test/test-aquire-next-trigger), but if you (@sclausen) haven't started the work then maybe it would be just faster to find out why the test fails than doing everything from scratch.

michaelklishin commented 9 years ago

@pwojnowski thank you!

sclausen commented 9 years ago

@pwojnowski wow! thank you!

pwojnowski commented 9 years ago

I fixed that. I don't know whether everything is ok, but at least all tests pass. If you are ok with that I can create a pull request.

michaelklishin commented 9 years ago

@pwojnowski please do!

pwojnowski commented 9 years ago

IMHO quartz-mongo code (in general) cries for refactorings to increase readability. Moreover there are still couple of changes that should be done: close cursors, use builders from API 3, etc. If you are open to such changes I can do them and create another pull request.

michaelklishin commented 9 years ago

@pwojnowski no objections from me, thanks.

michaelklishin commented 9 years ago

Resolved in master thanks to @pwojnowski.