gavin wrote:
I guess the problem is that people simply don't understand connection pools.
I think I understand. The connection pool maybe shared by non-hibnernate users, therefore some agree default state needs to be decided. The auto-commit state is a point of contention, some servers default this state to auto-commit=on, but hibnernates natural way of using any connection is everything is inside an SQL transaction so to save having another server round-trip to turn it off each time before use you can use this option.
The main point of my thoughts are with this policy of everything is inside a transaction, makes no sense to me. Upon inspecting my applications I find only key areas actually need transaction support and they are clearly marked in the application. Maybe my applications are just not big enough to see benifits from everything inside a transaction?
So this makes me disagree then that the "overhemlmingly common case" is that transactions are needed. This is not what I find in my applications.
O/R persistance is your expertise and maybe because much is machine generated in order to safeguard it a slightly bigger sledgehammer is needed I grant you that. But my background is in hand crafted schemas and SQL calls with a complete overview of how all data access is going to happen on the dataset.
baliukas wrote:
"auto-commit=on" sends "COMMIT;BEGIN TRANSACTION" per SQL statement and it doe's not solve any problems (It is just a wrong way to demarcate transactions). Rollback "idle" transaction to start "enterprise transaction" in both cases.
My understanding of auto-commit=on differs from yours. No "COMMIT;BEGIN TRANSACITON" verbs are sent as AUTO-COMMIT is a server side mode that relates to the default state of the SQL connection at idle. Its true to say each statement is executed on the server as-if they were wrapped in those verbs when auto-commit=on.
I must add my ramblings in my previous post were made late a night but the topic has always been straightforward to me I am however interested in your flames :)