spring-batch icon indicating copy to clipboard operation
spring-batch copied to clipboard

Inconsistent transaction manager configuration between XML and Java config styles

Open fmbenhassine opened this issue 3 years ago • 0 comments
trafficstars

With the XML configuration style, the transaction manager is configurable as an attribute of the tasklet element. This means other step types (partition step, flow step, etc) do not have this attribute, which makes sense since those step types do not require a transaction manager by design (see here).

With Java configuration on the other hand, the transaction manager is configurable at the StepBuilderHelper level, which is common to all step builders. While this is not an issue in itself, it requires the configuration of something that is not required in the first place, in addition to introducing an inconsistency between the two configuration styles:

step-builders

The transaction manager configuration should be moved down from StepBuilderHelper to AbstractTaskletStepBuilder in order to make this consistent with XML config.

fmbenhassine avatar Jun 10 '22 07:06 fmbenhassine