Skip to content

Improve the documentation regarding transaction management [BATCH-2171] #1427

Open
@spring-projects-issues

Description

@spring-projects-issues

Mauro Molinari opened BATCH-2171 and commented

I'm new to Spring Batch and my starting point to learn was the reference documentation.
However, after reading it, looking at the examples and reading other books about the subject, I was still with some big questions in my head. I found the replies on a few sources, like:

What I'm referring about:

  • the relationship between the Spring Batch metadata and the business logic data regarding transaction management: should they stay in the same transactional resource or not?
  • must the transaction manager passed to the JobRepository be the same as the one passed to the job steps? Please also note that the JdbcCursorItemReader represent an exceptional case
  • what's the answer to the previous questions when you're in a JEE container and/or you are using a JTA-XA infrastructure?
  • how can the examples pass a HibernateTransactionManager or JpaTransactionManager so easily to the JobRespotiory, even if Spring Batch itself does not use Hibernate/JPA?
  • how exactly are transactions handled for the skip and retry cases? What happens to the chuck processing flow when a skippable/retryable exception is thrown? And how things go instead when this exception is also in no-rollback-exception-classes?

I think the developer should know exactly how things work regarding transactions when he/she has to setup a Spring Batch environment and/or to configure jobs appropriately. I personally got almost all my replies by reading the above sources, but I suggest to improve the Spring Batch documentation to cover these topics too.


2 votes, 3 watchers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions