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 Gaurav Goel <ga...@arrkgroup.com> on 2007/06/18 11:31:14 UTC

Minimum active connections in simple datasource

Hello,
            I am using simple datasource and have set various parameters.
But i dont find any parameter related to minimum active connections.
            How do i set that parameter? Or does it have a default value?
            This is code in my sqlmap-config.xml file:
            Any help would be highly appreciated.
 
 
            

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE sqlMapConfig

PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"

"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">

<sqlMapConfig>

<settings cacheModelsEnabled="true" enhancementEnabled="true"

maxSessions="64" maxTransactions="8" maxRequests="128" />

<transactionManager type="JDBC">

<dataSource type="SIMPLE">

<property value="oracle.jdbc.driver.OracleDriver"

name="JDBC.Driver" /> 

<property value="jdbc:oracle:thin:@//abidb02:1521/ORCL"

name="JDBC.ConnectionURL" />

<property value="abiweb" name="JDBC.Username" />

<property value="web4810" name="JDBC.Password" />

<property value="15" name="Pool.MaximumActiveConnections" />

<property value="15" name="Pool.MaximumIdleConnections" />

<property value="1000" name="Pool.MaximumWait" />

<property value="1000" name="JDBC.LoginTimeout" />

<property value="0" name="Pool.TimeToWait"/>

</dataSource>

</transactionManager>

</sqlMapConfig>

 

 

With Warm Regards,

Gaurav Goel.

(Software Engineer)


Re: Minimum active connections in simple datasource

Posted by Nathan Maves <na...@gmail.com>.
The DB connection pool you are using is designed to be SIMPLE as the name
implies.  If you need something a little more robust I would suggest using
DBCP from Apache.

Very easy to configure and it will have all the options you need.

Nathan

On 6/18/07, Gaurav Goel <ga...@arrkgroup.com> wrote:
>
>  Hello,
>             I am using simple datasource and have set various parameters.
> But i dont find any parameter related to minimum active connections.
>             How do i set that parameter? Or does it have a default value?
>             This is code in my sqlmap-config.xml file:
>             Any help would be highly appreciated.
>
>
>
>
> <?
> xml version="1.0" encoding="UTF-8" ?>
>
> <!
> DOCTYPE sqlMapConfig
>
> PUBLIC
> "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
>
> "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"
> >
>
> <
> sqlMapConfig>
>
> <settings cacheModelsEnabled="true" enhancementEnabled="true"
>
> maxSessions="64" maxTransactions="8" maxRequests="128" />
>
> <transactionManager type="JDBC">
>
> <dataSource type="SIMPLE">
>
> <property value="oracle.jdbc.driver.OracleDriver"
>
> name="JDBC.Driver" />
>
> <property value="jdbc:oracle:thin:@//abidb02:1521/ORCL"
>
> name="JDBC.ConnectionURL" />
>
> <property value="abiweb" name="JDBC.Username" />
>
> <property value="web4810" name="JDBC.Password" />
>
> <property value="15" name="Pool.MaximumActiveConnections" />
>
> <property value="15" name="Pool.MaximumIdleConnections" />
>
> <property value="1000" name="Pool.MaximumWait" />
>
> <property value="1000" name="JDBC.LoginTimeout" />
>
> <property value="0" name="Pool.TimeToWait"/>
>
> </dataSource>
>
> </transactionManager>
>
> </
> sqlMapConfig>
>
>
>
>
> With Warm Regards,
>
> Gaurav Goel.
>
> (Software Engineer)
>