Hi Folks,
I'm trying to create a Hibernate aware item reader that uses a dao to create the Hibernate cursor used to read items.
The dao uses SessionFactory.getCurrentSession() to get the session.
This works fine until the first time the writer hits it's commit interval. The commit appears to close the session used by the cursor.
The source code for the HibernateCursorItemReader appears to create a local session for this purpose but that won't work for my dao.
Can someone explain this behavior and provide some thoughts on a work around or is this the wrong approach.
Thanks,
Ed


Reply With Quote
