Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate in a library JAR vs. the application project itself

 
Russell Bateman
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may be partly an Eclipse question too, but it's mostly a beginning Hibernate architecture question (at least, from my point of view as a fairly neophyte Hibernate user).

I have a set of schema, some 6 entities in the form of classes, DAOs and .hbm.xml files--standard stuff. I wish to put them into a separate Eclipse project, and therefore consume them from a JAR generated by that project.

Ultimately, I want to consume the JAR'd schema from one or more projects to which it is in common.

Questions

1) Is this a reasonable architecture (application plus schema from a library JAR)?
2) Do I put the hibernate.cfg.xml in each consuming application project (i.e.: instead of in the library JAR)?
3) Is there anything else I should be aware of? A common pitfall? Etc.

Profuse thanks to anyone who can take the time to advise me on best practice here.

Russell Bateman
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!