camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: camel-sql, connection test required?
Date Wed, 31 Jul 2013 19:41:10 GMT
Apache commons dbcp [1] is more common IMO.

[1] http://commons.apache.org/proper/commons-dbcp/

Best,
Christian
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Wed, Jul 31, 2013 at 12:45 PM, Marco Crivellaro <marco.crive@gmail.com>wrote:

> I've found out you can use c3p0 library
> (http://www.mchange.com/projects/c3p0) so you can rely on connection
> pooling
> are not forced to write your own connection testing in the route.
>
> here is an example of the jdbc datasource bean:
>
>         <bean id="mysqlPooled"
> class="com.mchange.v2.c3p0.ComboPooledDataSource" >
>                 <property name="driverClass" value="com.mysql.jdbc.Driver"
> />
>                 <property name="jdbcUrl"
> value="jdbc:mysql://localhost:3306/test" />
>                 <property name="user" value="user" />
>                 <property name="password" value="pass" />
>                 <property name="minPoolSize" value="1" />
>                 <property name="maxPoolSize" value="5" />
>                 <property name="maxIdleTime" value="60" />
>                 <property name="maxStatements" value="0" />
>                 <property name="preferredTestQuery" value="SELECT 1;" />
>                 <property name="idleConnectionTestPeriod" value="30" />
>         </bean>
>
>
> just include c3p0 in your dependencies
>                 <dependency>
>                         <groupId>c3p0</groupId>
>                         <artifactId>c3p0</artifactId>
>                         <version>0.9.1.1</version>
>                 </dependency>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/camel-sql-connection-test-required-tp5736549p5736555.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message