• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Configuring Hibernate with two databases

 
Ranch Hand
Posts: 65
Android Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
How do they get the deer to cross at the signs? Or to read this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic