I have now changed the configuration of the BasicDataSource to:
Code:
<bean id="oracleDataSource" destroy-method="close"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.OracleDriver" />
<property name="url" value="${jdbc.oracleUrl}" />
<property name="username" value="${jdbc.oracleUserName}" />
<property name="password" value="${jdbc.oraclePassword}" />
<property name="validationQuery" value="SELECT 1 FROM DUAL" />
<property name="defaultAutoCommit" value="true"/>
<property name="maxActive" value="20"/>
<property name="maxIdle" value="20"/>
<property name="maxWait" value="3000"/>
<property name="testOnBorrow" value="true"/>
<property name="testWhileIdle" value="true"/>
<property name="timeBetweenEvictionRunsMillis" value="300000"/>
</bean>
It seams to work better now. However I'm not sure I've solved the problem or if I'm just "hiding it". Maybe it is still there but harder to reproduce?
Does anyone have some thoughts on this?
/Tobias