Reputation: 2022
I have a web app running on Tomcat 7, that requires a connection to multiple databases. For efficiency's sake I'd like to employ multiple connection pools using JDBC and probably DBCP. What options are available using multiple pools?
The Tomcat server has multiple, virtual hosts and web applications on each virtual host.
Upvotes: 1
Views: 2181
Reputation: 8443
What kind of DB layer do you plan to use - do you want to do plain JDBC, JPA, Hibernate or something else? Maybe you want to use Spring?
These choices will affect your answer.
For instance: With plain JDBC I might go with Apache Commons dbcp with a connection pool for each database. The pooled DataSource could easily be put into JNDI if that suits your application.
If you go for hibernate, then you should google the issue - there are several hits out on the net describing your problem.
Upvotes: 1