File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Hibernate Commnication between two database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Commnication between two database" Watch "Hibernate Commnication between two database" New topic

Hibernate Commnication between two database

shubhranshu swain

Joined: Dec 14, 2010
Posts: 3

I am using hibernate for my current project. I have two databases in MySql say demo1 and demo2.
I want to make communication between these 2 databases. Get data from a table in demo1 check the data in another table in demo2 and insert it demo1.

Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

For that you will need to configure two SessionFactories, one for each data base.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: Hibernate Commnication between two database
Similar Threads
How to forward request to a servlet in other application
Class loading hierrarchy
dobut in protected access
static block
Intergration of Struts2 and EJB3.0 using struts2-ejb3-plugin