-
Aug 28th, 2008, 11:51 PM
#1
Running Multiple Instances in Multiple JVMs
HI
I have written the batch process using spring batch...which works fine in single instance.
I need to create multiple instances of this in multiple JVMs for better performance.How to make sure that instance in different JVM dont process same file on the file system. ?
How do I go about it?
Thanks In advance
Padma
Last edited by Padmala; Sep 17th, 2008 at 11:33 PM.
-
Aug 29th, 2008, 01:37 AM
#2
The best approach is probably to use the ItemWriter.flush() to send a message to the remote workers with the file names or directory names to process (assuming that remote workers have access to the filesystem). You have to give the message guaranteed delivery and a single consumer, which makes JMS the most obvious off-the-shelf vehicle.
This is what we are doing in 2.0 in the remote chunking pieces of Spring Batch. The code is still prototypical but you can see it in nightly snapshots or in SVN (https://springframework.svn.sourcefo...ch-integration). Also see the "Enterprise Integration" section on the website (http://static.springframework.org/sp...ion/index.html).
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