How to split a connection pool between multiple Java applications

I implement several JavaSE applications on one server. Is it possible to establish one pool of connections (for example, C3P0) and share them among these applications? I just want to have an easy way to manage the total number of DB connections.

Are there any drawbacks to using such a centralized connection pool?

Thanks Wilson

+6
java connection-pooling
source share
1 answer

You can simply use the same data source defined on the server so that all applications can easily use the same database connection pool.

One obvious drawback will be that the performance of an independent application may be degraded due to a load on a completely unrelated application that would be difficult to understand.

+5
source share

All Articles