Edmundo de Andrade wrote:
I was wondering why Hibernate hasn't provided an option to change isolation level on individual queries?
This is not a decision hibernate can make. I give you an example. A JBoss managed connection pool gives you the same connection for a thread and multiple database requests, whether not through hibernate, will go through the same connection. A commit is only issued at the end of a thread's life time (not exactly like this but you got the idea). At this point it is quite obvious it does not make much sense to change isolation level multiple times in scope of one transaction (I might be wrong here). I have used multiple data-sources with different isolation levels for different kind of works. That adds to complexity of your system but hey we still don't know any turn key solution for performance.
Farzad-