Noticed that if I want to read some data and if I do not have a transaction context I will not be able to do so because
"org.hibernate.HibernateException: No Session found for current thread"
For reading data , is not required a transaction normally.
So in order for Spring to manage the session it needs to have a transaction even for read only operations like selects... ?
Is that not an overhead ?
PS.I do not want to open and close session manually...so i configure and use @Transaction even for only reading data.
I read this ibm.com/developerworks/java/library/j-ts1/index.html and it seems @Transaction(readOnly=true) does not really help for this
Thanks a lot.


Reply With Quote
