It seems that from 3.1 Hibernate doesn't like non-transactional access, a quote from the migration guide:
Quote:
Or, if you believe that you can "read data without or outside of a transaction", you will likely face problems in Hibernate 3.1. Of course, there can be no data access outside of a transaction, be it read or write access
Also in 3.2 there will be other changes which seems to make harder (or at least different) to work outside of transactions.
Most mysql setups use the non-transactional MyISAM tables, where auto-commit mode is a natural choice. Is it a good idea to upgrade to Hibernate 3.1 or 3.2 in such a case?
For example consider this (not that extreme) situation: a session consists of a single read from the database which actually served from the secondary cache. In 3.0 I assume there were no communication between the application and the database at all. In 3.1 - if I understand the doc well - it is strongly recommended to use transactions, so the same operation will require two roundtrips to the database server, one to start the transactions, and then to commit it. Will this be a performance hit? Or is there some kind of optimalization (after all MyISAM tables don't support transactions anyway)?