This is a recurring question on the GlassFish forums and mailing lists: “How do can I use Hibernate as a JPA provider in GlassFish?”.
Mitesh has had this post on the subject up for a little while (some more here) but with the recent release of Hibernate 3.4 made it a little trickier to integrate into GlassFish (
ReflectionManager seems like a common pattern). Sun’s Marina Vatkina has provided an updated list of the JARs needed in the
glassfish/lib directory to run Hibernate in GlassFish v2 as a comment to Mitesh’s post.
For the record, here are the JAR files required from hibernate-entitymanager-3.4.0.GA and hibernate-distribution-3.3.1.GA :