Load all Hibernate jars and dependencies (exclude slfj 1.6) in tomee/libs folder, and use scope provided in pom.xml.
Property hibernate.temp.use_jdbc_metadata_defaults is set to false due to hibernate startup is slow with postgres in true.
Property “tomee.jpa.factory.lazy” is due Romain Manni-Buc forum statement:
You can disable cdi for hibernate tomee.jpa.cdi=false in the persistence
unit or system properties.
If you want it – was not part if 7.0.1 – you can in the same locations set
tomee.jpa.factory.lazy to true.
Idea is to let hibernate initialize ince cdi is started but let cdi have
jpa entity manager or factory – yes chicken egg problem but spec is written
this way ;).