Skip to content

Defer EntityManager flushing and clearing in JpaPagingItemReader [BATCH-1110] #2465

Closed
@spring-projects-issues

Description

@spring-projects-issues

Hamdi Makni opened BATCH-1110 and commented

We can add clearAfterFlush with default value = true in the JpaPagingItemReader and just make a simple test before clearing the entity manager:
if (clearAfterFlush)
entityManager.clear();
a StepListener (using StepListenerSupport) can be added to the step to clear the EntityManager after writing.

I'll write this listener and post it to this issue later


Affects: 2.0.0.M4

Reference URL: http://forum.springframework.org/showthread.php?t=68138

Issue Links:

  • BATCH-1166 Modify JpaPagingItemReader/Writer to support an extended persistence context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions