jlinn / quartz-redis-jobstore

A Quartz Scheduler JobStore using Redis.
Apache License 2.0
136 stars 67 forks source link

Use classloader specified by the ClassLoadHelper #28

Closed caleb closed 5 years ago

caleb commented 7 years ago

Tell the ObjectMapper to use the ClassLoader specified in the ClassLoadHelper. This allows jobs to be written in Clojure for example by telling Quartz to use a custom ClassLoadHelper in quartz.properties and to create a ClassLoadHelper which uses Clojure's DynamicClassLoader.

I think the best solution would be to somehow use the ClassLoadHelper's loadClass method when loading classes (like Quartz's built in JobStoreTX SQL store), but I don't see how to do that while using the FastXML ObjectMapper.

Using this version, along with setting org.quartz.scheduler.classLoadHelper.class in my quartz.properties makes my Clojure based jobs work.

What do you think?