From 57423163b12f0df57e94ae9e04eace004b445d1c Mon Sep 17 00:00:00 2001 From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04> Date: Wed, 24 Sep 2008 09:06:10 +0000 Subject: [PATCH] example DBCP transactionManager git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@8879 ee4ac58c-ac51-4696-9907-e4b3aa274f04 --- artemis_sqlmap/chado_iBatis_config.xml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/artemis_sqlmap/chado_iBatis_config.xml b/artemis_sqlmap/chado_iBatis_config.xml index 67ab8a794..ffde46323 100644 --- a/artemis_sqlmap/chado_iBatis_config.xml +++ b/artemis_sqlmap/chado_iBatis_config.xml @@ -35,7 +35,6 @@ <!-- Configure a datasource to use with this SQL Map using SimpleDataSource. Notice the use of the properties from the above resource --> - <transactionManager type="JDBC" > <dataSource type="SIMPLE"> <property name="JDBC.Driver" value="org.postgresql.Driver"/> @@ -52,7 +51,28 @@ <property name="Pool.PingConnectionsNotUsedFor" value="1800000"/> </dataSource> </transactionManager> - + + <!-- the following alternative transactionmanager requires the + libraries commons-dbcp and common-pool in the CLASSPATH + <transactionManager type="JDBC"> + <dataSource type="DBCP"> + <property name="driverClassName" value="org.postgresql.Driver"/> + <property name="url" value="jdbc:postgresql://${chado}"/> + <property name="username" value="${username}"/> + <property name="password" value="${password}"/> + + <property name="maxActive" value="3"/> + <property name="maxIdle" value="1"/> + <property name="maxWait" value="10000"/> + + <property name="validationQuery" value="select * from cv"/> + <property name="logAbandoned" value="false"/> + <property name="removeAbandoned" value="false"/> + <property name="removeAbandonedTimeout" value="50000"/> + </dataSource> + </transactionManager> + --> + <!-- Identify all SQL Map XML files to be loaded by this SQL map. Notice the paths are relative to the classpath. --> -- GitLab