Thomas, Thanks for your response.
> Well, why do you want autocommit to be disabled by default? - For my usage pattern I don't want autocommit - I need to specify my transaction boundaries and it spans execute statements. > I don't think other databases support disabling autocommit in the connection > URL (do you know any?) - No. > the connection pool implementation (violation of the spec). I don't see a way > to implement your request, sorry. - As you mentioned, my request would be a violation of the connection pool spec. Fair enough. I was simply expecting that the connections as I defined them for the pool would continue to behave as I defined them. The fact that I could put 'AUTOCOMMIT=false' in my URL led me to believe that those connections would always work that way. I don't have a problem adding 'connection.setAutoCommit(false)' whenever I pull a connection. I just had not included it because I figured the URL definition took care of it for me (and it fact it does for the first connection...). Based on my incorrect expectation of behavior I was getting some rather odd bugs like deadlocks which shouldn't have been possible in the usage pattern I "thought" I was getting. Now, having said any of this - H2 is awesome and I appreciate your time. I think if anything simply documenting this behavior with the references to AUTOCOMMIT would be really helpful for others to avoid my mistake. Thanks Joe On Apr 16, 1:40 pm, Thomas Mueller <[email protected]> wrote: > Hi, > > Well, why do you want autocommit to be disabled by default? That you > can disable autocommit in the database URL is more an 'accidental > feature', I don't see it as something that needs to be supported for > all cases. I don't think other databases support disabling autocommit > in the connection URL (do you know any?), so your application would > not be portable. Instead, I suggest to call conn.setAutoCommit(false). > > I think that any connection pool (not just the built-in pool of H2) > must reset autocommit at that point. Not doing so would be a bug in > the connection pool implementation (violation of the spec). I don't > see a way to implement your request, sorry. Or do you (or anybody > else) know a way? > > Regards, > Thomas > > -- > You received this message because you are subscribed to the Google Groups "H2 > Database" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/h2-database?hl=en. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
