Hibernate in a library JAR vs. the application project itself
posted 6 years ago
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.
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.