Cool, thanks a lot Mark-- I'll give that a try. Yeah its one of
those things where my app connects once a day right now in "testing" ;-)
but will probably do more when its in production... so maybe I need two
spring configs one that uses dbcp and the other mysql directly.
Cheers, Jason
Mark Thomas wrote:
Jason Novotny wrote:
Hi,
My application connects to the database maybe once a day.
Which begs the question is there really any need to use DBCP?
The first
time after I startup my app everything works fine, however the next day
when it tries to connect to the MySql database I get an exception posted
at the end.
I'm using spring 2.6+hibernate 3.4+apache dbcp+ MySql 5.0.44... the
dbcp configuration in Spring looks like:
<bean id="dataSource" destroy-method="close"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
<property name="maxActive" value="15"/>
<property name="maxIdle" value="5"/>
<property name="maxWait" value="120000"/>
</bean>
Wondering is someone has any idea how to solve this problem...
I suspect a validation query on configured to run on borrow would solve
this.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]