my dog learned polymorphism*
The moose likes Object Relational Mapping and the fly likes using several types of databases in a single web application with hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "using several types of databases in a single web application with hibernate" Watch "using several types of databases in a single web application with hibernate" New topic
Author

using several types of databases in a single web application with hibernate

sulthana md
Greenhorn

Joined: Aug 24, 2011
Posts: 3


Hi,
Can anyone help me out "how can we use several types of database like MYSQL, DB2 etc in a single web application using HIBERNATE ?"
Here for each type of database we will be having different 'hibernate.cfg.xml' file. where do we specify the type of database we want to use? Help me regarding the syntax.
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3838

You can bind each factory to JNDI and retrieve them where needed (JNDI-bound session factory).

And welcome to the CodeRanch!


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
sulthana md
Greenhorn

Joined: Aug 24, 2011
Posts: 3
Vijitha Kumara wrote:You can bind each factory to JNDI and retrieve them where needed (JNDI-bound session factory).

And welcome to the CodeRanch!


the information is very useful .
Thanks VIjitha
 
Don't get me started about those stupid light bulbs.
 
subject: using several types of databases in a single web application with hibernate