Hi,
We are using Hibernate 3.3 with Spring 2.0. For methods which just retrieve data, we want to mark them as just read only transactions - because Hibernate always flushes after a transaction and flushing is taking a lot of time (and the application to too huge now to manage the flush mode now :) ). We tried annotating these methods with the following annotation :
Code:
@Transactional(propagation=Propagation.NOT_SUPPORTED,readonly=true)
After execution, on referencing objects which are mapped to be lazily loaded, the application fails with a "no session" error. We also tried Propagation.SUPPORTS, Propagation.REQUIRED. It does not help.
Any ideas as to how to do this ?