BATCH-354: added note about persistence context cleared and entities being detached

This commit is contained in:
trisberg
2008-08-04 12:25:40 +00:00
parent b8258c7758
commit f100d35ccb

View File

@@ -47,6 +47,10 @@ import org.springframework.util.ClassUtils;
* Setting a fairly large page size and using a commit interval that matches the page size should provide
* better performance.
*
* In order to reduce the memory usage for large results the persistence context is flushed and cleared
* after each page is read. This cuases any entities read to be detached. If you make changes to the
* entities and want the changes persisted then you must explicitly merge the entities.
*
* The reader must be configured with an {@link javax.persistence.EntityManagerFactory} that is capable
* of participating in Spring managed transactions.
*