• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring Batch Questions

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to figure out how to incorporate spring batch. I need to execute a class file on a scheduler and I thought that spring batch might be a good solution but the examples that I have bumped into don't seem to fit my situation.

I have a class that queries ldap and returns a list of user objects. Then I pass the user list to a separate class for processing, in this process it queries a separate database to grab some additional data associated with the user and then I email a newsletter using velocity.

The main objective is to trigger this each morning. The examples that I have read talk about an ItemReader, ItemProcessor, and ItemWriter in which it often involves processing an input file but I haven't come across an example where I can just call a class to be executed or use ldap.

So my questions are:
1. Should I just use cron?
2. Are there examples where instead of reading files I can read from ldap?

Thanks
 
laura mccord
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I found this way of doing it




It seems like it works but just wondered if this is the best way. I have this separated from my web application right now and I've been thinking if I should incorporate it. The only thing I thought of is that the application is on a load-balancer so if the scheduler goes off I don't want this triggering on each server, I just want it to execute on one of them.

Thanks
 
Catch Ernie! Catch the egg! And catch this tiny ad too:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic