Skip to content

pass connection as parameter to AbstractCursorItemReader.cleanupOnClose() method [BATCH-1899] #1696

Closed
@spring-projects-issues

Description

@spring-projects-issues

Martin Bosak opened BATCH-1899 and commented

I created a child class of JdbcCursorItemReader in which I needed to, in the openCursor() method create & seed a temporary table (the 'normal' retrievals return items from the temporary table). I found that, when I wanted to drop the table before the connection was closed, I didn't have access to the Connection object.

I ended up as a hack, in the openCursor() method of storing it in a thread local variable & accessed in the cleanup method (and removed from the threadlocal var).


Affects: 2.1.8

Referenced from: pull request #735

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions