View Poll Results: Interface name for business logic implementation?
- 21. You may not vote on this poll
Jul 19th, 2007, 05:32 PM
I guess having definite hierarchy levels is ok if you assume that TaskLet, Chunk, Step, etc, are going to be delegating to Spring services, and that each time you want to create a new batch job, you're going to be creating new TaskLet, Step, Job, etc, implementations.
Batch Job A might have a Step that delegates to Spring Services X and Y, whereas Batch Job B might have a Step that delegates to Spring Service X only.
In this case, the different Step implementations in Batch Jobs A and B are little more than wrappers that allow correct handling of transactions.
If the expectation was that each Job or Step implementation was going to contain any real logic, then I'd stick by my point that the Spring Batch team choosing an interfaces approach to allow definition of where steps begin was still a bad idea IMO -- and that the "everything is a (nested) Job" and "use annotations or Spring configuration to control transaction/retry demarcation" is a more flexible.
So, another question...how does the @Transactional annotation fit into Spring Batch?