Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is using a Java Datasource an expensive ordeal?

My Java (non-Web) application may have to create Connection Pools of about 200 different Datasources. Yes, all 200 of them connecting to different Databases. Not 200 connections in the pool.

Here are some questions that are bugging me..

1) Should I anticipate major (performance etc. issues?

2) Are there any Non-commercial Java tools available out there which can be useful.

3) I tried to search the web but did not really find a straight answer. Does anyone have a link to some good resource on the web in this regard?

Thanks in Advance

like image 749
a-sak Avatar asked Aug 09 '26 04:08

a-sak


1 Answers

If you are writing a desktop / console application You could use Commons DBCP to manage your Datasources and Connection pools. You could add Spring to the mix here to help manage the configuration of your datasources.

If you are writing a webapp. You can use your servlet container to setup and manage the datasources (retrieve them via JNDI).

Your question is pretty vague. I still don't understand the context in which you need all these datasources.

My guess is you need a few datasources with a large number of connections in the pool.

like image 120
ScArcher2 Avatar answered Aug 10 '26 16:08

ScArcher2



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!