Struts Data Source
I just wrote a simple search application with Struts, and used the <data-sources> element of struts-config.xml to manage the database connection.
The problem that I am having is that after time, the system stops responding and the logs are filling up with:
org.apache.struts.legacy.GenericDataSource getConnection
INFO: Check for timeout, activeCount=2, useCount=8559
There are plenty of these, several per second.
Section from struts-config
<data-source key="pw">
<set-property property="password" value="PASS" />
<set-property property="minCount" value="0" />
<set-property property="maxCount" value="4" />
<set-property property="maxWait" value="2500" />
<set-property property="user" value="USERNAME" />
<set-property property="driverClass" value="com.mysql.jdbc.Driver"/>
<set-property property="description" value="FS0" />
<set-property property="url"
value="jdbc:mysql://localhost/DBNAME" />
<set-property property="readOnly" value="true" />
<set-property property="autoCommit" value="false" />
<set-property property="loginTimeout" value="2500" />
</data-source>
How can I make this connection work properly?
|