Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connecting to multiple DataBase

 
v chenna
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing struts application which it has to support to connect multiple databases with out changing the code.

For example, client has his own choice to select a data base(Oracle,SQL Server,My SQL...) code has to support.

please provide the code or any link or clue for this

bye.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This doesn't really have anything to do with Struts, but with how you're accessing the database in the first place.

Unless you're using an ORM, you're going to have issues.
 
v chenna
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without using DAO or ORM tools is it possible. like can we go using Resource Properties file
 
Ernesto Chicas
Greenhorn
Posts: 18
Debian Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not know if you've considered the possibility of using and combining spring with hibernate to use multiple datasource
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you doing your queries? Do you need to generate new database rows that would need a unique ID? How would you overcome SQL differences?

I'm moving this to JDBC.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would you overcome SQL differences?


Yep. That is an important question - that.

Depending on whether you are dealing with the same tables / queries the answers vary.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
V. Chenna, please do not crosspost:

Crosspost of this Question



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic