3 Votes Vote

ActiveMQ, MySQL and connection time outs?

Posted by topdog 26 days ago Questions| mysql connection activemq All

I have ActiveMQ with MySQL persistence, using DBCP BasicDataSource connection pooling.

Because of the problems with MySQL connection time outs (see Tomcat conguration using DBCP, for example), I think some connection validation should be done.

However, ActiveMQ sample configuration doesn't seem to do anything with this?

  <!-- MySql DataSource Sample Setup -->
  <!-- 
  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url" value="jdbc:mysql://localhost/activemq?relaxAutoCommit=true"/>
    <property name="username" value="activemq"/>
    <property name="password" value="activemq"/>
    <property name="poolPreparedStatements" value="true"/>
  </bean>

Should one have some validationQuery or similar there or is there something I'm missing?

br, Touko

Originally asked by: Touko on Stack Overflow

Discuss Bury


Who Voted for this Question