On Thu, Dec 18, 2008 at 12:30 PM, AD <straightfl...@gmail.com> wrote: > Hello, > Is there a way to enable teh "testonborrow" feature with a mysql datasource > in a standlone ActiveMQ 5.1 deployment? We are seeing the "mysql > Communication failure" error and would like to enable this feature to > prevent this.
IIRC, I think that's just a property on the DBCP datasource that wraps the MySQL datasource, correct? E.g.: <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="maxActive" value="200" /> <property name="poolPreparedStatements" value="true" /> <property name="testOnBorrow" value="true" /> </bean> Bruce -- perl -e 'print unpack("u30","D0G)u8...@4vyy9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*" );' Apache ActiveMQ - http://activemq.org/ Apache Camel - http://activemq.org/camel/ Apache ServiceMix - http://servicemix.org/ Blog: http://bruceblog.org/