commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Sher (JIRA)" <>
Subject [jira] Commented: (DBCP-102) [dbcp] setReadOnly & setAutoCommit called too many times
Date Mon, 18 Jun 2007 14:56:26 GMT


Pavel Sher commented on DBCP-102:

It looks like the fix in passivateObject() is not quite correct. At the moment it sets auto
commit to true if it was set to false:
if(!conn.getAutoCommit()) {

In our system we set default auto commit to false and now every time when connection is passivated
we see unnecessary cal to setAutoCommit(true). For me passivateObject should reset auto commit
to default value.

> [dbcp] setReadOnly & setAutoCommit called too many times
> --------------------------------------------------------
>                 Key: DBCP-102
>                 URL:
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Operating System: other
> Platform: Sun
>            Reporter: AC
>             Fix For: 1.2.2
> In order to gain some processor time for my application that uses Hibernate, I 
> looked with optimizeIt where it spends time. It seems that for a request on the 
> database (Oracle 9) around 25% (!!?) is spent on getting the connection from 
> the DBCP pool, and this not only the first time!. The methods that provoke this 
> loss of time are connection.setReadOnly and connection.setAutoCommit called 
> inside the method PoolableConnectionFactory.activateObject. Looking to the 
> stack, these calls translate to communication with the Oracle server. 
> The obvious thing to do is to check if read only and autocommit flags are 
> already set to the expected values. (Of course, Oracle could 've done this too, 
> but I hope you'll have a faster response :) )
> Thank you very much for you help.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message