You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Melih Utkan UNSAL <me...@yahoo.com> on 2009/04/15 16:52:18 UTC

[dbcp] connection autocommit property

Hi,

i am trying to find the behaviour of dbcp about autocommit property.

i am getting the connection from pool and then setting autocommit property false .


after doing a few transactions,i commit or rollback the transaction and then i close the connection so it goes back to the pool.

everthing is ok up to now.

if i get that connection one more time after theese operations, then what is the autocommit property? False or True ?

i expect to be false because i set it false and sent to pool.

what do you think?


      

Re: [dbcp] connection autocommit property

Posted by Phil Steitz <ph...@gmail.com>.
Melih Utkan UNSAL wrote:
> Hi,
>
> i am trying to find the behaviour of dbcp about autocommit property.
>
> i am getting the connection from pool and then setting autocommit property false .
>
>
> after doing a few transactions,i commit or rollback the transaction and then i close the connection so it goes back to the pool.
>
> everthing is ok up to now.
>
> if i get that connection one more time after theese operations, then what is the autocommit property? False or True ?
>
> i expect to be false because i set it false and sent to pool.
>   
The answer depends on the defaultAutoCommit property setting.   The 
default value of this property is true, so unless you have set it to 
false in your configuration,  you should get connections with autoCommit 
= true when borrowing from the pool.  

Phil
> what do you think?
>
>
>       
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


RE: [dbcp] connection autocommit property

Posted by Wes Clark <wc...@guidewire.com>.
We do the same thing, and, yes, the pool doesn't change the state of
autocommit.  It is easy to check when you borrow the connection back
from the pool. 

-----Original Message-----
From: Melih Utkan UNSAL [mailto:melihutkan@yahoo.com] 
Sent: Wednesday, April 15, 2009 7:52 AM
To: user@commons.apache.org
Subject: [dbcp] connection autocommit property

Hi,

i am trying to find the behaviour of dbcp about autocommit property.

i am getting the connection from pool and then setting autocommit
property false .


after doing a few transactions,i commit or rollback the transaction and
then i close the connection so it goes back to the pool.

everthing is ok up to now.

if i get that connection one more time after theese operations, then
what is the autocommit property? False or True ?

i expect to be false because i set it false and sent to pool.

what do you think?


      

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org