You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Ron Kirchheimer <rk...@infometis.ch> on 2005/08/09 11:57:36 UTC

Connection Pool

Hi all

I have a question about the connection pool.

Out Setup looks like this:

<transactionManager type="JDBC">
    <dataSource type="SIMPLE">
      <property value="${driver}" name="JDBC.Driver"/>
      <property value="${url}" name="JDBC.ConnectionURL"/>
      <property value="${username}" name="JDBC.Username"/>
      <property value="${password}" name="JDBC.Password"/>
      <property value="15" name="Pool.MaximumActiveConnections"/>
      <property value="15" name="Pool.MaximumIdleConnections"/>
      <property value="1000" name="Pool.MaximumWait"/>
    </dataSource>
  </transactionManager>


What does the Pool.MaximumActiveConnections property mean?

Are there 15 active Connections in the Pool an every query performed
uses one of these connections?

When running multiple queries  i get following debug output:

[...]
2005-08-09 11:48:53,828 DEBUG java.sql.Connection - {conn-100708}
Connection
2005-08-09 11:48:53,841 DEBUG java.sql.Connection - {conn-100711}
Connection
2005-08-09 11:48:53,852 DEBUG java.sql.Connection - {conn-100714}
Connection
2005-08-09 11:48:53,867 DEBUG java.sql.Connection - {conn-100717}
Connection
2005-08-09 11:48:53,900 DEBUG java.sql.Connection - {conn-100720}
Connection
2005-08-09 11:48:53,920 DEBUG java.sql.Connection - {conn-100723}
Connection
2005-08-09 11:48:53,934 DEBUG java.sql.Connection - {conn-100726}
Connection
[...]

no connection id is used twice, this must mean that the pool generates a
new connection for every query.
how can i set up the pool to manage a certain number of connections so
that all queries run over these "preforked" connections?

cheers
ron


Re: Connection Pool

Posted by Zarar Siddiqi <za...@utoronto.ca>.
Perhaps you can try getting rid of this or increasing the value because I 
think this means that a connection should be re-created if it hasn't been 
requested for more than a second.
  <property value="1000" name="Pool.MaximumWait"/>

I could be wrong but try giving it a shot.






----- Original Message ----- 
From: "Ron Kirchheimer" <rk...@infometis.ch>
To: <us...@ibatis.apache.org>
Sent: Tuesday, August 09, 2005 5:57 AM
Subject: Connection Pool


> Hi all
>
> I have a question about the connection pool.
>
> Out Setup looks like this:
>
> <transactionManager type="JDBC">
>    <dataSource type="SIMPLE">
>      <property value="${driver}" name="JDBC.Driver"/>
>      <property value="${url}" name="JDBC.ConnectionURL"/>
>      <property value="${username}" name="JDBC.Username"/>
>      <property value="${password}" name="JDBC.Password"/>
>      <property value="15" name="Pool.MaximumActiveConnections"/>
>      <property value="15" name="Pool.MaximumIdleConnections"/>
>      <property value="1000" name="Pool.MaximumWait"/>
>    </dataSource>
>  </transactionManager>
>
>
> What does the Pool.MaximumActiveConnections property mean?
>
> Are there 15 active Connections in the Pool an every query performed
> uses one of these connections?
>
> When running multiple queries  i get following debug output:
>
> [...]
> 2005-08-09 11:48:53,828 DEBUG java.sql.Connection - {conn-100708}
> Connection
> 2005-08-09 11:48:53,841 DEBUG java.sql.Connection - {conn-100711}
> Connection
> 2005-08-09 11:48:53,852 DEBUG java.sql.Connection - {conn-100714}
> Connection
> 2005-08-09 11:48:53,867 DEBUG java.sql.Connection - {conn-100717}
> Connection
> 2005-08-09 11:48:53,900 DEBUG java.sql.Connection - {conn-100720}
> Connection
> 2005-08-09 11:48:53,920 DEBUG java.sql.Connection - {conn-100723}
> Connection
> 2005-08-09 11:48:53,934 DEBUG java.sql.Connection - {conn-100726}
> Connection
> [...]
>
> no connection id is used twice, this must mean that the pool generates a
> new connection for every query.
> how can i set up the pool to manage a certain number of connections so
> that all queries run over these "preforked" connections?
>
> cheers
> ron
>