0

I have developed a java batch program using the JSR352 implementation (javax.batch.api.*)

What is the best way to run this java batch program in a Java SE environment ?

ps: We can deploy this program to a JEE server having JSR352 implementation but, we are looking for methods to run in a Java SE environment, where i can run the java program as a simple console application.

ps2: i have the javaee-api-7.0.jar in my project classpath.

geisterfurz007
  • 5,292
  • 5
  • 33
  • 54
yathirigan
  • 5,619
  • 22
  • 66
  • 104
  • I cannot provide answer to the question, but wanted to mention that tagging this question (as the one previously asked) with batch results in it being tagged as batch-file. Batch means something else in this context. – geisterfurz007 Sep 15 '17 at 14:12
  • Given your earlier (linked) question mentioned you were targeting Liberty for production, I would consider asking the question: "What are my options for testing Java Batch applications (jobs) that I intend to run in Liberty?". I don't mean to take over the question, or give a too-product-centric answer, since it's a valid question independently. But you mentioned license/cost as a concern. In a dev env, however, you could use the CLI via Maven and/or WDT for free. https://developer.ibm.com/wasdev/docs/websphere-application-server-everyone/ – Scott Kurz Sep 15 '17 at 18:47
  • @ScottKurz thanks but, irrespective of the license cost, what happens if the team wants to run in Java SE mode even in production rather than deploying it in a EE container ? – yathirigan Sep 18 '17 at 04:31
  • Looks like JBeret could help ( Ref: https://stackoverflow.com/questions/25734863/standalone-example-on-jberet-jsr352 ) – yathirigan Sep 18 '17 at 04:40

1 Answers1

0

This approach worked. I was able to run a java batch in Java SE but, not sure how optimized this JSR352 implementation could be relied for Production grade jobs & data volume.

http://www.mastertheboss.com/javaee/batch-api/running-batch-jobs-in-j2se-applications

and

Standalone example on jberet (jsr352)

yathirigan
  • 5,619
  • 22
  • 66
  • 104