简体   繁体   中英

How to share connection pool among multiple Java applications

I'm implementing several JavaSE applications on single server. Is it possible to setup a single connection pool (eg C3P0) and share among these applications? I just want to have an easy way to manage the total number of DB connections.

Is there any drawbacks using such centralized connection pool?

Thank you, Wilson

You can simply use the same data source defined in the server for all application to share the same DB connection pool easily.

One obvious drawback would be that performance of independent application may degrade due to a load on totally unrelated application which would be hard to figure out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM