This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Spring and the fly likes multiple database support Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "multiple database support" Watch "multiple database support" New topic
Author

multiple database support

mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 251
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

Joined: Feb 05, 2001
Posts: 17276
    
    6

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


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 251
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......
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: multiple database support
 
jQuery in Action, 3rd edition