This week's book giveaway is in the Cloud forum.
We're giving away four copies of The Business Blockchain and have William Mougayar on-line!
See this thread for details.
Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate/Oracle tutorial

 
Tom Ethens
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I googled on Hibernate/Oracle tutorial but could not find anything as appropriate as "Hibernate/MySQL" tutorial.

If someone has any links to only Hibernate/Oracle tutorial, can you please post them.

I am using Oracle 11g.

On another note,is it possible to use both Oracle and MySQL by utilizing the same Hibernate xml file?

Regards,
Tom
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need two seperate SessionFactories. One for each database to connect to. So you will have two hibernate.cfg.xml files.

Mark
 
Tom Ethens
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply, Mark.
 
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
Branching across two different databases can be a challenge. You need two separate datasources, but having said that, your object model won't be able to map across both Sessions - each will need its own set of classes that it is associated with.

Hibernate Shards is a non-GA project that tries to address this.

-Cameron McKenzie
[ July 15, 2008: Message edited by: Cameron Wallace McKenzie ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic