sbeaver001 (1) [Avatar] Offline
#1
I would like to have multiple job repositories because we have a large installation. I have tried to use Spel and supply the prefix name on the command line, but the jobParameters object is not actually instantiated until the job begins (which is too late). How can I communicate to Spring Batch at runtime to tell it which instance of the job repository to use?

Thanks!
arnaud.cogoluegnes (73) [Avatar] Offline
#2
Hi,

This is more related to Spring Batch itself, not to the book, you should try the Spring Batch forum (http://stackoverflow.com/questions/tagged/spring-batch)

The first thing that comes to my mind would be to use a JobRepository proxy that would contain the "routing" logic to the appropriate JobRepository. I don't know if that would fit your need.

Arnaud