Connection not being returned to JRUN connection pool after executing query
---------------------------------------------------------------------------

                 Key: IBATIS-530
                 URL: https://issues.apache.org/jira/browse/IBATIS-530
             Project: iBatis for Java
          Issue Type: Bug
          Components: SQL Maps
    Affects Versions: 2.3.0
         Environment: JRUN 4.0
            Reporter: Victor Jean


I am using JNDI to create the dataSource and reference JRUN's connection pool.

<transactionManager type="JDBC">
        <dataSource type="JNDI">
               <property name="DataSource" value="webqqdb"/>
            </dataSource>
   </transactionManager>

JRUN connection pool is setup as follows in the jrun-resources.xml file:

         <data-source>
                <description>Database</description>
                <dbname>webqqdb</dbname>
                <jndi-name>webqqdb</jndi-name>
                <username>user</username>
                <password>pass</password>
                <driver>sun.jdbc.odbc.JdbcOdbcDriver</driver>
                <poolname>Pool</poolname>
                <encrypted>false</encrypted>            
                <native-results>true</native-results>
                <remove-on-exceptions>false</remove-on-exceptions>
                <pool-statements>false</pool-statements>
                <initial-connections>3</initial-connections>
                <connection-timeout>120</connection-timeout>
                <transaction-timeout>20</transaction-timeout>
                <cache-enabled>false</cache-enabled>
                <cache-size>5</cache-size>
                <cache-refresh-interval>30</cache-refresh-interval>
                <minimum-size>5</minimum-size>
                <maximum-size>500</maximum-size>
                <user-timeout>450</user-timeout>
                <skimmer-frequency>1800</skimmer-frequency>
                <shrink-by>5</shrink-by>
                <maximum-soft>true</maximum-soft>
                <debugging>true</debugging>
                <disable-pooling>false</disable-pooling>
                <description>Database</description>             
        </data-source> 

I'm executing the following simple select statement using sqlMap:

               String resource = "resources/ibatis/SqlMapConfig.xml";
                Reader reader   = Resources.getResourceAsReader(resource);
                sqlMap   = SqlMapClientBuilder.buildSqlMapClient(reader);
                
                List testList = 
sqlMap.queryForList("test.selectmaterials",null);

After executing the query, I notice that ibatis holds the connection and it is 
listed as unavailable.  Every query executed opens and holds a new connection 
until the application eventually runs out of connections from the pool.

Please assist in resolving this bug.


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

Reply via email to