# Poor man's batch processing in JPA

DevFeed: [Poor man's batch processing in JPA](<https://devfeed.tech/articles/poor-man-s-batch-processing-in-jpa-27270.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201705/batch-processing/>)

Published: 2017-05-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [jpa](<https://devfeed.tech/topics/jpa.md>), [Hibernate](<https://devfeed.tech/topics/hibernate.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [batch](<https://devfeed.tech/tags/batch.md>), [cache](<https://devfeed.tech/tags/cache.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [jpa](<https://devfeed.tech/tags/jpa.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

## AI overview

This article explains batch processing with JPA, Hibernate, and Spring Data. It recommends regularly flushing and clearing the persistence context, controlling transaction size, choosing a deterministic data-fetching order, and considering purpose-built frameworks or libraries for the job.

## Source excerpt

Working with a lot of data using plain JPA or hibernate or spring-data is possible, it does work and usually, it doesn't require a lot of extra coding. Starting small is the fastest way of getting things done but you must be aware of few things that might shoot you in the foot. Read more