Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

multiple database support

 
mark smith
Ranch Hand
Posts: 251
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i would like to support 2 or more database (oracle, mysql, firebird....)in a spring application
what is the way to go?

thanks
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you will need two datasources pointing to each database, but Spring supports it. You could also look at Spring Data project they have docs on it.

If you have use cases that need to talk to both databases, then you need a Transaction Manager that can support two phase commits like a JTA Transaction Manager you get in an App Server.

Good Luck

Mark
 
mark smith
Ranch Hand
Posts: 251
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark Spritzler wrote:Well you will need two datasources pointing to each database, but Spring supports it. You could also look at Spring Data project they have docs on it.

If you have use cases that need to talk to both databases, then you need a Transaction Manager that can support two phase commits like a JTA Transaction Manager you get in an App Server.

Good Luck

Mark


don't need to use databases in same time.... it's just some people prefer to use database x........ and some other y..... sometime sql is diferent......
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic