PS: for the cause: this has been broken upgrading to quartz 2.2.0 since it was working with 2.1.x
Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-06-06 15:50 GMT+02:00 Romain Manni-Bucau <[email protected]>: > Hi Juan, > > these constructors are useless now. However Patched delegate allows to set > a correct classloader whatever is the other config. > > We'll remove them. > > Side note: no need to patch the container, you can put the delegate in > your webapp activating TCCL usage. > > > > > Romain Manni-Bucau > Twitter: @rmannibucau > Blog: http://rmannibucau.wordpress.com/ > LinkedIn: http://fr.linkedin.com/in/rmannibucau > Github: https://github.com/rmannibucau > > > 2014-06-06 15:13 GMT+02:00 Juan Ma <[email protected]>: > > We are launching Scheduled jobs using the EJB @Schedule feature. >> Since we will run on two machines in production, we would like to use a >> JDBC >> Quartz job to make sure the jobs are not run concurrently. >> Since our backEnd uses Mysql, we have to use the >> "org.quartz.impl.jdbcjobstore.StdJDBCDelegate" driver Delegate. >> For some reason, TomEE prevents the use of this class - when it's defined >> in >> the configuration, TomEE replaces the conf by its own >> 'org.apache.openejb.core.timer.quartz.PatchedStdJDBCDelegate' >> (openejb-core-4.6.0.jar - >> org.apache.openejb.core.timer.EjbTimerServiceImpl >> line 243+). >> The delegate creation (quartz-2.2.0.jar - >> org.quartz.impl.jdbcjobstore.JobStoreSupport.java:3104) throws an >> InstanciationException when making the ".newInstance()" call (I am pretty >> sure this is because this 'PatchedStdJDBCDelegate' has no nullary >> constructor - but i wonder how such an issue could find its way in a final >> vresion, so I may miss something). >> I was able to bypass the problem by: >> -making a new class simply extending the StdJDBCDelegate >> -including it in a jar >> -putting this jar in my Tomee/lib folder (for some reason, the class is >> not >> found when in /endorsed) >> TomEE now uses my "custom" delegate, and seems to work fine. >> So, finally, my question : is this an issue someone already encountered >> before me ? Is there any easy "clean" fix/workaround, that do not require >> me >> to add entry in the /lib folder ? >> >> Kind regards >> >> >> >> -- >> View this message in context: >> http://openejb.979440.n4.nabble.com/TomEE-and-JDBC-Quartz-tp4669949.html >> Sent from the OpenEJB Dev mailing list archive at Nabble.com. >> > >
