• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connection to the DB

 
Den Av
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone! I have a question according to the database connections. I'd like to know if it possible. I have two database instances, for example hot ip xxx.xxx.xxx.xxx and standby yyy.yyy.yyy.yyy. Does anybody know how I can establish connection to the each DB instance from one datasource configuration file? I know that this topology is really bad, but my boss require that kind of configuration.
 
Greg Charles
Sheriff
Posts: 3002
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dev, welcome to JavaRanch!

Yes, you can certainly have multiple data sources. You will need a special type of JDBC driver, called an XA driver, if you want to coordinate transactions across the multiple data sources. If you don't have that requirement, then the normal drivers will be fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic