-
Jun 26th, 2011, 09:25 AM
#1
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
-
Jun 26th, 2011, 11:19 AM
#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).
-
Jul 1st, 2011, 01:05 PM
#3
Thanks Marten. That spring integration framework sounds promising.
-
Jul 3rd, 2011, 02:10 PM
#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.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules