Hibernate 2# - physical vs logical transactions
There are often some confusions in the regard of using 'transaction' term, especially when talking about ORM solutions like Hibernate. Sometimes transaction can have a different meaning depending on the context. It needs to be understood in order to be able to prevent any data anomalies during web development. We will have a look on what are the differences between physical and logical transactions. Physical transaction Physical transaction is the actual transaction that takes place on the database level. It means that the beginning of the physical transaction is when actual transaction on the database level is started. The end of the physical transaction takes place when this transaction is commited or rollbacked on the database level. Atomicity of operations made during physical transaction is guarded by database itself. Logical transaction Logical transactions on the other hand are those handled on the the application side, for example Spring application. Logica...