Problems configuring some parameters in data source
Hi.
I am trying to configure some parameters on the datasource of MySql:
Here is the list of the paramters: validationQuery, testOnBorrow, testWhileIdle, testOnReturn, removeAbandoned, timeBetweenEvictionRunsMillis
When i configure this on Spring it works fine:
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="<URL>?autoReconnect=true"/>
<property name="username" value="root"/>
<property name="password" value=""/>
<property name="maxActive" value="500"/>
<property name="initialSize" value="50"/>
<property name="maxWait" value="1000000"/>
<property name="maxIdle" value="150"/>
<property name="minIdle" value="100"/>
<property name="validationQuery" value="SELECT 1"/>
<property name="testOnBorrow" value="true"/>
<property name="testWhileIdle" value="true"/>
<property name="testOnReturn" value="true"/>
<property name="removeAbandoned" value="true"/>
<property name="timeBetweenEvictionRunsMillis" value="1800000"/>
</bean>
When I configure this on jboss mysql-ds.xml i am not sure how to do this, but the way i do does not seem to work:
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
...
<driver-class>com.mysql.jdbc.Driver</driver-class>
<connection-property name="autoReconnect">true</connection-property>
<connection-property name="validationQuery">SELECT 1</connection-property>
<connection-property name="testOnBorrow">true</connection-property>
<connection-property name="testWhileIdle">true</connection-property>
<connection-property name="removeAbandoned">true</connection-property>
<connection-property name="testOnReturn">true</connection-property>
<connection-property name="timeBetweenEvictionRunsMillis">1800000</connection-property>
</local-tx-datasource>
Any ideas how i am suppoed to configure these on the mysql-ds.xml file?
thanks, Michal
Subject
Written By
Posted
Problems configuring some parameters in data source
April 12, 2011 04:49AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.