Inyección de dependencia al usar Spring Quartz y JDBC Store

I need to create a Clustered, load balanced batch application which is supposed to run several processes for work format conversions etc. We chose to use Spring, Hibernate and Quartz for implementing this as our team had the knowledge of using Spring and Quartz in RAM Job store earlier.

This application has to be load balanced also, so we have to create one parent Quartz job which pulls the information from database about the records that needs to be processed and creates one child job for each record that needs to be processed and stores the information in the database. Then the jobs are triggered to all the instances of the application running and connecting to that database, and so load is also balanced.

Every thing looks colorful till this point. When we start using Spring on top of this for Dependency Injection, we are not sure on how to inject the required objects when the jobs are triggered from the database across several machines in the cluster. what are the solutions for this problem ?

preguntado el 28 de mayo de 14 a las 14:05

Looks like you are creating your own batch processing engine on top of quartz. Why not use Spring Batch, let quartz kick-off a Spring Batch Job which does the processing and distribution on a cluster. -

Does spring batch provide clustering ? -

Also we need scheduling capabilities as well to trigger the jobs at specific intervals. That prompted us to use Spring Quartz. -

Spring Batch has build in support for clustering (See…). You could create multiple batch jobs (one for each type) and run those jobs at regular intervals. -

@M.Deinum. Thanks . You pointed out the right way for me. What I actually require is the Spring Quartz jobs to trigger the jobs and then Spring batch to cluster the load. I think the confusion is with the way Quartz is projected. It is projected as Scheduler with Clustering and Load balancing capabilities. While it is true to certain extent, I think it is not a very clean solution. The combination of Spring Quartz and Spring Batch is a more robust and scalable solution. -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.