Project: springxd
Issue XD-703: JobRepository should be persistent and shared across xd-admin/xd-container
The current code is creating an in-memory job repository for each batch job that is launched. This makes it impossible to query the tables in the job repository across the cluster. A single job repository that is backed by a file need to be shared across all jobs that are a launched. *Implementation Suggestions* * The XDAdmin server should create the job repository schema, if not found, in a HSQLDB database, when it starts up * The bean definitions should be added to the same context that the analytics are being loaded in as it is already shared across xd-admin/xd-container. The ‘analytics’ context should be renamed to something more generic, ‘shared parent context’ or something. * There is some clean up (removal) of the code in the current JobPlugin, META-INF/spring-xd/plugins/job/common.xml wouldn’t be needed anymore. That might be all, not sure. *How to verify it works* * A JUnit test that verifies the spring batch tables were created in the job repository when xd-admin is launched. This would require deleting the backing db file before instantiating singlenode/xd-admin/xd-container. * If you start the xd-container it should be able to find the necessary DataSource/JobRepository beans information to be able to contact the database. We don’t have DI style JUnit tests so this will required getting a reference to the xd-container and it’s application context, and performing ‘getBean(JobRepository.class)’
Story points: 8