Introduction

Spring Batch Advanced Launcher (SBAL) is a tool based on spring batch. It allows launching batches from the command line. A set of advanced functionalities is provided, to allows enterprise deployment, as an alternative to the CommandLineJobRunner.

Generally, enterprise batch deployment and exploitation is made by production teams. Developments and packaging are made by developers. Some production parameters, like database connections, must never be known by developers. This means that some parameters must be set outside the application. Developers likes the Spring configuration approach, but modifying XML files in a production environment can be source of mistake. Administrators prefers property files. This is one of the goals of SBAL.

Sometimes, logging a lot of things will cause performance issues. Administrators, must have the capacity to modify the logging configuration. This is another goal of the tool.

Finally, when a new batch is deployed, or a batch is updated, it can be use full to display the batch version, and to check if all resources accessed by the batch are well configured, like database connections. SBAL provided some extension point, to add version providers, and resources validations.

Batch Deployment layout

A typical batch deployment uses the following directory structure:

  BATCH_HOME/
            +-bin
                 -batch.ksh
            +-conf
                 -batch-conf.properties
                 -batch-log4j.xml
                 -batch-context.xml
            +-lib
                 -sbal-xxx.jar
                 -...
            +-logs    
bin
This directory can contain scripts invoked by the scheduler, that wraps the java batch. It generally sets the JAVA_HOME, properties, classpath, and launch the JVM.
conf
This directory contains configuration properties, and log4j configuration.
lib
This directory contains all the dependencies to add to the classpath.
logs
This directory contains logs files.