Announcement Announcement Module
Collapse
No announcement yet.
Running Multiple Instances in Multiple JVMs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 18th, 2008, 12:33 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).

    Comment

    Working...
    X