[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-user
Subject:    Re: [groovy-user] how to turn autocommit off with groovy sql?
From:       Daniel Serodio <dserodio () mandic ! com ! br>
Date:       2004-09-15 15:15:46
Message-ID: 41485CA2.8080007 () mandic ! com ! br
[Download RAW message or body]

Jeremy Rayner wrote:

>On Tue, 14 Sep 2004 09:29:59 -0400, Greg Lappen <greg@paperfree.net> wrote:
>  
>
>>What i want to do is turn autocommit off in the beginning of
>>my script, then do either a commit or rollback at the end.  Can't seem
>>to find any documentation on controlling autocommit, but the javadocs
>>show that there are commit() and rollback() methods in groovy.sql.Sql
>>so I'm optimistic it can be done.  Any pointers would be greatly
>>appreciated!
>>    
>>
>
>From looking through the source (
>http://groovy.codehaus.org/xref/groovy/sql/Sql.html ) it appears that
>the handling depends on the connection.
>
>*if* you supplied a DataSource, 
>then after each call to executeX()/call() etc the connection is
>closed, and thus returned to the pool.
>(I'm not sure as to the effect this would have on the current
>commitment boundaries.)
>
>
>*However* if you're not using a DataSource, then you are probably in luck.
>
><snip>
>
>Hope this helps
>
>Jez.
>
>  
>
Don't we want this behaviour to be deterministic, independent of whether 
it's a Connection or a DataSource? I can take a look at it, if that's 
the intent.

[]'s
Daniel Serodio

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic