As we know StatelessSession directly deals with database rows unlike Session.
and my question is,can we use StatelessSession for small number of inserts,updates for improving
performance?
As we know StatelessSession directly deals with database rows unlike Session. and my question
Share
It strongly depends how you use it. Caching in general is invented to increase performance, but the problem with “normal” hibernate session is that it gives you no option to switch caching off. I’ve written a lot of times database access using Spring JDBC to prevent session overhead, and performance was increased greatly.
So good written application should increase performance greatly using StatelessSession. Bad written application will probably slow down, because forces caching in Hibernate was thought as remedy to users not controlling when and how many times their code will read something from DB…