Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Connecting to more than one database in a connection pool  RSS feed

 
Ricky Jay
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to connect to more than one database in the same connection pool object? Or do I need to create a connection pool object for each database I connect to?
I'm using JSP/Servlets...so I was curious about how to go about this and how I would set up my context.xml file.

My users are in a seperate database than my application database.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 36634
475
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ricky,
You need a different connection pool per database.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!