activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce Snyder" <bruce.sny...@gmail.com>
Subject Re: testonborrow for DBCP
Date Thu, 18 Dec 2008 22:40:22 GMT
On Thu, Dec 18, 2008 at 12:30 PM, AD <straightflush@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)U8V4\@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/

Mime
View raw message