I\'m enhancing an old Spring/Hibernate application and im stuck. I have a method that reads a file 3000+ lines long, each line has a record which has to be compared with somethi
I've had the same problem before, and fixed it by using different hibernate methods. I use
getHibernateTemplate().loadAll(class)
for getting all of something, and
getHibernateTemplate().get(class, id)
to find a single thing. Both of those I use with no problems. I found that .find() gives me that session was closed error.
I haven't really looked into why this is though.
The only other option I can think of aside from using another method is to open and close sessions yourself, but I presume you prefer not to do that.