• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we have 2 hibernate.cfg.xml?

 
Tapan Maru
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can we have 2 hibernate.cfg.xml files in class path? If yes, how hibernate will pickup the one? or will it pickup both the files?

Thanks in Advance...
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you trying to achieve? What's wrong with using a single file?
 
Sunny Bhandari
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes you can have multiple config files (as with struts)

in case of collision, the later mapping will override the first one...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic