Why do I need Transaction in Hibernate for read-only operations?
Transactions for reading might look indeed strange and often people don’t mark methods for transactions in this case. But JDBC will create transaction anyway, it’s just it will be working in autocommit=true if different option wasn’t set explicitly. But there are practical reasons to mark transactions read-only: Impact on databases Read-only flag may let DBMS … Read more