JSR 352 Spring Batch vs. Java EE [closed]
Asked Answered
L

1

4

A couple of questions regarding JSR 352, Spring Batch, and Java

1) When would someone use Java to build a batch JSR-352 application over Spring Batch? My initial take is it would require more coding in Java than Spring Batch.

2) Did version 7 of Java EE implement JSR-352? Or did it just come out with the spec and developers have to implement it? Whereas Spring Batch has implemented it, saving developers coding time?

Loadstar answered 2/9, 2014 at 19:28 Comment(1)
spring.io/blog/2014/02/03/jsr-352-spring-batch-and-youBrendabrendan
F
1

Overall this question is both subjective (subquestion 1) and lacks basic research (subquestion 2). I'll answer subquestion 2 since its not subjective. JSR-352 is part of the EE7 specification, therefor any EE7 compliant application server will have an implementation of it. The same is true for any JSR which is part of an EE spec. For an application server to be EE compliant at a particular spec level it must have implementations of all the relevant specification which pass the relevant TCKs.

Here's an Oracle tech note describing JSR 352 in Glassfish 4 (the first of many EE7 complaint application servers).

Faydra answered 3/9, 2014 at 11:15 Comment(2)
Thanks. I found the java package javax.batch and this confirmed my understanding. You can code similar type spring batch components in Java using this package (ItemProcessor, ItemReader, ItemWriter) However, Spring Batch goes beyond what Java implements in JSR-352, such as dependency injection, supporting inheritance, supporting both Java and XML configuration (where java only supports XML configuration). Additionally, the webinar link above confirmed that Spring Batch requires less lines of code than Java to build a batch application.Loadstar
Spring is Java what I think you mean is JavaEE. Anyhow, JavaEE does include DI as part of the spec. If you want to use DI and Batch w/JavaEE no problem its there. JSR-352 supports java based annotations, properties, env vars and XML not just XML. You need to do more researching of the technologies before drawing these conclusions. You might take a look at blog.codecentric.de/en/2013/07/…Faydra

© 2022 - 2024 — McMap. All rights reserved.