You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Victor Jean (JIRA)" <ib...@incubator.apache.org> on 2008/08/06 23:42:46 UTC

[jira] Created: (IBATIS-530) Connection not being returned to JRUN connection pool after executing query

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.


[jira] Closed: (IBATIS-530) Connection not being returned to JRUN connection pool after executing query

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/IBATIS-530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clinton Begin closed IBATIS-530.
--------------------------------

    Resolution: Fixed

There isn't a single up-to-date element of this software:

Please ditch ODBC and the JDBC/ODBC bridge
Please update to a Type 4 Oracle JDBC driver (preferrably 10g -- it's backward compatible to earlier Oracle instances)
If you have a choice, drop JRun and use Tomcat, Resin, Glassfish or Geronimo.

It's not impossible that there's an iBATIS bug here, but it's extremely unlikely given the simplicity of the example you provide.  There are hundreds of unit tests and thousands of users that ensure that exact case works.  

It's highly likely that one of the above dependencies is so old that it's beyond compliance of any sort.

If you can, also update Java 5 and iBATIS to 2.3.3.  If you can't upgrade to those, I'd love to understand why.

> 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: DAO
>    Affects Versions: 2.3.0
>         Environment: JRUN 4.0
>            Reporter: Victor Jean
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> 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.


[jira] Commented: (IBATIS-530) Connection not being returned to JRUN connection pool after executing query

Posted by "Larry Meadors (JIRA)" <ib...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/IBATIS-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620502#action_12620502 ] 

Larry Meadors commented on IBATIS-530:
--------------------------------------

For the love of all things good and pure in the universe, please tell me you aren't really using the "sun.jdbc.odbc.JdbcOdbcDriver".

That thing must be made (at least partially) of money, because it is truly the source of (almost) all evil.



> 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: DAO
>    Affects Versions: 2.3.0
>         Environment: JRUN 4.0
>            Reporter: Victor Jean
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> 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.