Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Configuring Hibernate with two databases

 
Renjith Mohan
Ranch Hand
Posts: 65
Android Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am developing one Swing application where I need to integrate hibernate. The application has to connect to two databases. Since I am a novice in hibernate, I googled and came to know 2 configuration files are required to accomplish this. As per that I have two sets of:
1. hibernate.cfg.xml and
2. hibernate.properties

I created one HibernateUtil class also. But my doubt is how can I get session factory instance of each database?
Also since this is desktop application, so there is no need for pool of connection, what is the configuration in hibernate for that ? (Normally, in most of the sites, I found hibernate configuration files with datasource mapping.)

Please help me

Thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic