*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 246
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: 17249
    
    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 - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 246
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......
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: multiple database support
 
Similar Threads
insert multi language
Question on Transaction
inserted primary key
problem with isLast()!
Insert arabic data in database through jsp file