You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Felix Thomas <fe...@gmail.com> on 2015/11/26 21:46:43 UTC

Basicdatasource Connection question Camel

hi,

  I i used a  org.apache.commons.dbcp.BasicDataSource as a bean connection
in camel. By default how much connections does it open. As per the API I
see default as 1 unless I use poolconnectionfactory etc.

So my real question in the camel Spring XML , i use the same Datasource
definition for 2 different routes will it cause an performance problems  ,
or it always better I create a Separate Bean connection for each route.

Regards,
Fx

Re: Basicdatasource Connection question Camel

Posted by fxthomas <fe...@gmail.com>.
okay thanks for the Pointers Claus



--
View this message in context: http://camel.465427.n5.nabble.com/Basicdatasource-Connection-question-Camel-tp5774457p5774474.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Basicdatasource Connection question Camel

Posted by Claus Ibsen <cl...@gmail.com>.
Depends. Maybe ask the computer and do sone tests to measure the performance.

If the 2 routes do not use the connection at the same time, then they
can likely share it. But using 1 or 2 connections to a database is not
very much and your system should be able to handle 2 connections fine.

A connection pool for jdbc has been in use all the time and is a good
solution. There is even some high performance pools:
https://brettwooldridge.github.io/HikariCP/


On Thu, Nov 26, 2015 at 9:46 PM, Felix Thomas <fe...@gmail.com> wrote:
> hi,
>
>   I i used a  org.apache.commons.dbcp.BasicDataSource as a bean connection
> in camel. By default how much connections does it open. As per the API I
> see default as 1 unless I use poolconnectionfactory etc.
>
> So my real question in the camel Spring XML , i use the same Datasource
> definition for 2 different routes will it cause an performance problems  ,
> or it always better I create a Separate Bean connection for each route.
>
> Regards,
> Fx



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2