Any experience of using ItemReader and ItemWriter from Spring batch

Hi, I need to perform a long batch operation on a quite large dataset. The batch pattern from Spring appears very clean and useful, and I would like to implement it.

My question is mainly about the implementation of the ItemReader, working with pagination.
I would like to use DaaManager, while the closest concrete implementation offered by Spring is

My main doubt is how to get an entityManagerFactory that maps to JMix DataManager.

Hi @massimo.coletti ,

Without having looked deep into it, it seems that you can just use the JPA implementation from spring batch out of the box.

The entityManagerFactory bean is automatically instantiated by the jmix-eclipselink module. See:

The sample code of your linked docs should work as is if I understand correctly. The entityManagerFactory() method just references the spring bean. So you probably can leave it as is.

Or is there any other reason you need to use the DataManager API?


1 Like