The moose likes Spring and the fly likes multiple database support Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "multiple database support" Watch "multiple database support" New topic
Author

multiple database support

mark smith
Ranch Hand

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

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 - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 229
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......
 
 
subject: multiple database support
 
Threads others viewed
problem with isLast()!
Insert arabic data in database through jsp file
Question on Transaction
inserted primary key
insert multi language
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture