Announcement Announcement Module
No announcement yet.
Why read-only tx? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why read-only tx?

    I have seen this being asked in another thread, however, it didn't really answer my question cz the only argument is transactions also serve isolation use.

    Since most databases are configured with "READ COMMITTED" isolation level, having reading db operations in a tx doesn't seem difference than having no tx since the default tx isolation is also the same (READ COMMITTED).

    Also, certain databases don't hold read locks (Oracle, eg), READ-ONLY transaction doesn't hold locks (?) as well and it seemed equal to no tx.

    I think this is just a hibernate optimization flag. But if it is only a read-only transaction, why can't we skip the whole transaction thing all together, so saving Hibernate optimization once for all?

    correct me if I am wrong.