It's good to get your suggestions, but I'm not very keen yet on any of them for the framework to be honest. The best advice for general purpose use is still (as I said before) not to use Hibernate for reading items at all. If you do use it, you would be advised also to not use objects with lazy loaded properties. The reason for this is the same as the reason why we don't use the main transactional session for the cursor: the contract for ItemReader is forward only, so if you have any errors you cannot use retry or skip if your downstream code relies on the items being attached to the current session. If you have used code like you posted above successfully, that's great, and if you can integrate it with the framework and prove that it works we can certainly take a closer look (use github and pull requests together with JIRA for tracking -see the README in the source code for details). In my opinion it doesn't feel sufficiently general to make it into the framework, where things are complicated enough if you want to use Hibernate already, and we don't really want to make it any more difficult.
Announcement Announcement Module
No announcement yet.