jBeret job repository viewer
- WildFly 8.0.0.Final
- Oracle JDK7u51
- PostgreSQL 9.2.4
- JDBC job repository is registered as
java:jboss/jdbc/JBatchDS
- JSF project stage is defined in JNDI resource
java:/env/jsf/ProjectStage
on the application server- example:
./jboss-cli.sh --connect --command='/subsystem=naming/binding=java\\:\/env\/jsf\/ProjectStage:add(binding-type=simple,value=Development,class=java.lang.String)'
- example:
- (Option) Exposed JobOperator remote EJB interface is installed in the batch application archive
git clone https://github.com/lbtc-xxx/jberetweb
cd jberetweb; mvn -DdataSourceName=java:jboss/jdbc/JBatchDS -DjobOperator.jndi=java:global/batchapp/JobOperatorFacade clean package
- deploy target/jberetweb.war
- access http://localhost:8080/jberetweb/
- It shows that recent job executions with tables.
- comes with executionId, jobName, startTime, endTime, batchStatus
- Various job operations such as start, restart, stop, abandon etc
jberetweb offers multiple deployment use mode. in this mode,
- "App Name" column will be added to Job Execution table
- "App Name" input field will be added to Start/Restart Job window
- jberetweb will change a part of JNDI name of JobOperator for each lookup accordingly
Make sure that your facade beans are deployed on each deployment and named on JNDI like java:global/${war-name}/${facade-class-name}
. normally you don't have to care about it because it's standardized naming rule for EJB which packed in WAR archives.
To enable multiple deployment use mode, suppress -DjobOperator.jndi
, and specify ```-DjobOperator.name=${facade-class-name}```` in mvn option.
For EAR deployments, you can specify -DjobOperator.format
to override formatting rule of JNDI which jberetweb uses. default is java:global/{0}/{1}
. {0} will be replaced by deployment name (application name) and {1} will be replaced by jobOperator.name.
- More information can be found at author's blog
- Suppress mvn parameter
-DjobOperator.jndi
to invokeBatchRuntime.getJobOperator()
directly (in that case, you have to put your batch artifacts into jberetweb deployment).