Standalone example on jberet (jsr352)

巧了我就是萌 提交于 2019-12-02 06:53:02

问题


Is there anyway to use jberet as standalone module to execute Batch Jobs?

All the time getting samples on using along with WildFly.

Surprised to see it looks for container to load implementations while trying some samples.

Any insights on why/why not would be helpful


回答1:


Here is a tutorial how to use jberet in a standalone application: http://www.mastertheboss.com/batch-api/running-batch-jobs-in-j2se-applications

You'll need to include various jboss dependencies for it to work. Furthermore you need to configure jberet with a separate jberet.properties.

I've build a (hopefully) minimal example application according to the tutorial. You can find it here: https://github.com/kaape/jberet-standalone-example

More information can be found in the jberet github repository: https://github.com/jberet




回答2:


I created a similar example but uses JDBC chunk oriented processing. https://github.com/lbtc-xxx/jberet-se-example




回答3:


JBeret project test-apps sub-module (https://github.com/jberet/jsr352/tree/master/test-apps) contains various test apps that are structured as standalone Java SE applications (except restAPI where WildFly appserver is needed).

For JBeret + WildFly samples, please check out JBeret project wildfly-jberet-samples module:

https://github.com/jberet/jsr352/tree/master/wildfly-jberet-samples



来源:https://stackoverflow.com/questions/25734863/standalone-example-on-jberet-jsr352

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!