commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rony M Sunny (JIRA)" <>
Subject [jira] Updated: (DBCP-336) Incorect data from data base if connection pool size is minimum (say 1 to 3 )
Date Tue, 08 Jun 2010 12:57:11 GMT


Rony M Sunny updated DBCP-336:


I am attaching a sample code which reproduce above mentioned bug (Incorrect data from DBCP
connection pool)

> Incorect data from data base if connection pool size is minimum (say 1 to 3 )
> -----------------------------------------------------------------------------
>                 Key: DBCP-336
>                 URL:
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment:  java on linux and sql server 2005  db on windows 
>            Reporter: Rony M Sunny
>         Attachments:
>    Environment:
>    I have a sp which return data from data base according to a criteria and i put a sleep
of 700 millisecond on sp . 
>    The connection pool configuration is very minimum compared to data accessing thread,
then from multiple java thread i tried to access data for a time period of 30- 60 minute,
also i put a query execution time out of 1 second, 
>     The result is that
>        Some thread have not get any data from db as there is not much available connection
to db in pool and can see it from the exception log , it is OK.
>      But the problem  is that after some period time (take 30 - 60 min)  data retrieved
by  threads are incorrect, means data retrieved is, query result of some other thread.
> My connection pool configuration is here
> -----------------------------------------------------------
>   <property name="maxIdle" value="3" description=""/>
>                     <property name="poolInitialSize" value="1" description=""/>
>                     <property name="testOnBorrow" value="true" description=""/>
>                     <property name="maxStmts" value="10" description=""/>
>                     <property name="validationQuery" value="SELECT 1" description=""/>
>                     <property name="password" value="*****" description=""/>
>                     <property name="url" value="jdbc:microsoft:sqlserver://;
          DatabaseName=marketsummary" description=""/>
>                     <property name="testOnReturn" value="true" description=""/>
>                     <property name="maxActive" value="3" description=""/>
>                     <property name="userId" value="***" description=""/>
>                     <property name="minIdle" value="3" description="String"/>
>                     <property name="maxWait" value="1000" description=""/>
>                     <property name="driver" value=""
> ----------------------------------------------------------
> Please look in to this

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

View raw message