Hibernate in GlassFish
Modern How-To
To use hibernate with glassfish, all you have to do is put hibernate and its dependencies into your EAR file. This might also with with a WAR file.
In your persistence.xml, specify hibernate using this tag:
<provider>org.hibernate.ejb.HibernatePersistence</provider>
You can also specify hibernate properties as usual, for example:
<properties>
<property name="hibernate.hbm2ddl.auto" value="none"/>
</properties>
There used to be a bunch of really complicated instructions here, but they are not necessary with the latest versions of hibernate and glassfish.