Discussion Locked

Single Connection Pool to quey multiple database servers

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

Currently we are using commons DBCP and as per my project requirement we need connections to two databases located at various locations.We have implemented the DBCP but it is creating two connection pools which is not an efficient way of handling connections. We should have only one connection pool.

Can a single connection pool query multiple databases? Is it possible to do this?

Database Servers: Oracle 10g

Any suggestions are welcome

Thank you in advance

Thiru

1 reply

by tony hopkinson

The potential for a huge mess would be extreme. How would the code 'know' it could safely resuse a connection on a server switch?

To me a pool per connection type is efficient, all sorts of things would have to be reset to be safe, which would probably negate the benefit from pooling.

You could try connecting to server A through B via a remote connection, but I suspect you are going to nd up with no pool on server A or two anyway.

This discussion is closed to new replies.