tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <Allistair.Cross...@QAS.com>
Subject RE: How to set auto-commit to false on a Tomcat Connection-Pool?
Date Tue, 02 Aug 2005 08:42:19 GMT
I found this on the web for Struts using org.apache.commons.dbcp.BasicDataSource which I believe
Tomcat also uses. Therefore perhaps you can try defaultAutoCommit instead.

<data-source key="homeDS" type="org.apache.commons.dbcp.BasicDataSource">
<set-property property="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<set-property property="url" value="jdbc:oracle:thin:@localhost:1521:DBLOCAL" />
<set-property property="username" value="user" />
<set-property property="password" value="pwd" />
<set-property property="maxActive" value="10" />
<set-property property="maxWait" value="5000" />
<set-property property="defaultAutoCommit" value="false" />
<set-property property="defaultReadOnly" value="false" />
<set-property property="validationQuery" value="SELECT SYSDATE FROM DUAL" />
</data-source> 

Allistair

> -----Original Message-----
> From: starki78 [mailto:starki78@libero.it]
> Sent: 02 August 2005 09:38
> To: tomcat-user
> Subject: How to set auto-commit to false on a Tomcat Connection-Pool?
> 
> 
> Hi, my example works but I cannot set the 
> autocommit paramter, but this is quite important to me.
> Can someone give me advice?
> 
> Thanks Starki
> 
> 
> 
>  <ResourceParams name="jdbc/test">
>       <parameter>
>         <name>validationQuery</name>
>         <value>select * from dual</value>
>       </parameter>
>       <parameter>
>         <name>maxWait</name>
>         <value>5000</value>
>       </parameter>
>       <parameter>
>         <name>maxActive</name>
>         <value>4</value>
>       </parameter>
>       <parameter>
>         <name>password</name>
>         <value>xtest</value>
> 
>       </parameter>
>       <parameter>
>         <name>url</name>
>         
> <value>jdbc:oracle:thin:@xinfosap.w1:1521:orcl;autocommit=fals
> e</value>
>       </parameter>
>       <parameter>
>         <name>driverClassName</name>
>         <value>oracle.jdbc.driver.OracleDriver</value>
>       </parameter>
>       <parameter>
>         <name>auto-commit</name>
>         <value>false</value>
>       </parameter>
>       <parameter>
>         <name>autoCommit</name>
>         <value>false</value>
>       </parameter>
>       <parameter>
>         <name>autocommit</name>
>         <value>false</value>
>       </parameter>
>       <parameter>
>         <name>maxIdle</name>
> 
>         <value>2</value>
>       </parameter>
>       <parameter>
>         <name>username</name>
>         <value>xtest</value>
>       </parameter>
> 
>     </ResourceParams>
> 
> 
> 
> 
> ____________________________________________________________
> 6X velocizzare la tua navigazione a 56k? 6X Web Accelerator di Libero!
> Scaricalo su INTERNET GRATIS 6X http://www.libero.it
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message