I have lot of separate functions and I'm bound to do a session.clear() upon transaction.commit() in each of them to kind of release memory.
I might be wrong but I think, session.clear() in hibernate is not called by default upon transaction.commit().
I would like to know if there is any way I could probably configure hibernate to do a auto session clear upon each transaction.commit(), without ever doing a session.clear()?
Any other solution for the above problem would be highly appreciated.