camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Crivellaro <>
Subject Re: camel-sql, connection test required?
Date Wed, 31 Jul 2013 10:45:54 GMT
I've found out you can use c3p0 library
( 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" />

just include c3p0 in your dependencies

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message