Thursday, August 7, 2014

spring batch admin - monitor batch jobs

web site : http://docs.spring.io/spring-batch-admin/index.html
download url: http://docs.spring.io/downloads/nightly/release-download.php?project=BATCHADM

decompress the latest version spring-batch-admin-1.3.0.RELEASE.zip

go to the sample folder \spring-batch-admin-1.3.0.RELEASE\sample\spring-batch-admin-sample and run mvn clean install

go to spring-batch-admin-1.3.0.RELEASE\sample\spring-batch-admin-sample\target\spring-batch-admin-sample-1.3.0.RELEASE\WEB-INF\classes\META-INF
remove all sub-folders to remove the sample jobs, such as job1,job2 and infinity

go to spring-batch-admin-1.3.0.RELEASE\sample\spring-batch-admin-sample\target\spring-batch-admin-sample-1.3.0.RELEASE\WEB-INF\classes
remove \org and its all sub-folders to remove the servlets for sample jobs, such as job1,job2 and infinity

remove business-schema-mysql.sql and batch-hsql.properties

copy all the content in batch-mysql.properties to batch-default.properties,then remove file batch-default.properties, and edit jdbc configuraiton to customize your env.

TAKE NOTE:
batch.data.source.init=false
set it to false if batch db and tables are created in advance, otherwise this property=true will drop db first, then create new tables which means all historical data in db will be lost.

copy folder \target\spring-batch-admin-1.3.0.RELEASE to tomecat

copy mysql driver jar to folder %TOMCAT%webapps\spring-batch-admin-sample-1.3.0.RELEASE\WEB-INF\lib

launch tomcat, and go to this url with browse http://localhost:8080/spring-batch-admin-sample-1.3.0.RELEASE/jobs

initially, there is not any jobs, even sample jobs










launch the batch jobs described here













No comments:

Post a Comment