Announcement Announcement Module
Collapse
No announcement yet.
daemon loop scanning directory for files Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • daemon loop scanning directory for files

    Hello, does spring batch have built-in support for implementing a daemon loop that would scan a specific input directory for files and then process each as a separate job?
    In other words:
    All examples I've seen so far the application is launched against a specific input file, the job gets executed and then the application exits. I'd like to add a loop on top of it so that the application monitors the directory for input files and treats each input file as a separate job. The application does not exit until I send it a specific message/signal. Does spring batch have any support for this or would I need to implement it manually?
    Thanks, Thomas

  • #2
    Spring Batch hasn't... Spring batch is only for batch processing not a mechanism to react on certain triggers to start a job. You can use Spring Integration for that (use a file channel when a file is found launch a batch job).

    Comment


    • #3
      Thanks Marten. That spring integration framework sounds promising.

      Comment


      • #4
        If you are processing large files or lots of file, and a batch job makes sense, you may consider using spring-intgration or spring task scheduling to fire off a batch job. Think of spring integration as handling messages, while spring batch is for handling many or large file processing.

        Comment

        Working...
        X